File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Using DWR with Struts forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using DWR with Struts forms" Watch "Using DWR with Struts forms" New topic

Using DWR with Struts forms

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

In order to implement a simple CRUD functionality using Struts, I created a simple Action and mapped it twice to different URLs.
CRUD operations operate over session-saved data.
The application works smoothly without any propblem.
But in fact, I want to re-implement this CRUD using DWR so the user won't see page reloading.
I checked this page :

The page says :
"This will allow you to make calls into your FormBeans from DWR."
What does this mean ?
I should extract managing-cart-methods from my Action and put them into the ActionForm ?
I failed to find an on line example.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I did a Struts project in which I used DWR extensively to perform AJAX Functions. Frankly, I didn't find any use for the Struts creator. All it does is allow you to access your form bean. If the information I need is in the form bean, I can access it easily on the server side in my JSP. I don't need AJAX to get information from the form bean.

I just used the regular javabean builder that is used in most of the examples on the DWR Site.
I should extract managing-cart-methods from my Action and put them into the ActionForm ?

No, I wouldn't do that. Here's what I'd do: I'd take your managing-cart-methods out of your Action class and put them in a regular Java class. Then just register the class and methods in your dwr.xml file and make AJAX calls to them using the DWR interface.
[ April 03, 2007: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: Using DWR with Struts forms
It's not a secret anymore!