Thanks Dave, that was a very enlightening suggestion, i'm using <s:iterator> right now. One thing remains: After </s:iterator>, i need to know if the iterator that was processed previously delivered rows or not. How would i accomplish this?

Robert

Dave Newton wrote:
--- On Wed, 12/17/08, Robert Graf-Waczenski wrote:
As a workaround, i must use the page context, like so here:

It's not a work-around, that's just how JSP works--you're making more work than 
necessary by mixing paradigms: either use all scriptlets and do things the old 
way, or use the currently-available constructs and clean it up.

It'd also be easier to understand (visually) if there was a simpler way to get 
the item in the list you're using for the param and link: iterating over the 
list would be less cumbersome if you weren't using the getEntry(row, 0) thing 
and instead using OGNL to access the list item's value:

<s:iterate value="#attr.plugh" id="entry" status="stat">
  <tr class="...">
    <td></td>
    <td class="...">
      <s:url id="entryUrl" action="delete">
        <s:param name="mEntry" value="#entry[0]"/>
      </s:url>

      <a href="<s:property value="#entryUrl"/>">
        <s:property value="#entry[0]"/>
      </a>
    </a>
    </td>
  </tr>
</s:iterate>

With clever CSS classnames you can also reduce the <tr...> to something like:

<tr class="cell<s:property value="#stat.even"/>"> or whatever.

Dave


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



Reply via email to