Hi, thanks for your answer. I tried with the loop, but I need to display only one value. I think I could use the index parameter for Loop, but I don't see how to link it with my List.
http://www.nabble.com/T5%3A-How-to-acces-to-an-array-from-loop--tf3599642.html#a10054876 Here is an example, but how can I use it with my example ? Thank you for your help ! Chris Lewis-5 wrote: > > This is a pretty basic operation that you can learn by doing the T5 > tutorial. > It sounds like you want to enumerate a list and display something for > each iteration - a String property from each Fichier instance. To do > this you need the T5 Loop > <http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentsloop> > > component. Your page provides the List (any Iterable), but must also > provide a property for holding a member of the List for each iteration > (the value parameter of the Loop). So in your page you need: > > //The Iterable. > private ArrayList<Fichier> listeFichiers; > > //The "current" element. > private Fichier fichier; > > //now you need at least a getter for your list, and both a getter and a > setter for fichier. > > In your template you can now: > > <t:loop source="listeFichiers" value="fichier"> > ${fichier.field} > </t:loop> > > Note that ${fichier.field} will result in a call to the method > Fichier#getField. > > Hibowl wrote: >> Hi, >> >> I'd like to access the values of a List from my html page, but I don't >> know >> how to do that... >> >> Start.java : >> >> private ArrayList<Fichier> listeFichiers; >> >> (getter/setter). >> >> >> Start.html : >> I want to display a field from Fichier (type String). But how can I >> access >> to it ? Is there a way to use such a ${listeFichiers...} with a parameter >> ? >> >> Thank you for any help ! >> >> >> > > > -- View this message in context: http://www.nabble.com/-T5--Access-table-values-from-html-tf4554333.html#a12998400 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]