Re: [S2] Indexed Lists

2008-12-23 Thread norken76
...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/-S2--Indexed-Lists-tp19455272p21148710.html Sent from the Struts - User mailing list archive at Nabble.com

[S2] Indexed Lists

2008-09-12 Thread Roger
Hi I'm trying to get indexed lists working so that I can get any amendments back into my model. At the moment I've got s:form s:iterator value=valueables status=status s:set name=count value=%{#status.index + 1}/ s:textfield name=valueables[%{#status.index}].text value=%{text}/

Re: [S2] Indexed Lists

2008-09-12 Thread Jeromy Evans
Roger wrote: Hi I'm trying to get indexed lists working so that I can get any amendments back into my model. At the moment I've got In the last line, did you confirm that count has the correct value? What if the list is empty? (in that case count has never been set) s:textfield

Re: [S2] Indexed Lists

2008-09-12 Thread Roger
On Friday 12 September 2008 16:18:02 Jeromy Evans wrote: Roger wrote: Hi I'm trying to get indexed lists working so that I can get any amendments back into my model. At the moment I've got In the last line, did you confirm that count has the correct value? Yes, I've confirmed that

Re: [S2] Indexed Lists

2008-09-12 Thread Roger
On Friday 12 September 2008 16:18:02 Jeromy Evans wrote: In the last line, did you confirm that count has the correct value? What if the list is empty? (in that case count has never been set) s:iterator /s:iterator s:if test = %{count}/ s:else s:set name=count value=0/ /s:else

Re: [S2] Indexed Lists

2008-09-12 Thread Dave Newton
--- On Fri, 9/12/08, Roger wrote: s:iterator /s:iterator s:if test = %{count}/ s:else s:set name=count value=0/ /s:else How about losing the seemingly-unnecessary count? s:set name=count value=0/ s:iterator ... s:set name=count value=count+1/ ... /s:iterator Dave