Struts - problem with select

C

cc

Hi,
Inside my Action class I try to read all value of a select.
The select it is filled up from an other html window.

My tag select is:

<html:select property="operaCentri" size="1">
<html:eek:ptionsCollection name="operaForm" property="operaCentri"/>
</html:select>

(Note: operaForm is my ActionForm class)


Inside my ActionForm class I create:
1) a Collection property;
2) get e set methods.

private Collection operaCentri = null;
public Collection getOperaCentri()
{
if(this.operaCentri==null)
return new Vector();
return this.operaCentri;
}
public void setOperaCentri(Collection value)
{
this.operaCentri = value;
}

In execute() method, inside my Action class, the getOperaCentri method
return always "null":
OperaForm operaForm=(OperaForm) form;
Collection col = form.getOperaCentri();

Where it is the error?

thank you for help.
By,
Carlo

P.S. Excuse my ugly English.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,112
Latest member
BrentonMcc
Top