You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Deepika Appana <de...@gmail.com> on 2008/07/28 20:13:26 UTC

Struts 2 select tag

Hi,

I am a newbie to struts 2. I have a question about the struts 2 select tag.

When I try to use a property defined in package.properties for the "list",
For Eg:

<s:select label="Names" list="project.names"/>

(project.names is defined in the package.properties)
i get an exception that states that the project.names is not a enumeration
or map. I am wondering why it does not evaluate to the list that I have
defined in the properties file.

Thanks,

D

Re: Struts 2 select tag

Posted by Paweł Wielgus <po...@gmail.com>.
Hi,
insert <s:property value="project.info"/> instead select tag, it might
give You some more info.
Best greetings,
Pawel Wielgus.

On 28/07/2008, Deepika Appana <de...@gmail.com> wrote:
> Hi,
>
> I am a newbie to struts 2. I have a question about the struts 2 select tag.
>
> When I try to use a property defined in package.properties for the "list",
> For Eg:
>
> <s:select label="Names" list="project.names"/>
>
> (project.names is defined in the package.properties)
> i get an exception that states that the project.names is not a enumeration
> or map. I am wondering why it does not evaluate to the list that I have
> defined in the properties file.
>
> Thanks,
>
> D
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 select tag

Posted by srini vasan <sr...@gmail.com>.
Hi,
If you are trying to retrieve the arraylist data assigned in the action u
need to do the following.
If this is ur problem try the below code

For ex :

private ArrayList aldata;//ArrayList declaration

and in jsp u need to add it as

<s:select label="names" list="aldata"/>




On Mon, Jul 28, 2008 at 11:43 PM, Deepika Appana
<de...@gmail.com>wrote:

> Hi,
>
> I am a newbie to struts 2. I have a question about the struts 2 select tag.
>
> When I try to use a property defined in package.properties for the "list",
> For Eg:
>
> <s:select label="Names" list="project.names"/>
>
> (project.names is defined in the package.properties)
> i get an exception that states that the project.names is not a enumeration
> or map. I am wondering why it does not evaluate to the list that I have
> defined in the properties file.
>
> Thanks,
>
> D
>