You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Seshagiri V <se...@kensium.com> on 2009/02/11 13:47:07 UTC

How to array variable declared to set tag

Hi All,

 

Here is a snippet of my code in the jsp:

 

<s:iterator value="%{sortPoPs((#alltask).childPoPs)}" status="status"
id="allChilds">

                                          

      <s:set name="id[#status.index]" value="%{(#allChilds).id}"/>

 

</s:iterator>

In set tag, declared single variable it is working fine but used declared
array variable  it is not working fine and also given size zero.

 

Pl helps me. How to approaching above snippet of my code. 

 

Thank you,

Seshagiri V

seshagiriv@kensium.com. 

 

US Main: 877 KENSIUM (536.7486)

US Fax:   312.242.3029

 

Kensium

200 S Wacker Dr, Suite 3100

Chicago, IL 60606

 

Confidentiality Note:

-----------------------------

The information contained in this e-mail is strictly confidential and for
the intended use of the addressee only. Any disclosure, use or copying of
the information by anyone other than the intended recipient is prohibited.

If you have received this message in error, please notify the sender
immediately by return e-mail and securely discard this message.

 

 


RE: How to array variable declared to set tag

Posted by Seshagiri V <se...@kensium.com>.
Hi,
Thanks for replied to my mail.

In set tag name is single variable (parameter) fine.
We are given name is array or list array as id [#status.index] it is not
working.

<s:set name="id"  like as string variable and working fine
<s:property value="#id"/> this expression fine
But it is not working follows code.
<s:set name="id[]"  like as string variable and working fine
<s:property value="#id"/> this expression not working

Is it possible declared array of set tag?

Pl How to approaching this code.
 
Thank you,
Seshagiri V
seshagiriv@kensium.com. 
 
US Main: 877 KENSIUM (536.7486)
US Fax:   312.242.3029
 
Kensium
200 S Wacker Dr, Suite 3100
Chicago, IL 60606
 
Confidentiality Note:
-----------------------------
The information contained in this e-mail is strictly confidential and for
the intended use of the addressee only. Any disclosure, use or copying of
the information by anyone other than the intended recipient is prohibited.
If you have received this message in error, please notify the sender
immediately by return e-mail and securely discard this message.
 
 
-----Original Message-----
From: Sonny Gill [mailto:sonny.public@gmail.com] 
Sent: Thursday, February 12, 2009 8:11 AM
To: Struts Users Mailing List
Subject: Re: How to array variable declared to set tag

Is the set tag even supposed to work like that?
>From looking at the docs
(http://struts.apache.org/2.0.14/docs/set.html), it doesn't seems so.
I didn't try it, but I would expect it to assign the value to a
parameter named 'id[#status.index]' without evaluating that
expression.

In any case, wouldn't it be simpler to do this assignment in your action
class?


On Wed, Feb 11, 2009 at 8:47 PM, Seshagiri V <se...@kensium.com> wrote:
> <s:iterator value="%{sortPoPs((#alltask).childPoPs)}" status="status"
> id="allChilds">
>
>
>
>      <s:set name="id[#status.index]" value="%{(#allChilds).id}"/>
>
>
>
> </s:iterator>
>
> In set tag, declared single variable it is working fine but used declared
> array variable  it is not working fine and also given size zero.
>

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

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.234 / Virus Database: 270.10.23/1947 - Release Date: 02/11/09
18:11:00


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


Re: How to array variable declared to set tag

Posted by Sonny Gill <so...@gmail.com>.
Is the set tag even supposed to work like that?
>From looking at the docs
(http://struts.apache.org/2.0.14/docs/set.html), it doesn't seems so.
I didn't try it, but I would expect it to assign the value to a
parameter named 'id[#status.index]' without evaluating that
expression.

In any case, wouldn't it be simpler to do this assignment in your action class?


On Wed, Feb 11, 2009 at 8:47 PM, Seshagiri V <se...@kensium.com> wrote:
> <s:iterator value="%{sortPoPs((#alltask).childPoPs)}" status="status"
> id="allChilds">
>
>
>
>      <s:set name="id[#status.index]" value="%{(#allChilds).id}"/>
>
>
>
> </s:iterator>
>
> In set tag, declared single variable it is working fine but used declared
> array variable  it is not working fine and also given size zero.
>

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