This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts, jQuery, Struts2-jquery and the DOM Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts, jQuery, Struts2-jquery and the DOM
 
Similar Threads
Struts2 questions
Struts2 - jquery Plugin - Fieldset
ajax and struts2
migration to Struts2
Struts2-jQuery Plugin