struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Reddin" <>
Subject FormBean population problem
Date Thu, 01 Jan 1970 00:00:00 GMT
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 null.
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