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