struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lentz <ericle...@outfastsource.com>
Subject Re: usage of ${...}
Date Tue, 15 Jan 2013 16:51:55 GMT
It appears that the relevant portion of your code example is this:
<li id="user-<s:property value="#user.id"/>-${id}">

#user.id gives you the id, right? Do you want it twice?

You also have  <s:iterator value="#request.users" var="user">
Did you put "request" into the context? The typical pattern would be to
have "users" on the ValueStack by way of your action class which has a
private field called "users" (presumably type List<User>, or similar), and
a getter for users.

#user.id looks okay within the property tag assuming that the source you
are iterating over is available. ${id} should not be available unless you
have such a field in your action (but it would be the same for each
iteration). That said, I don't really use ${} very much, so YMMV.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message