开发者

struts 2 iterator print the next value

开发者 https://www.devze.com 2023-02-07 10:00 出处:网络
I got a List of type string with values say for example List str = {\"start\", \"hi\", \"h开发者_开发问答ello\", \"start\", \"hello\", \"hi\"}

I got a List of type string with values say for example

List str = {"start", "hi", "h开发者_开发问答ello", "start", "hello", "hi"}

If value is start i want to print the next iterator value.


You can obtain the current value's index from the status object:

<s:iterator value="str" status="stat">
    <p>After <s:property/> comes <s:property value="str[#stat.index+1]"/>
</s:iterator>
0

精彩评论

暂无评论...
验证码 换一张
取 消