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 Two <st...@yahoo.ca> on 2009/02/08 00:52:41 UTC

How to initialize a List property through action configuration

If I have a property such as

private List<String> myList;
....
....

Is there a way that I can initialize the list through action configuration? I have tried the following:

#action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
    #param name="myList"#  {Alarmed,Open} #/param#
    #result name="success"#  myQueueContent  #/result#
 #/action#

and

#action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
    #param name="myList"#  Alarmed #/param#
    #param name="myList"#  Open     #/param#
    #result name="success"#myQueueContent#/result#
 #/action#

For the last case, the list is initialized with Open [which makes sense as Alarmed gets overwritten, but I just wanted to try].


      __________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca


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


RE: How to initialize a List property through action configuration

Posted by Martin Gainty <mg...@hotmail.com>.
any objections to allocating on the stack
?
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Sat, 7 Feb 2009 19:49:46 -0500
> From: newton.dave@yahoo.com
> To: user@struts.apache.org
> Subject: Re: How to initialize a List property through action configuration
> 
> Please send brand new messages when starting new threads, otherwise the 
> new threads are deeply embedded in existing, different threads.
> 
> http://i43.tinypic.com/3326m44.png
> 
> Dave
> 
> Struts Two wrote:
> > If I have a property such as
> > 
> > private List<String> myList;
> > ....
> > ....
> > 
> > Is there a way that I can initialize the list through action configuration? I have tried the following:
> > 
> > #action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
> >     #param name="myList"#  {Alarmed,Open} #/param#
> >     #result name="success"#  myQueueContent  #/result#
> >  #/action#
> > 
> > and
> > 
> > #action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
> >     #param name="myList"#  Alarmed #/param#
> >     #param name="myList"#  Open     #/param#
> >     #result name="success"#myQueueContent#/result#
> >  #/action#
> > 
> > For the last case, the list is initialized with Open [which makes sense as Alarmed gets overwritten, but I just wanted to try].
> > 
> > 
> >       __________________________________________________________________
> > Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 

_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009

Re: How to initialize a List property through action configuration

Posted by Dave Newton <ne...@yahoo.com>.
Please send brand new messages when starting new threads, otherwise the 
new threads are deeply embedded in existing, different threads.

http://i43.tinypic.com/3326m44.png

Dave

Struts Two wrote:
> If I have a property such as
> 
> private List<String> myList;
> ....
> ....
> 
> Is there a way that I can initialize the list through action configuration? I have tried the following:
> 
> #action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
>     #param name="myList"#  {Alarmed,Open} #/param#
>     #result name="success"#  myQueueContent  #/result#
>  #/action#
> 
> and
> 
> #action name="queueContent" class="ccol.action.queue.QueueRead"   method="getMyQueueContent"#		
>     #param name="myList"#  Alarmed #/param#
>     #param name="myList"#  Open     #/param#
>     #result name="success"#myQueueContent#/result#
>  #/action#
> 
> For the last case, the list is initialized with Open [which makes sense as Alarmed gets overwritten, but I just wanted to try].
> 
> 
>       __________________________________________________________________
> Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
> 
> 
> ---------------------------------------------------------------------
> 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