Note that I did not write that you should override doValidate or doExecute, but rather 
validate and execute.
If you look in the ActionSupport class you will notice that first it implements the 
execute method (the Action interface).
That method then calls the validate() method. The validate method calls the empty 
doValidation method (that you are supposed to override) and then calls invalidInput to 
check for errors. Also note that invalidInput is slightly different than just calling 
getHasErrors as you did, because it also calls getHasErrorMessages.

I may be wrong but I still suggest you override the validate method to see if that 
helps you and then check your parameters. Also try overriding the execute method to 
make sure your action is invoked at all.
You can also override the addIllegalArgumentException method and put some log 
statements there. That method will be called in case property editors cannot handle 
the parameters.
If none of this helps then we can look at other possibilities (I do not know which 
ones right now though!)

Cheers,

Dick

[EMAIL PROTECTED]

----- Original Message ----- 
From: "G.L. Grobe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 23, 2003 12:48 AM
Subject: Re: [OS-webwork] no view for result [input]


> This is driving me nuts ... I have no validate method in here and do my  
> validation from the doExecute() because of the complexity of my forms.  
> PropertyEditors and doValidation made things more complicated because  
> of my forms, and I know I have a bit more overhead, but it was simpler  
> ...
> 
> There are several steps (several form pages) to fill out before  
> submitting a complete forms data to my EJB. Because the forms can be  
> lengthy or I'd like them to fit on the screen rather than long scrolls  
> or I'd like to break them up into sections ... my doExecute looks  
> something like this ... (the view is passed in the URL) ...
> 
>    public String doExecute() throws Exception {
>        log.info(InitBuildForm.class, "view = " + getView());
> 
>        if (view.equals("ex.myFirstPage")) {
>           setSession(session);
>           ...
>           session.put("bInfo", bInfo);
>           return "first.success";
>        }
>        else if (view.equals("ex.mySecondPage")) {
>           setSession(session);
>           ...
>           session.put("bInfo", bInfo);
>           return "second.success";
>        }
>        else if (view.equals("ex.myLastPage")) {
>           ...
>           Context ctx = new InitialContext();
>           Object result = ctx.lookup("java:comp/env/...
> 
> 
> At the end of each one of these views, I do a getHasErrors() and I see  
> that I've added no errors, yet I still get that behavior of an INPUT  
> being returned. So then I did add an empty doValidate() w/ a  
> getHasErrors() inside it, and still saw no errors added. And yet my  
> doExecute isn't being called and INPUT is being returned ... any ideas?
> 
> On Sunday, Jun 22, 2003, at 11:35 US/Central, Dick Zetterberg wrote:
> 
> > It is probably the validate method that returns INPUT. Perhaps some of  
> > the
> > values you are submitting cannot be set with the property editors  
> > (null or
> > empty values when you expect int for example).
> > You can for example override the execute method and log the parameters  
> > to
> > study them and then call super.execute.
> > Or you can override the validate method with an empty method, and if I  
> > am
> > right you will not get the HTTP Error message then (but you probably  
> > want to
> > fix your form/parameters anyway).
> >
> > Cheers,
> >
> > Dick
> > [EMAIL PROTECTED]
> >
> > ----- Original Message -----
> > From: "G.L. Grobe" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, June 22, 2003 1:21 AM
> > Subject: [OS-webwork] no view for result [input]
> >
> >
> >> I'm using WW 1.3 and trying to submit a form w/ the following url ...
> >>
> >> http://192.168.0.10:8080/acaiis/ 
> >> forms.InitMyForm.action?view=myform.done
> >>
> >> And it immediately returns a blank page w/ the following result ...
> >>     HTTP ERROR: 404 No view for result [input] exists for action
> >> [forms.InitMyForm]
> >>
> >> What I don't understand is that I don't even see it entering my action
> >> (ActionSupport) class where I'm looking to see what view string it's
> >> returning. I don't use any input properties in my view.properties  
> >> file,
> >> just my own success and error strings.
> >>
> >> Anyone have ideas on what might be happening here, or how to debug  
> >> this?
> >>



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to