You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by yamilka vallejo ramos <ya...@gmail.com> on 2006/09/20 15:59:16 UTC

please, problems with drop down

please did somebody ever test:

<html:select property="orgId" onchange='document.forms[0].submit()'>
      <html:options collection="orgList" property="value"
labelProperty="longName"/>
</html:select>

In this example, the property "value", of the beans in orglist are orgIds
and the "labelProperty" property is the name to display. When you are in
your action class the first time, the orgId string property of your form
bean will be null or blank. In subsequent submissions the orgId property of
your form bean will contain a valid orgId, so that you can look up the list
associated with that value, and thus populate the second drop-down combo box
propery.

and It make tha work?? because I do:

<html:select styleClass="editMediano" property="id" onchange='document.forms
[0].submit()'>
     <html:options collection="gruposConIndicadores" property="value"
labelProperty="nombre" />
</html:select></html:select>

and I just make an error that says:

"No getter method available for property value for bean under name
gruposConIndicadores'"

when I put on the form the Get and set for String id.

please I will prize any kind of help

Re: please, problems with drop down

Posted by Puneet Lakhina <pu...@gmail.com>.
On 9/20/06, yamilka vallejo ramos <ya...@gmail.com> wrote:
>
> please did somebody ever test:
>
> <html:select property="orgId" onchange='document.forms[0].submit()'>
>       <html:options collection="orgList" property="value"
> labelProperty="longName"/>
> </html:select>
>
> In this example, the property "value", of the beans in orglist are orgIds
> and the "labelProperty" property is the name to display. When you are in
> your action class the first time, the orgId string property of your form
> bean will be null or blank. In subsequent submissions the orgId property
> of
> your form bean will contain a valid orgId, so that you can look up the
> list
> associated with that value, and thus populate the second drop-down combo
> box
> propery.
>
> and It make tha work?? because I do:
>
> <html:select styleClass="editMediano" property="id" onchange='
> document.forms
> [0].submit()'>
>      <html:options collection="gruposConIndicadores" property="value"
> labelProperty="nombre" />
> </html:select></html:select>


What sort of objects does your  collection under the name
gruposConIndicadores contain.
Does that object have a getValue() function??

>
and I just make an error that says:
>
> "No getter method available for property value for bean under name
> gruposConIndicadores'"
>
> when I put on the form the Get and set for String id.
>
> please I will prize any kind of help
>
>


-- 
Puneet