RE: Validation does not work on redirect result

2009-08-12 Thread spsarolkar
FindUserAction extends UserAction which in turn extends from ActionSupport so why add another import for ActionSupport so I directly used return SUCCESS; // Following does not work -- @ParentPackage("base-package") @Result(name="input",value="findUser",type=ServletActionRedirectResult.class)

Re: Configuring SiteMesh for specific action mappings in Struts 2?

2009-08-12 Thread musomesa
Hopefully it solves the OP's problem. Cheers Chris -Original Message- From: Zoran Avtarovski To: Struts Users Mailing List ; musom...@aol.com Sent: Wed, Aug 12, 2009 7:27 pm Subject: Re: Configuring SiteMesh for specific action mappings in Struts 2? I apologise, you’re

Re: Internationalization and SEO

2009-08-12 Thread Zoran Avtarovski
Have you seen URLRewrite Filter, it will enable you to set request parameters based on URL. For example you can have www.mydomain.com/en/myPage.htm remap to www.mydomain.com/myPage.htm?locale=en and likewise for the others. It¹s one of the handiest tools for web. Z. > > Hello, > > I have a ques

Re: Configuring SiteMesh for specific action mappings in Struts 2?

2009-08-12 Thread Zoran Avtarovski
I apologise, you’re right. But by changing it to : /widgets/home.action It will work exactly the same way and only exclude the home action when invoked via the widgets namespace. Z. > I think your pattern is on the namespace rather than the action? > C. > > > > > > > > -Original

Re: Validating that two fields match?

2009-08-12 Thread Burton Rhodes
If you can validate server-side, adding this functionality to your validate function is about as basic as it gets. Do you require client side validation? On 8/12/09, James Carr wrote: > Hello, > > Is there something out of the box that will let me validate if two > fields match in struts2? An exa

Re: Validating that two fields match?

2009-08-12 Thread musomesa
Check out http://struts.apache.org/2.x/docs/expression-validator.html If you are using annotations check out http://struts.apache.org/2.x/docs/expressionvalidator-annotation.html Your expression will be something like @ExpressionValidator(expression="email.equals(confirmEmail)",? message="Th

Validating that two fields match?

2009-08-12 Thread James Carr
Hello, Is there something out of the box that will let me validate if two fields match in struts2? An example would be a form with email and confirmingEmail fields. Thanks, James - To unsubscribe, e-mail: user-unsubscr...@struts

RE: Validation does not work on redirect result

2009-08-12 Thread Martin Gainty
execute should return ActionSupport.SUCCESS; curious as to which document stated to use ServletRedirectAction for a result? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. So

Re: Validation does not work on redirect result

2009-08-12 Thread spsarolkar
Yep its working wonderfully, I shouldn't have made use of ServletRedirectAction. Following worked for me @ParentPackage("base-package") @Result(name="input",value="/WEB-INF/jsp/user/findUser-success.jsp") public class FindUserAction extends UserAction implements ServletRequestAware { HttpServ

Re: Validation does not work on redirect result

2009-08-12 Thread Greg Lindholm
> > Can you please help me understand what is workflow > interceptor doing here. I know about workflow interceptor as it is > responsible for calling validate method on action if action implements > ValidationAware interface and collecting errors if any > > First thing you do is take a look at the

Re: Validation does not work on redirect result

2009-08-12 Thread Greg Lindholm
You are going to want to define at least the 2 results 'success' and 'input' for FindUserAction. The 'input' result should not be a redirect, it should be to a jsp (or Freemarker, or velocity, etc). Here is an example from my app using struts.xml configuration: /struts/UserList.jsp

Re: Validation does not work on redirect result

2009-08-12 Thread spsarolkar
thanks i missed that But i am not able to understand statement Here is my FindUser.action @ParentPackage("base-package") public class FindUserAction extends UserAction implements ServletRequestAware { HttpServletRequest request; public void setServletRequest(HttpServletRequest httpServle

Re: Validation does not work on redirect result

2009-08-12 Thread Greg Lindholm
No result defined for action org.xinus.actions.user.FindUserAction and > result input at > >From the write up at: http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ The one thing you need to be aware of is: The action you are redirecting towards will need

Re: Validation does not work on redirect result

2009-08-12 Thread spsarolkar
Thanks for replying when I used that interceptor it is giving me some weird results. Here are the things sequentially happend I restarted the jetty server using mvn clean jetty:run Went to form and submited without entering any values It redirected me back to form page without printing any messa

Re: Validation does not work on redirect result

2009-08-12 Thread Greg Lindholm
Why do you think validation is not working? Is it because you are not seeing error messages? Error messages are not normally preserved across a redirect, if you would like them to be you can add an interceptor to do this. See if this helps: http://glindholm.wordpress.com/2008/07/02/preserving-mess

Validation does not work on redirect result

2009-08-12 Thread spsarolkar
I am new to struts2 and just wrote one small program. I wanted to ask why Validation works for only dispatcher result and not redirect result. I want it with redirect result because it will allow bookmarking of page even when validation fails. -- View this message in context: http://www.nabble.