You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Benedict <pa...@yahoo.com> on 2005/12/05 06:12:09 UTC

Problem with LocaleAction (bug)

I wonder if anyone has encountered this. This might be a bug (highly likely) and I'd like to find
out.

The LocaleAction can receive a "page" parameter which redirects it to the specified URL after
setting the locale. Well I made myself a DynaActionForm which contained this parameter (along with
the others) and the action always failed.

It seems that in Struts 1.2, the DynaValidatorForm.setPageFromDynaProperty method looks for a
property named "page" and requires that is an integer. Obviously this is a conflicting
requirement, causes a ClassCastException, and thus the LocaleAction is incompatible with a
DynaActionForm.

I am pretty sure this is a bug.

Paul


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with LocaleAction (bug)

Posted by Laurie Harper <la...@holoweb.net>.
Paul Benedict wrote:
> I wonder if anyone has encountered this. This might be a bug (highly likely) and I'd like to find
> out.
> 
> The LocaleAction can receive a "page" parameter which redirects it to the specified URL after
> setting the locale. Well I made myself a DynaActionForm which contained this parameter (along with
> the others) and the action always failed.
> 
> It seems that in Struts 1.2, the DynaValidatorForm.setPageFromDynaProperty method looks for a
> property named "page" and requires that is an integer. Obviously this is a conflicting
> requirement, causes a ClassCastException, and thus the LocaleAction is incompatible with a
> DynaActionForm.
> 
> I am pretty sure this is a bug.
> 
> Paul

LocaleAction should work fine with a DynaActionForm, but you're right 
that there's a conflict with DynaValidatorForm. If you need 
LocaleAction's behaviour in conjunction with a DynaValidatorForm, you'll 
need to modify LocaleAction to use a different form property instead of 
page.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org