also see my response to Yuri Magrisso's question, same approach might work for you.

-Igor


On 6/15/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


On 6/15/06, Ayodeji Aladejebi < [EMAIL PROTECTED]> wrote:
2 thumbs up and 8 fingers forward for http://www.dynamicdrive.com/style/

and igor by wicket widgets, i mean those custom controls that operate on client side using JS and CSS and not specifically ajax anyway

these are welcome in extensions as well

however also i really want to know how best to achieve client side _javascript_ callback to Wicket using Wicket generated JS AJAX engine. Why I asked this has to do with a way to integrate a call from my own custom _javascript_ wrapped with my widget to wicket generated JS.

Example, i create a custom behavior for my custom widget (panel or border based) and i need the behavior (CSS or _javascript_ based) to render fully on the client side before even initiating an AJAX call to populate content or whatever, if wicket can provide a JS callback mechanism that custom widgets can reuse somehow to do AJAX, it will be nice and if there is already a way, please educate me.

It could be a Client activated Wicket Behavior so that i can tell the server, "Ok my animation or custom widget is finished with all its rendering special effects, go on and send the data".

there are a couple of ways to do it. first of all we do not guarantee the stability of _javascript_ in wicket-ajax.js so you should not depend on that directly. what you should depend on are callbacks generated by our ajax behaviors.

so first is to get the url - this can be done once a behavior is added to the component so it knows how to route the url. the problem in 1.2 is that the url cannot be built until all components are linked together and markupid of the component be obtained - this is the problem remedied by the 2.0 constructor refactor. so the behavior has to append the url in some event - like after component renders.

 second is where to put the script so that it runs after component is rendered. there are two options imho:
option one is somewhat hackish, write out the <script> tags with the callback script in html after the component - that way after it renders the call is made
option two is to add the callback script to body's onload which is called after the page has rendered which is a better option - see how timer behaviors work because this is exactly what they do - and this solves the problem of retrieving the callback url because this delays the need for it until render time

hope this gets you started

-Igor


_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to