You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Murali Challa <ch...@gmail.com> on 2025/02/19 09:00:23 UTC

Understand usage of tag inside

Hi,

Can someone suggest among below which is best/preferred way of using
<s:properly /> tag with in <s:iterator/>.


<s:iterator value="#session.userList" var="user">

  <s:property value="#user.name" /> //getting value using var.name
  <s:property value="name" /> // getting value directly using name

</s:iterator>

Both are working but just wanted to know which is more preferred to use.

Re: Understand usage of tag inside

Posted by Greg Huber <gr...@gmail.com>.
Probably ask the user list for this.

But, #user.name as it won't be searching the stack for the property.

On 19/02/2025 09:00, Murali Challa wrote:
> Hi,
>
> Can someone suggest among below which is best/preferred way of using
> <s:properly /> tag with in <s:iterator/>.
>
>
> <s:iterator value="#session.userList" var="user">
>
>    <s:property value="#user.name" /> //getting value using var.name
>    <s:property value="name" /> // getting value directly using name
>
> </s:iterator>
>
> Both are working but just wanted to know which is more preferred to use.
>

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


Re: Understand usage of tag inside

Posted by Lukasz Lenart <lu...@apache.org>.
I would use just "name" as well but I didn't check which options is
faster in accessing ValueStack, yet it shouldn't matter IMHO

śr., 19 lut 2025 o 12:35 M Huzaifah <mh...@gmail.com> napisał(a):
>
> Hii,
>
> I prefered use the second one. Just use "name"
>
> Regards
>
> On Wed, Feb 19, 2025, 5:25 PM Murali Challa <ch...@gmail.com> wrote:
>
> > Hi,
> >
> > Can someone suggest among below which is best/preferred way of using
> > <s:properly /> tag with in <s:iterator/>.
> >
> >
> > <s:iterator value="#session.userList" var="user">
> >
> >   <s:property value="#user.name" /> //getting value using var.name
> >   <s:property value="name" /> // getting value directly using name
> >
> > </s:iterator>
> >
> > Both are working but just wanted to know which is more preferred to use.
> >

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


Re: Understand usage of tag inside

Posted by M Huzaifah <mh...@gmail.com>.
Hii,

I prefered use the second one. Just use "name"

Regards

On Wed, Feb 19, 2025, 5:25 PM Murali Challa <ch...@gmail.com> wrote:

> Hi,
>
> Can someone suggest among below which is best/preferred way of using
> <s:properly /> tag with in <s:iterator/>.
>
>
> <s:iterator value="#session.userList" var="user">
>
>   <s:property value="#user.name" /> //getting value using var.name
>   <s:property value="name" /> // getting value directly using name
>
> </s:iterator>
>
> Both are working but just wanted to know which is more preferred to use.
>

Understand usage of tag inside

Posted by Murali Challa <ch...@gmail.com>.
Hi,

Can someone suggest among below which is best/preferred way of using
<s:properly /> tag with in <s:iterator/>.


<s:iterator value="#session.userList" var="user">

  <s:property value="#user.name" /> //getting value using var.name
  <s:property value="name" /> // getting value directly using name

</s:iterator>

Both are working but just wanted to know which is more preferred to use.