struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satyen.Chi...@ing-barings.com
Subject RE: FormBean population problem
Date Fri, 23 Mar 2001 16:10:10 GMT
try using string instead of Integer.

-----Original Message-----
From: Greg Reddin [mailto:Greg.Reddin@alltel.com]
Sent: Friday, March 23, 2001 3:11 PM
To: struts-user@jakarta.apache.org
Subject: FormBean population problem


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>
</select>

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?

Thanks,
Greg


------------------------------------------------------------------------------
The information in this Internet email is confidential and may be 
legally privileged. It is intended solely for the addressee. Access 
to this Internet email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this Internet email are subject to the terms and conditions
expressed in any applicable governing ING Barings' terms of business or
client engagement letter.

Visit us at www.ingbarings.com

------------------------------------------------------------------------------

Mime
View raw message