[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-user
Subject:    Extensions filter and Ajax
From:       "Andrew Robinson" <andrew.rw.robinson () gmail ! com>
Date:       2006-03-31 23:59:29
Message-ID: bc36a6210603311559s39266442v10a05a1f21fc1fa5 () mail ! gmail ! com
[Download RAW message or body]

I am using AjaxAnywhere and Myfaces 1.1.1 and am having a problem with
Tomahawk components with AJAX.

AjaxAnywhere updates content within spans:

<span class="aazone.X">content to update</span>

Tomahawk 1.1.1 components dynamically add JavaScript and CSS style
sheets to the page's <HEAD, <head <BODY or <body tags.

The problem:
1) Render page with <t:tree2 rendered set to false
2) User clicks on an AJAX'd link
3) Page re-renders with <t:tree2 rendered set to true (due to
action/actionListener)
4) Head is not updated with new tomahawk items.

This is really a problem for me as the Tomahawk controls either don't
work or work/look really badly without those items in the head tag.
AjaxAnywhere uses a static function to find zones to render, so I have
no avenue to extend it and would rather not hack up the source.
Tomahawk's code is pretty convaluted and it does not look easy to
change where it puts the LINK & SCRIPT tags.

It doesn't look like it is possible to force tomahawk controls to
always output their JavaScript and/or CSS regardless of if they are
rendered or not as the renderer is the one that is adding those items.

Anyone have a workaround to this problem that doesn't involve the
modification of the open source (Will resort to that last)?

I suppose I could manually use the add resource when I render my page,
but that may be a bit risky. I have debated using XSLT in a filter to
"move" content around but don't want that performance overhead. I
would rather not buffer the output again as the MyFaces extension is
already buffering the response.

Thanks,
Andrew

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic