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
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
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 )
Gary Feidt wrote:
> Where is your Validation? I don't see any protected ActionMessages
> validate(iForm theform) {}
>
Also, what class does your form sub-class?
> error = validate(theform);
>
He has validate="true" which, if the form has a proper superclass,
should do validation automagic
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
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
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
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
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
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
gokul balasubramanian wrote:
> Instead of remaining on the input page control passes to the success page.
> thats what baffles me. Any help/ suggestions will really help.
>
Sounds like there weren't any errors then, or your configuration is
broken, or your validation code is broken, or...
Wit
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
If validation fails, control returns to "input", not to "success".
HTH, Ted.
On 5 Apr 2006 14:18:10 -, gokul balasubramanian
<[EMAIL PROTECTED]> wrote:
>
> I have a very weird problem here. I have a form-bean where i validate the
> user input and add them to the errors. When i click the sub
13 matches
Mail list logo