File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts, jQuery, Struts2-jquery and the DOM" Watch "Struts, jQuery, Struts2-jquery and the DOM" New topic

Struts, jQuery, Struts2-jquery and the DOM

Wellington Lacerda

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.


I agree. Here's the link:
subject: Struts, jQuery, Struts2-jquery and the DOM
It's not a secret anymore!