You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/06/29 05:25:02 UTC
question on the SELECT OPTIONS
Subject: question on the SELECT OPTIONS
From: "Gary Tam" <ga...@rogers.com>
===
Hi, I hope it is a simple question. Most of the examples I have seen using
the OPTIONS is to get a collection of beans and display the values we want
to show up on the jsp as "labelProperty" and its actual value in property.
<html:select property="rolesList" multiple="true" >
<html:options collection="<%=Constants.ROLES_TABLE_KEY %>"
property="roleId"
labelProperty="roleDescription"/>
</html:select>
But if I have a single java bean that contains an arrayList of java bean
that I would like to use for the property and labelProperty, can it be done.
The bean will have property such as
public final class User implements Serializable
{
String userName;
ArrayList userRole; ...
Right now, I have the USER bean store as a session attribute and also store
the userRole as an arrayList in a session attribute just so that the jsp
would work. Is it possible to reference the userRole arrayList in user bean
instead of storing the userRole as a seperate session attribute ?
Thanks
Gary
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>