Hi !
Iam developing an application based on Struts framework, Iam new to it. Here goes my question,
I have two functionalities, one is the save functionality and the other one is edit. I got to save/edit the values available in the Jsp form. In the action class, when should I populate the form and when should I get the form values. I don't know exactly the relationship between action class and action form class
-
A struts framework question (2 messages)
- Posted by: A JP
- Posted on: May 20 2002 20:54 EDT
Threaded Messages (2)
- A struts framework question by Chuck Cavaness on May 20 2002 23:38 EDT
- A struts framework question by Andrew Doddington on May 21 2002 04:54 EDT
-
A struts framework question[ Go to top ]
- Posted by: Chuck Cavaness
- Posted on: May 20 2002 23:38 EDT
- in response to A JP
Instead of trying to provide enough details in this reply and not doing a good job, you really should download chapter 3 and maybe 5 from my Struts book project. The draft chapters are available right here on this site:
http://www.theserverside.com/resources/strutsreview.jsp
Chuck -
A struts framework question[ Go to top ]
- Posted by: Andrew Doddington
- Posted on: May 21 2002 04:54 EDT
- in response to A JP
Accepting Chuck's point that you should really read a bit more in this subject before proceeding much further, here are a few key points:
* You should create a action form bean that maps onto the fields on your form (taking care to ensure that getters and setters have the correct names).
* You should use struts custom tags to populate your jsp page
* Struts will take care of putting the data back into your form bean
As well as Check's book, there is a significant amount of documentation on the Apache struts site:
http://jakarta.apache.org/struts/userGuide/