Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Using DWR with Struts forms  RSS feed

 
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!