i think he is talking about something a bit different

what you want can be accomplished by using a bit of javascript foo

http://ejohn.org/projects/flexible-javascript-events/

you can use that func to register a bunch of window.onload events that
execute once the html has been rendered. we were discussing about
implementing that as part of wicket to have nice serverside api support for
it, but havent had the time yet. matej?

-igor


On 1/23/07, James McLaughlin <[EMAIL PROTECTED]> wrote:

I ran into this issue a while back and proposed an IOnLoadContributor
interface that kind of mirrors all the good work of IHeaderContributor,
but
for script that is inserted anywhere below </head>, such as onload, or
script blocks in the actual body.
http://www.nabble.com/rfc-OnLoadContributor-tf2609406.html#a7282114

I'm getting around it now by having my Behaviors check the Target type in
onRendered, which works great for Ajax requests. For non-ajax, you need to
worry if the script block will end up in a place that isn't cool for ie.

On 1/23/07, Vincent Demay <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> When I re-render a Dojo widget via an ajaxRequestTarget, I have to add
> some javascript to the request depending on which widget(component) has
> been added to the target. This javascript should be added in order to
> re-parse new DojoWidget (from the ajax response) with dojo API. This
> kind of parsing should only be done on top level Dojo component because
> during parsing sub-dojo-components will be automaticaly parsed.
>
> Actually what I need to do is  :
>
> before sending response
> 1 - looking for all component added to the target
> 2 - for all top-level Dojo components :
>        Adding its id to a map
> 3 - adding a js such as
>
> djConfig.searchIds = ['id1','id2','id3'];dojo.hostenv.makeWidgets().
>
> My problem is I can not do a such stuff in a ajaxBehavior.respond
> because this should be done once by request and i do not have any access
> to the component list added to the target. On the other hand I can not
> extends AjaxRequestTarget because If i do that I can not use AjaxLink or
> other Ajax* to re-render a Dojo Component.
>
> So I thought to add a listener on AjaxRequestTarget that should be
> called after respondComponent in respondComponents method such as a
> IAjaxResponseListener with a onRender(Map/* <String,Component>
> */markupIdToComponent, AjaxRequestTarget target) method.
>
> Have you a better idea and WDYT about listener?
>
> thanks a lot
>
> --
> Vincent
>


Reply via email to