dcsimg
Returning the selected value from an <html:select>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   josef_richberg
Posted On:   Tuesday, March 26, 2002 06:04 AM

I have the following code snippet: type="java.util.Collection"/> then below I have a getter method in my Action form: public Collection getVname(){ return new DBAccess().getVendorNames(); } The problem is if I try to set the result of the selection via this method in the action form: public void setVname(String value){ xxxxxx } it errors with: No getter method for property vname of bean ProdAddForm How do I retrieve the lone value of the select? --josef    More>>

I have the following code snippet:

			

type="java.util.Collection"/>


then below

			





I have a getter method in my Action form:

			
public Collection getVname(){
return new DBAccess().getVendorNames();
}


The problem is if I try to set the result of the selection via this method in the action form:

			
public void setVname(String value){
xxxxxx
}


it errors with:


No getter method for property vname of bean ProdAddForm

How do I retrieve the lone value of the select?

--josef    <<Less

Re: Returning the selected value from an &lt;html:select&gt;

Posted By:   Cedric_Dupont  
Posted On:   Tuesday, March 26, 2002 08:07 AM

You need to implement the getter method as well:


public String getVname(){

xxxxxx

}



just like the error message says ;)

Indeed, you might not want to use the same name for the Collection getter and the selected value getter/setter.

You can eventualy use two different ActionForms.

I hope this helps...
About | Sitemap | Contact