i tried chaining but that did not work as expected. but then i used prepare 
interceptor and it was piece of cake. i just had to move the code out to a 
helper class to prepare the list for dropdown and call that helper method from 
both 1st and 2nd actions. If anyone wants to know exactly how it works just 
refer to http://struts.apache.org/2.0.11.1/docs/prepare-interceptor.html 

----- Original Message ----
From: Randy Burgess <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Tuesday, June 3, 2008 2:30:51 PM
Subject: Re: need help with validation

Yes, if entry.jsp is the success page of your action that populates the drop
downs. 

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Pranav <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Tue, 3 Jun 2008 13:15:43 -0700 (PDT)
> To: Struts Users Mailing List <user@struts.apache.org>
> Subject: Re: need help with validation
> 
> Thanks I will try that. But if I do it, will it still preserve the validation
> errors so that entry.jsp page will display it along with drop downs etc?
> 
> Thanks
> Pranav
> 
> ----- Original Message ----
> From: Randy Burgess <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <user@struts.apache.org>
> Sent: Tuesday, June 3, 2008 11:21:54 AM
> Subject: Re: need help with validation
> 
> Your input could use the chain result type for 'input' which will call the
> action which populates the drop downs, etc.
> 
> http://struts.apache.org/2.x/docs/chain-result.html
> 
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
> 
> 
> 
>> From: Pranav <[EMAIL PROTECTED]>
>> Reply-To: Struts Users Mailing List <user@struts.apache.org>
>> Date: Tue, 3 Jun 2008 08:50:40 -0700 (PDT)
>> To: <user@struts.apache.org>
>> Subject: need help with validation
>> 
>> 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]
>> 
> 
> 
> 
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
>      
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to