aspose file tools*
The moose likes Struts and the fly likes Struts, jQuery, Struts2-jquery and the DOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts, jQuery, Struts2-jquery and the DOM" Watch "Struts, jQuery, Struts2-jquery and the DOM" New topic
Author

Struts, jQuery, Struts2-jquery and the DOM

Wellington Lacerda
Greenhorn

Joined: Jun 03, 2011
Posts: 2
Hi Ranchers,

I set up some jQuery dom manipulation on a single page web app, which combines jQuery direct manipulation on some instances, and using the lightbox plugin FancyBox to some alternate or iframe views. It works nice. Then I've added Struts 2 actions for the dynamic services, which is almost there.

My doubt is this: when I submit a form in Struts2-jquery there is a targets property where I can put a div and the form result gets in the div. Ok so far. What if I needed to choose wether to stuck the result in a view or call fancybox() for it, how can I setup struts2-jquery forms to specify calling a js function instead of going directly to the target?

Or is it the case to ditch it altogether and going directly to the ajax code? I'm doing it already, but I want to know if somebody has a better way for it, as single page DOM apps are getting pretty much in taste.

Cheers,

Wellington
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts, jQuery, Struts2-jquery and the DOM