Did you get an exception in the logs? Sent via BlackBerry from T-Mobile -----Original Message----- From: john lee <sh_thorn_b...@yahoo.com> Date: Wed, 26 Jun 2013 22:13:52 To: struts support<user@struts.apache.org> Reply-To: "Struts Users Mailing List" <user@struts.apache.org> Subject: OGNL s:interator index problem
an class class SearchInfo { String input_part; String search_part; int current_page=0; int total_find=0; int total_pages=0; int size=20; /* set, get ....skip */ } after search, session.put("searchinfo", searchinfo); at jsp, <s:property value="#session.searchinfo.input_part"/> returns xxx <s:property value="#session.searchinfo.total_find"/> returns 208 <s:property value="#session.searchinfo.total_pages"/> returns 11 <s:property value="#session.searchinfo.current_page"/> return 1 at bottom of jsp, i need to provide the page link, such as following if current page is 1, the followign will display 1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15,16,17,18,19 if current page is 22, the following will display 21........................39 so, i use the s:iterator to loop, but never works <s:iterator value="%{#session.searchinfo.current_page}" var="page" begin="(#session.searchinfo.current_page/20)*20+1" end="(#session.searchinfo.current_page/20)+20" status="status" step="1"> <s:property value="#stauts.index"/> </s:iterator> But, it never works for sttut1, i used jsp to implement the above, it is straight forward, but struts2's OGNL looks like more complicate. please advise thanks in advance john --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org