?
=?iso-8859-1?q?Jos=E9_Antonio?=
Hi,
I'm having trouble with struts, well actually i don't know if the
problem is struts or instead i'm assuming html to be capable of
something it's not.
I have a ValidatorForm, say VF and one of it's attibutes called
organismo is an object of type Ob1, Ob1 being a bean definded in
another file, Ob1 has just two attributes a and b and their respective
setters and getters. I want that attribute to be filled with the value
of a <html:select>, depending on what the user chooses from the options
available.
To get the options i'm using the next:
<html:select property="organismo">
<htmlptions collection="ListaOrganismos" property="id"
labelProperty="desFederacion"/>
</html:select>
where:
* organismo is the attribute (itself is a bean object) in my form
(struts validator form)
* ListaOrganismos is an ArrayList of objects (plain java beans), say
Ob0, with just two attributes: 1) id: an object of type Ob1,
2) desFederacion: a descriptive label
The problem is, when i submit the form, i cannot get the value of the
option (an Object of type Ob1 gotten from property="id") passed to the
next Action... if i try with primitives, there's no problem...
everything works as it should... but with an object... it just does not
work.
I have my mappings up an working... when i go to the next Action, i can
get all the other attributes from my form except for this one.
The labels are shown as i expected them to be shown... i drop the list
and there they are... that makes me think struts does understand the id
i give it... but just can't get it passed to the action...
Any idea of what could be happening? I'm thinking it's just i'm not
allowed to pass an object and i'm restricted to use primitives... but
i'm not sure...
I'll greatly apreciate if you guys could help me a little... i'm
stuck... thanks in advance.
I'm having trouble with struts, well actually i don't know if the
problem is struts or instead i'm assuming html to be capable of
something it's not.
I have a ValidatorForm, say VF and one of it's attibutes called
organismo is an object of type Ob1, Ob1 being a bean definded in
another file, Ob1 has just two attributes a and b and their respective
setters and getters. I want that attribute to be filled with the value
of a <html:select>, depending on what the user chooses from the options
available.
To get the options i'm using the next:
<html:select property="organismo">
<htmlptions collection="ListaOrganismos" property="id"
labelProperty="desFederacion"/>
</html:select>
where:
* organismo is the attribute (itself is a bean object) in my form
(struts validator form)
* ListaOrganismos is an ArrayList of objects (plain java beans), say
Ob0, with just two attributes: 1) id: an object of type Ob1,
2) desFederacion: a descriptive label
The problem is, when i submit the form, i cannot get the value of the
option (an Object of type Ob1 gotten from property="id") passed to the
next Action... if i try with primitives, there's no problem...
everything works as it should... but with an object... it just does not
work.
I have my mappings up an working... when i go to the next Action, i can
get all the other attributes from my form except for this one.
The labels are shown as i expected them to be shown... i drop the list
and there they are... that makes me think struts does understand the id
i give it... but just can't get it passed to the action...
Any idea of what could be happening? I'm thinking it's just i'm not
allowed to pass an object and i'm restricted to use primitives... but
i'm not sure...
I'll greatly apreciate if you guys could help me a little... i'm
stuck... thanks in advance.