Re: Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread Ted Husted
If * the class extends one of the ActionForm base classes, and * the class overrides the base validate method, and * the class is registered as the form bean for the action, and * the validate methods returns a non-null and non-empty ActionErrors collection, then the input location should be sele

Re: Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
all i am trying to do is perform basic form validation. but that itself doesnt seem to work. i have other actions which work fine except this one. what happens is that it finds errors and indicates the errors in the forward "success" page instead of the "input" page. sorry for repeating mysel

Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
Thanks for the replies guys, I am validating the form in the form-bean's validate method. The form-bean code is given below:- public class ImageForm extends ActionFormBase { // getter and setter methods public ActionErrors validate( ActionMapping mapping, HttpServletRequest request )

Re: Re: RE: Validate() method not working as it should !!!!!

2006-04-05 Thread Gary Feidt
Where is your Validation? I don't see any protected ActionMessages validate(iForm theform) {} Nor do I see anything being added to the ActionErrors. You need to add errors to you ActionErrors collection. You can do something like: error = validate(theform); if (!errors.isEmpty()) { saveErro

Re: Re: RE: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
Here is the action class public class RequestViewDetailAction extends ActionBase { public ActionForward execute( ActionMapping mapping, ActionForm frm, HttpServletRequest request, HttpServletResponse response ) { ActionMessages messages = new ActionMessages(); RequestManager m

Re: RE: Validate() method not working as it should !!!!!

2006-04-05 Thread Gary Feidt
Still not enough to analyze - I think your Struts-Config file looks ok. We will probably need some snippets of your co.ui.action.RequestViewDetailAction before we can determine what is wrong. Gary >>> [EMAIL PROTECTED] 4/5/2006 10:17:12 AM >>> Thanks Krishna, Thats the chunk from the struts-con

Re: RE: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
Thanks Krishna, Thats the chunk from the struts-config file. i'm afraid it still doesnt work. when errors are present it displays the errors on the RequestList.jsp page instead of the RequestDetail.jsp. As i said I tried to think, but in vain. any ideas folks? Cheers

Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread Gary Feidt
And I think Dave's point is without seeing your action in your struts-config.xml and you Action code we don't know if your code is correct or not. Can show us some of the code? Gary [EMAIL PROTECTED] 4/5/2006 9:47:27 AM >>> >Hi Dave, > >thanks for the reply. The problem is that errors were

Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
Hi Dave, thanks for the reply. The problem is that errors were detected and they were being displayed in the "success" page instead of on the same ("input" page"). The Log messages also indicate that an error has occured. Very strange. Gokul On Wed, 05 Apr 2006 Dave Newton wrote : >gokul bal

Re: Re: Validate() method not working as it should !!!!!

2006-04-05 Thread gokul balasubramanian
Exactly Ted, Instead of remaining on the input page control passes to the success page. thats what baffles me. Any help/ suggestions will really help. Thanks Gokul On Wed, 05 Apr 2006 Ted Husted wrote : >If validation fails, control returns to "input", not to "success". > >HTH, Ted. > >On 5