Srinivas Gupta

Greenhorn
+ Follow
since Aug 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srinivas Gupta

Thanks for the tutorial link. I will cleanup my execute method.
However, The problem still exists. Why is my form data from session is not displaying when page is used in edit mode?
20 years ago
Thanks for the response.
Well I don't see any errors and the jsp loads fine with no data in form fields.
Let me give more details on the functionality of the form. The form is part of a wizard flow and has "Add another event", "Next" buttons.
If the user click on "Add another event", details given are validated and stored in a session bean and sent back to the same form with empty form data. This works fine.
JSP displays edit links to previously added events on top of the jsp by reading the session bean. User can switch to one of the previously entered events by clicking on those links. I want to read the data back from session and put it back on the form. I have followed the struts-registration example and do not see what I am missing. But when I click on those links I am getting empty form rather than filled form.
When I put in some system.out.println in the above Action class execute method, I do find that the execute is using "Edit" mode as per my hidden field on form and I do see it reads event bean data from session bean and sets this bean on form. Looks like as if a new form object is being created after I have set data read from my session on the form object. But not sure where it is happening and how to fix it.
Should my success forward to my tile definition or the struts definition of the url? Right now it forwards to tile definition.
Let me know if you need more code than what I have already posted.
Again thanks for your time
[ August 21, 2003: Message edited by: Srinivas Gupta ]
20 years ago
All,
I am new to Struts and trying to use same jsp/action/action form for both insert as well as update. I am not sure what I am doing wrong. I am also using Tiles framework in the application if it makes any difference.
Any help is appreciated.
TIA
Srinivas
My Struts Config

My Action class execute method

[edit: junilu added UBB code tags]
[ August 20, 2003: Message edited by: Junilu Lacar ]
[ August 21, 2003: Message edited by: Srinivas Gupta ]
[ August 21, 2003: Message edited by: Srinivas Gupta ]
20 years ago