RE: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-11-26 Thread Raghuveer.V
n instead of redirectaction and use same properties in Action1 and Action2. Regards, Raghuveer Vellanki -Original Message- From: Siddiq Syed [mailto:siddiq...@yahoo.com] Sent: Friday, October 30, 2009 1:43 AM To: user@struts.apache.org Subject: Re: Preserving Messages and Garb

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-11-02 Thread Musachy Barroso
both ${} and %{} are supported in 2.1.x On Mon, Nov 2, 2009 at 11:10 AM, Greg Lindholm wrote: > Here is the link [1] for "Parameters in configuration results", and yes it > is suppose to be ${} not %{} (but I thought it had been changed to support > %{}, hard to keep straight.) so you want to use

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-11-02 Thread Siddiq Syed
Input${considTypeCode}         Thanks Siddiq. From: Greg Lindholm To: Struts Users Mailing List Sent: Mon, November 2, 2009 2:10:57 PM Subject: Re: Preserving Messages and Garbage values Across a Redirect in Struts 2 Here is the link [1] for "Parameters in con

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-11-02 Thread Greg Lindholm
Here is the link [1] for "Parameters in configuration results", and yes it is suppose to be ${} not %{} (but I thought it had been changed to support %{}, hard to keep straight.) so you want to use 3a not 3b. You could show your getter, make sure it is public, returns a string and no typos. In the

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-11-02 Thread Siddiq Syed
Hi Greg, Creating a variable in the action , seems not working. Here are the steps that i have done. step 1. Create a variable considTypeCode in the action , and so is getter ,setter. step 2. Create a prepare() method in the action, which sets the value of the considTypeCode to determine what w

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Greg Lindholm
On Fri, Oct 30, 2009 at 5:15 PM, Siddiq Syed wrote: > > First off all Thank you so much Greg, You have been doing a great job!. And > you express things pretty clear, Which I may not. > Please bare with me for some more time. > > When I am doing a chain in the input, as show below > > class="co

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Siddiq Syed
First off all Thank you so much Greg, You have been doing a great job!. And you express things pretty clear, Which I may not. Please bare with me for some more time. When I am doing a chain in the input, as show below determineCaseEval

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Greg Lindholm
1) Your interceptor stack is fine. 2) Dale was simply pointing out a very common newbie mistake; when you specify an interceptor-ref in an action it will replace (not append) the interceptor stack. Since you hadn't shown what redirectInput was it was a possible source of error. Now you have shown

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Siddiq Syed
The interceptor mention is nothing but RedirectMessageInterceptor(http://glindholm.wordpress.com/category/struts-2/) and I specified that in the strust.xml, This interceptor is to preserve the error messages.

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Dale Newfield
Greg Lindholm wrote: The only other thing is your interceptor stack 'redirectInput' you haven't shown what it is. And note--specifying any interceptor(s) in the action causes the specified interceptor(s) to be the only ones used. -Dale ---

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Greg Lindholm
I don't think you understanding of Chain result type is correct. The type="chain" is part of the result type, it wont effect other results, each result is configured independently. You should be able to configure a chain result for just result of 'input' like this:

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Siddiq Syed
Here is the general understanding of the result types. redirect-action -- uses the new request object. dispatcher --- Dispacther uses the old request object but the location must be a view not an action. Chain --- chain uses the old request object but it is excuted irrespective of what returns f

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Siddiq Syed
Hi Greg, Thank for your input, But i tried this at my first attempt, Its not working with this sicenario. The problem is that you need to define two different actions one is on success and one is on input. If input is defined it will exceute irrespecitve of what returns from the action.

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-30 Thread Greg Lindholm
Ok, I think I understand. The key point seems to be that on a validation fail you need to execute another action. determineCaseEvaluationTypeForInput You might want to try a Chain result [1] and action chaining [2]. I know there are warnings about action chaining but this may be a

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-29 Thread Siddiq Syed
I donno If i can able to explain it to you, I will try my best , here is the secinario Step 1. When the user click the button on the page, depend on the string return from the action method the page will be display and is configured in the struts.xml file as mention below.

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-29 Thread Greg Lindholm
Still don't understand why you need to redirect on input result. Normally when validation fails you want to return the user back to the same page. If you dispatch back to the input jsp page (instead of redirect) then all the input parameters will be there so can be redisplayed with the error messa

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-29 Thread Siddiq Syed
Hi Greg, Thanks for your quick repley,! The reason for doing a redirect on the input is that system needs to determine what will be the page to display next along with the error messages and the garbage values. As a temporary solution i am using the getter and setter methods of the variables of

Re: Preserving Messages and Garbage values Across a Redirect in Struts 2

2009-10-29 Thread Greg Lindholm
The short answer is don't redirect when validation fails. For results of "input" you should not be doing a redirect or you get the problem you described. On Thu, Oct 29, 2009 at 11:13 AM, Siddiq Syed wrote: > > Hi all, > > I have been using Glindholm's RedirectMessageInterceptor to perserve th