struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cecil Pang" <>
Subject Re: FormBean population problem
Date Fri, 23 Mar 2001 16:33:04 GMT
Don't you have to define the setter to take a String?

setSearchCriteria(String searchCriteria)

At 09:11 AM 3/23/2001 -0600, you wrote:
>Forgive me if this has been addressed before.
>I have something like the following in my request form:
><select name="searchCriteria">
>   <option value="1">Option 1</option>
>   <option value="2">Option 2</option>
>   <option value="3">Option 3</option>
>My Form bean looks like this:
>private Integer searchCriteria = null;
>public setSearchCriteria(int searchCriteria)
>    this.searchCriteria = new Integer(searchCriteria);
>public Integer getSearchCriteria()
>    return this.searchCriteria;
>The problem is that even though the "searchCriteria" parameter is being 
>sent to
>me in the request, the bean is not being populated.  What am I missing here?
>Here's some background:
>1)  We need the get method of the bean to return an Integer, so it can be 
>2)  We use XSL as our output format instead of JSP, so the bean is never
>      used from a <useBean> tag.
>Any ideas of why this is not being populated?

View raw message