Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with html:select property and HashMap

 
nesto costa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i have a languageImpl.java that has a HashMap<String,String> langs where the key is for example "EN" and the value "ENGLISH".
this HashMap is filled with keys and values from a database by this method public void getLangSet().
then, i have a myForm where i do the following:

LanguageImpl l=new LanguageImpl();
l.getLangSet();
request.setAttribute("test",l.getLangs()); where l.getLangs() returns the HashMap<String,String> langs

then in my jsp i have

<html:select property="xxx">
<htmlptions collection="test" property="key" labelProperty="value" />
</html:select>

now my problem is this, no matter what value i put in the property of html:select, i always get the same error:

javax.servlet.jsp.JspException: No getter method available for property xxx for bean under name org.apache.struts.taglib.html.BEAN

i'm having trouble understanding what is this property and what it does...
can anyone help me?

thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the <html:select...> docs:

Name of the request parameter that will be included with this submission, set to the specified value.


In a nutshell, it's the name of the parameter that will be submitted, and the name of the ActionForm property that will be filled by the framework.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic