Juan Ignacio Sánchez Lara schrieb: > This is just the beginning: > > < > > a4j:outputPanel ajaxRendered="true" > > > <f:verbatim> > > <t:dojoInitializer require= "dojo.io.*" /> > > <t:dojoInitializer require="dojo.io.IframeIO " /> > > I'm using it inside a Facelet component inside a RichFaces tab. It gets > rendered depending on user role. If it gets rendered at page load time > there's no problem, but it won't work if it doesn't :-\ > > Is there any way to hard code something like "ya, dojo, initialize > yourself?" (well, you know, to tell dojo to initialize). Maybe > dojoInitializer uses addOnLoad and it doesn't get called... > > > No add onLoad is used, but... I assume something dojo like is called outside of your tabs. I assume you have handcoded some javascripts calling dojo, otherwise the initializer would not bee needed.
Following push the initializer outside of your tab and render it all the time. All the initializer in your case does is to render dojo.require(... statements at the correct code positions) See if that helps your problem. If speed is a concern you always can turn off the dojo tag parsing this should improve page rendering times by the factor of two, but adds the burdent hat you have to declare your dojo components programmatically instead of the dojo tags. <t:dojoInitializer parseWidgets="false" searchIds="[]" /> this turns off the dojo parsing entirely... (if you have a handful of tags with fixed ids you always can add them via searchIds...)

