You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Pratt <th...@gmail.com> on 2008/01/08 20:39:02 UTC

[S2] Using with a static list

I'm trying to get something working that is taken almost directly from
the iterator documentation.  The documentation shows this example:

<s:iterator status="stat" value="{1,2,3,4,5}" >
   <!-- grab the index (start with 0 ... ) -->
   <s:property value="#stat.index" />

   <!-- grab the top of the stack which should be the -->
   <!-- current iteration value (0, 1, ... 5) -->
   <s:property value="top" />
</s:iterator>

which is actually more complicated than I need.  All I need is a
collection of links from A - Z, so using the above code as a guide, I
tried:

<s:iterator value="{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}">
  <a href="<s:url action='member-list'><s:param
name='lname'><s:property value="top"/></s:param></s:url>"><s:property
value="top"/></a>&nbsp;
</s:iterator>

But the values are not getting populated.  It appears to be iterating,
but not making the values available.  I've also tried using
<s:property/>, <s:property value="%{top}"/>, setting id="ch" on the
iterator and using <s:property value="#ch"/>, but nothing seems to be
able to retrieve the value.  Any idea what I'm doing wrong?
  (*Chris*)

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


[S2.1] How to eliminate many Warning messages like...?? -- Thanks

Posted by Keith Davis <KD...@WSGC.com>.
Jan 8, 2008 12:12:37 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [struts.valueStack]
Jan 8, 2008 12:12:37 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [org.apache.catalina.jsp_file]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [#attr.templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [#attr.theme]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [#attr.templateDir]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Jan 8, 2008 12:12:40 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [#attr.theme]

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


Re: [S2] Using with a static list

Posted by Chris Pratt <th...@gmail.com>.
On Jan 8, 2008 12:11 PM, Dave Newton <ne...@yahoo.com> wrote:
> Wouldn't you need to quote strings?
>
Well, I wouldn't say that was obvious from the example given, but this
did seem to get the job done:

<s:iterator value='{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}'>
  <a href="<s:url action='member-list'><s:param
name='lname'><s:property/></s:param></s:url>"><s:property/></a>&nbsp;
</s:iterator>

Thanks.
  (*Chris*)

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


Re: [S2] Using with a static list

Posted by Dave Newton <ne...@yahoo.com>.
Wouldn't you need to quote strings?

d.

--- Chris Pratt <th...@gmail.com> wrote:

> I'm trying to get something working that is taken almost directly from
> the iterator documentation.  The documentation shows this example:
> 
> <s:iterator status="stat" value="{1,2,3,4,5}" >
>    <!-- grab the index (start with 0 ... ) -->
>    <s:property value="#stat.index" />
> 
>    <!-- grab the top of the stack which should be the -->
>    <!-- current iteration value (0, 1, ... 5) -->
>    <s:property value="top" />
> </s:iterator>
> 
> which is actually more complicated than I need.  All I need is a
> collection of links from A - Z, so using the above code as a guide, I
> tried:
> 
> <s:iterator value="{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}">
>   <a href="<s:url action='member-list'><s:param
> name='lname'><s:property value="top"/></s:param></s:url>"><s:property
> value="top"/></a>&nbsp;
> </s:iterator>
> 
> But the values are not getting populated.  It appears to be iterating,
> but not making the values available.  I've also tried using
> <s:property/>, <s:property value="%{top}"/>, setting id="ch" on the
> iterator and using <s:property value="#ch"/>, but nothing seems to be
> able to retrieve the value.  Any idea what I'm doing wrong?
>   (*Chris*)
> 
> ---------------------------------------------------------------------
> 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