Thank's...
But if you call makeWidgets() again the input buttons out of the div
that uses ajax tags will be added to the dojo lisneters again, and when
you click in a button they will be execute the same number of post that
you executed makeWidgets...
Musachy Barroso escreveu:
> If you set "executeScripts" to "true", in the submit tag, you can put
> a javascript section in the returned page, and it will be executed, like:
>
> <script>
> makeWidgets();
> </script>
>
> There is an example if this in showcase, in the remote div section.
>
> regards
> musachy
>
> Andr? Faria wrote:
>> 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.
>>
>> Thank's
>> */Andr? Faria/*
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
--
Atenciosamente,
*/Andr? Faria/*
/BlueSoft Consultoria em Inform?tica/
/Fone: [55 11] 5543-5406/
/Web: www.bluesoft.com.br/
//////
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)