I think the Editor component is a good example of how it works...
https://svn.sourceforge.net/svnroot/tacos/tacos-4.0/trunk/src/java/net/sf/tacos/ajax/components/Editor.script

It builds a function that sets-up the component. This happens inside
<body> of the script file.
Then, inside <initialization>, it either calls the function directly (if
its an ajax request)
or it makes it get called at body's onload (if its NOT an ajax request).

Also, there's a call to the widget's destroy, if the widget already exists.


Sam Gendler wrote:
> All of the tacos components which wrap dojo widgets that were
> contributed by euroclick don't update correctly during ajax requests.
> I'm hoping someone with more understanding of how ajax requests are
> processed can clue me into what to change to get it to work.
>
> Currently, the body of a dojo widget is rendered as a div with an id.
> The .script file then adds dojo.addOnLoad() calls which create the
> necessary widget, then add the div to the widget as a child.
>
> But the addOnLoad calls don't seem to get executed when the ajax
> response is processed (they are included in the response, though), or
> if they are, they aren't working correctly.  Presumably, they are
> failing to find the necessary div in the document.  Also, the previous
> widget instance needs to be destroyed somehow.
>
> If there is a way to detect that the widget is rendering for an ajax
> response, I can probably work out alternative js which will work
> correctly, but I have no idea if it is possible to detect the ajax
> response from within the render methods of the component.
>
> Also, if there is a correct way to unload the previous widget, that'd
> be great to know.
>
> Thanks
>
> --sam
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Tacos-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
>   


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to