struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: How can these query data be got?
Date Tue, 02 Dec 2008 10:34:02 GMT
--- On Tue, 12/2/08, KE LI wrote:
>   public class welcome implements Action {
>        private List paramList;
>        setters....
>        public String execute() throws Exception {
>             paramList = new ArrayList();
>             return SUCCESS;
>        }
>   }
> 
> Then if I input the URL:
> xxx/welcome.do?param1=hello&param2=world&paramList=element1&paramList=element2&paramList=...
>   I found that param1 will be given the value "hello", param2 
> will be given the value "world" but of course paramList will
> not be given element1,2,3...etc. I want to ask: [...]

The first issue I see is that you're creating a new list in the execute() method. The execute()
method is executed after the interceptors set the action properties from the form data--so
you're wiping out the work the interceptors did.

Dave


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


Mime
View raw message