Hi. 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 : http://getahead.org/dwr/server/struts
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. Thanks.
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
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 ]