Also see the FAQ "How do we repopulate controls when validation fails"
http://struts.apache.org/2.0.11.1/docs/how-do-we-repopulate-controls-when-validation-fails.html curiousengr wrote: > > Hi, > > I am facing problem with validation. I need urgent help if someone can > provide it I will greatly appreciate that. > > I have an action entryAction which renders entry.jsp. In entry.jsp I > display certain properties from the action class using s:property as well > as I display a list of items in a drop down using s:iterator and and > option tags. Along with this data display I also display a file upload > form. Once the user chooses a file and uploads it then control goes to > uploadSuccess.jsp via UploadAction.java. But if there are validation > errors like file name is missing then control is supposed to go back to > input page i.e. entry.jsp. I have tried both XML based validation as well > as validation in Action class code. The validation works, errors are > displayed on entry.jsp as expected but the property fields and the drop > down data that were being displayed before the validation was triggered > are no longer available on the UI. they are all blank. I do not know how > to cause the entryAction to execute when validation error causes the > entry.jsp to display due to <result > name="input">entry.jsp</result> configuration. Can someone please guide > me as to how to solve this problem with struts2? Is there any > configuration parameter that I can pass or is there any kind of > interceptor that I have to use? How do I cause an action to invoke when > input result is configured as a jsp file? > > Thanks > Pranav > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/need-help-with-validation-tp17626863p17650309.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]