I believe it is the get method.
So if you're property is named testProperty then you need a public String
getTestProperty() and a public setTestProperty(String szTestProperty).

When the JSP page is displayed it calls getTestProperty to populate the
value.  When the page is submitted it calls setTestProperty.

I believe if it is protected or private you will get an error that says
there is no property by that name in the form bean.

Also if you are populating lists for a drop down or some other reason you
can use a collection.

public ArrayList getStates()
{
        return Constants.states;
}

<html:options collection="states"/>

Shawn



-----Original Message-----
From: Paul Benedict [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 04, 2006 12:37 AM
To: user@struts.apache.org
Subject: Struts Form Population

When struts auto populates the form, does it look for set methods? And  does
it check that the methods are public? For instance, if the "foo"  parameter
comes in and my setFoo method is protected or private, will  it ignore it?
  
  Paul
  
                
---------------------------------
Brings words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to