I am learning struts. I have an issue in doing my hands on.
In my form, I have an textbox, whose value can be populated from database and have an update button , where the user can change the value in the textbox and click on update button. this value should get updated in database. this updation should be tracked as an event. The whole form should not get submitted.
After this not knowing what I need to do.... Please help me how i need to do this.
can we not even refresh the page.. like submitting the page and redirecting to same page or forward the action. my java script is like this on click of the button pForm.action="updateUserName.do?method=executeAction&userName="+userName+"&flag="+flag; pForm.submit();
This is giving blank page aftr clicking on the button. and in the url v can see the changed username. [ July 16, 2008: Message edited by: Venkatesh Goriparthy ]
Joined: Feb 15, 2005
Yes, forwarding to the same page is the right way to handle this. Just be careful, though, with the words you use to describe a problem. Saying "The whole form should not get submitted" is not the same as saying "after submitting the form, the same page should be displayed".