You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by johnseitz <se...@pobox.com> on 2002/03/21 19:32:55 UTC
HTML:select multiple=true
I have an object called AreaCode which contains a property called
areaId.
I have an object called AreaDislayBean which contains a property
called areas. This property is an array property which returns
AreaCode[] array.
My <html:select> tag looks like this:
<html:select name="Constants.ADB" property="areas.areaId" >
options tags are here
</html>
Now maybe I'm stupid (which is very possible), but I though that
struts tags could handle this property propagation. But it
consisteny returns an error.
So what I did is make the AreaDisplayBean contain a property called
areaIds which is an array property of Long. After making the change
to the html:select tag to use the property name "areaIds", the
select tag renders correctly.
It just seems odd that I would have to rip apart my AreaCode object
to get to its areaId property. Am I using the tag correctly? Can
someone throw me a bone in the right direction?
Thanks
John
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: HTML:select multiple=true
Posted by Ted Husted <hu...@apache.org>.
It's difficult to tell what the exact problem is without seeing at least
the interface code for the bean you are trying to expose. The tags
access the beans, so the beans are an essential part of the equation.
http://www.tuxedo.org/~esr/faqs/smart-questions.html
-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services
johnseitz wrote:
>
> I have an object called AreaCode which contains a property called
> areaId.
>
> I have an object called AreaDislayBean which contains a property
> called areas. This property is an array property which returns
> AreaCode[] array.
>
> My <html:select> tag looks like this:
> <html:select name="Constants.ADB" property="areas.areaId" >
> options tags are here
> </html>
>
> Now maybe I'm stupid (which is very possible), but I though that
> struts tags could handle this property propagation. But it
> consisteny returns an error.
>
> So what I did is make the AreaDisplayBean contain a property called
> areaIds which is an array property of Long. After making the change
> to the html:select tag to use the property name "areaIds", the
> select tag renders correctly.
>
> It just seems odd that I would have to rip apart my AreaCode object
> to get to its areaId property. Am I using the tag correctly? Can
> someone throw me a bone in the right direction?
>
> Thanks
>
> John
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>