You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by holod <se...@gmail.com> on 2008/07/28 09:13:32 UTC

Is it possible not to use DOJO plugin?


--- On Fri, 7/25/08, holod <se...@gmail.com> wrote:
> I've seen <s:div/> tag, but I didn't understand how can 
> I invoke request to action manually (by mouse click for example)

><s:a...>?

>http://struts.apache.org/2.x/docs/dojo-anchor.html

>Note that if you're using S2.0 you'll need to look at the docs at:

>http://struts.apache.org/2.0.11/docs/dojo-anchor.html

>because of the way the wiki works.

>Dave

As I understood, I have to use dojo plugin (additional jar).
Please, tell me, is it possible to avoid usage of dojo plugin?
Seems like my problem can be solved:
if <s:div/> would not send request automatically, when page is loaded, but
only on user mouse click, I would be happy using it without additional dojo
plugin.
I've set autoStart="false" but it doesn't help :( Is there are any other
oppotunities to stop automatic first-time execution?


-- 
View this message in context: http://www.nabble.com/Ajax%3A-invoke-action-by-mouseClick-and-get-simple-string-tp18650508p18685215.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is it possible not to use DOJO plugin?

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
holod wrote:
>   
> As I understood, I have to use dojo plugin (additional jar).
> Please, tell me, is it possible to avoid usage of dojo plugin?
> Seems like my problem can be solved:
> if <s:div/> would not send request automatically, when page is loaded, but
> only on user mouse click, I would be happy using it without additional dojo
> plugin.
> I've set autoStart="false" but it doesn't help :( Is there are any other
> oppotunities to stop automatic first-time execution?
>
>
>   

If using Struts 2.0.x, dojo is bundled in the main jar.  It is a plugin 
in 2.1.x.

Yes, you can avoid using Dojo. Instead using a different client-side 
library or XMLHttpRequest directly. However the struts2 tags only 
support Dojo at the moment.

Don't use s:div.  As Dave suggested, use an s:a or s:submit with the 
target pointing at a div that contains your image.  The content of the 
target will be replaced by your action's response when the link/button 
is clicked.  If use use s:a, the anchor can contain the image, so 
clicking the image replaces itself with the response from your action.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org