Sorry, I missed the "After </s:iterator>" portion...

Beez
( 4961 

-----Original Message-----
From: Robert Graf-Waczenski [mailto:r...@lsoft.com] 
Sent: Wednesday, December 17, 2008 11:33 AM
To: Struts Users Mailing List
Subject: Re: [S2 V2.0.14] <s:param> value attribute has rtexprvalue=false - 
shouldn't it be rtexprvalue=true? - [SOLVED]

Yes, thanks, this works. I was hoping that the IteratorStatus is still 
available also after </s:iterator>, but apparently this is not so.

Robert

Paweł Wielgus wrote:
> Hi Robert,
>
> <s:iterator value="list">
> -- write iterator row details
> </s:iterator>
> <s:if test="list.size() < 1">
> -- message that iterator did not deliver rows goes here </s:if>
>
> Best greetings,
> Paweł Wielgus.
>
>
>
> 2008/12/17 Robert Graf-Waczenski <r...@lsoft.com>:
>   
>> This does not sound like what i'm after. I need something like this:
>>
>> <s:iterator>
>> -- write iterator row details
>> </s:iterator>
>> <s:if test="true if the iterator above did not deliver any rows>
>> -- message that iterator did not deliver rows goes here </s:if>
>>
>> Robert
>>
>>
>> Biesbrock, Kevin wrote:
>>     
>>> In your iterator, the status attribute defined (e.g., status="stat" 
>>> in your case) is an object of type "IteratorStatus".  It has methods
>>> defined: getCount, getIndex, isEven, isFirst, isLast, isOdd, and 
>>> modulus.  You could check isLast to find the last row (e.g., 
>>> stat.isLast == true).
>>>
>>>
>>> Beez
>>> ( 4961
>>> -----Original Message-----
>>> From: Robert Graf-Waczenski [mailto:r...@lsoft.com] Sent: Wednesday, 
>>> December 17, 2008 10:27 AM
>>> To: Struts Users Mailing List
>>> Subject: Re: [S2 V2.0.14] <s:param> value attribute has 
>>> rtexprvalue=false - shouldn't it be rtexprvalue=true? - [SOLVED]
>>>
>>> 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
>>>>
>>>>
>>>>
>>>>         
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>>
>>>       
>>     
>
>
>   



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

Reply via email to