I have a problem with Dojo in Struts 2.
When the page loads a method dojo named makeWidgets is called, that method searchs for the dojo widgets and attach the necessary events to dojo listeners.
Example:

<div id="div1">Div 1</div>
<s:url id="ajaxTest" value="/AjaxTest.action" />
<s:submit type="submit" theme="ajax" value="submit" targets="div1" 
href="%{ajaxTest}"/>

the ftl adds some dojo notations dojoType, etc...
The method onLoad (makeWidgets) is executed.
if you click in the submit button a dojo listener would be called and the result of AjaxTest.action would be printed in 'div1'.
Thats really works!!!

but the problem is if you AjaxTest.action needs to do annother ajax request and print the response a in div... Dont Work... Because the listener is not added to the new submit button because the method makeWidgets didnt run, but If you call the method programmaticaly when you click in the first button two request will be triggered.

If someone have a light about this... Please help-me.

Read more about Struts 2 with Dojo: http://struts.apache.org/2.x/docs/ajax-tags.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to