On Sat, Apr 30, 2011 at 8:00 AM, Richard Hill <r...@su3analytics.com> wrote: > > You need to do the addition in java, something like: > > public String getIndexValue() { > return "" + (count + 1); > } >
or just: public int getIndexValue() { return count + 1; } Tapestry will quite happily do the int-to-string coercion automatically. > and in .tml > > ${indexValue} > > > returning an int will prob work too. > > > On Sat, 2011-04-30 at 18:56 +0400, Amr Mohamed Mahmoud Hassanien wrote: >> Hi All, >> >> In the Code below, I want to type the order of the images starting from 1, >> as you know the index of the loop component starts from zero. >> Now the expression ${count+1} does not work either ${count}. Do you know >> any alternative? >> >> <t:loop source="images" value="image" index="count"> >> <fieldset class="file file"> >> <div class="image"> >> ${count}+1 >> </div> >> </fieldset> >> </t:loop> >> >> Thanks in advance, >> Amr Hassanin >> >> ################################################################################################################ >> DISCLAIMER: >> This message is for the named person's use only. It may contain confidential >> information, proprietary >> in nature or legally privileged information. All trade secret, know how, >> formulas, researches, database, >> software, codes diagrams, documentations, attachments, voice, concepts and >> visual content are strictly >> protected by United Arab Emirates Laws and Dubai Media Incorporated codes >> which will have the right to >> take any legal action if you fail in doing the hereunder steps. If you >> receive this message in error, >> please immediately DELETE it and all copies of it from your system, DESTROY >> any hard copies of it and >> destroy any soft and backup copy of it saved in any kind of form under you >> possession and NOTIFY the sender. >> You must not, directly or indirectly, use, disclose, distribute, print, or >> copy any part of this message (email) >> if you are not the intended recipient. >> ################################################################################################################ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org