struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haulyn R. Jason" <saharab...@gmail.com>
Subject Re: How to resolve list property for ModelDriven Action?
Date Tue, 12 Aug 2008 02:54:15 GMT
Dave Newton :
> Oh. So what are you asking then? How to create a select list? How to use the <s:select...>
tag? 
>
> Dave
>
> --- On Mon, 8/11/08, Haulyn R. Jason <saharabear@gmail.com> wrote:
>
>   
>> From: Haulyn R. Jason <saharabear@gmail.com>
>> Subject: Re: How to resolve list property for ModelDriven Action?
>> To: "Struts Users Mailing List" <user@struts.apache.org>
>> Date: Monday, August 11, 2008, 12:35 PM
>> Dave Newton :
>>     
>>> --- On Mon, 8/11/08, Haulyn R. Jason
>>>       
>> <saharabear@gmail.com> wrote:
>>     
>>>   
>>>       
>>>> I implement ModelDriven interface, but I have a
>>>>         
>> list in my
>>     
>>>> model. It
>>>> looks like:
>>>> public class Role(){
>>>> private String id;
>>>> private String name ;
>>>> private List<Privilege> privilegeList;
>>>> }
>>>>
>>>> In my action, I have a set/get method for Role
>>>>         
>> Object, but
>>     
>>>> what about the list?
>>>>     
>>>>         
>>> You don't need a separate method for the list; if
>>>       
>> you're using ModelDriven you'd get it, for example,
>> by using:
>>     
>>> <s:iterator value="privilegeList">
>>>   ...
>>>
>>> The model (when not null) is pushed onto the top of
>>>       
>> the stack. If you weren't using ModelDriven and had a
>> getter for role:
>>     
>>> <s:iterator
>>>       
>> value="role.privilegeList">
>>     
>>>   ...
>>>
>>>
>>> Dave
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail:
>>>       
>> user-unsubscribe@struts.apache.org
>>     
>>> For additional commands, e-mail:
>>>       
>> user-help@struts.apache.org
>>     
>>>   
>>>       
>> Thanks Dave, but
>> It's a form, I want to use <select
>> multiple="true" > or the similar ui 
>> tags for modifying it. So how can I retrieve data from
>> form?
>>
>> -- 
>>
>> Thanks!
>>
>> Mobile: +086-15864011231
>> EMail&gtalk:saharabear@gmail.com
>> EMail&yahoo:jia_haolin@yahoo.com
>> Skype:saharabear
>>
>>
>> Haulyn Runner Jason
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>   
Hi, Dave
Sorry for my poor English, I am not english speaking.
I mean , I know how to populate data to a select tag, and I know how to 
collection data from a select tag, but the problem is:
If the list I want to collection from select tag is not a simple data 
type(String), but it's another object, how can I do that?

Thanks


-- 

Thanks!

Mobile: +086-15864011231
EMail&gtalk:saharabear@gmail.com
EMail&yahoo:jia_haolin@yahoo.com
Skype:saharabear


Haulyn Runner Jason


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


Mime
View raw message