I didn't see the link for the tutorial on hte page, could you provide a better link?
thanks, Mark -----Original Message----- From: seloha . [mailto:[EMAIL PROTECTED] Sent: Wed 4/13/2005 1:29 PM To: [email protected] Subject: RE: Row number in contrib:table? I think the post you are referring to was sent to me from Erik Hatcher. The response was a bit criptic but more explicitly it goes something like this: Add row binding to your table and add a property specification for the row <property-specification name="rowObj" type="java.lang.Object"/> <table jwcid="[EMAIL PROTECTED]:Table" class="steps" source="ognl:procedure.steps" columns="instruction, status, primaryContact"> <binding name="row" expression="rowObj"/> </table> In your java page file you will need: public abstract Object getRowObj(); public abstract void setRowObj(Object rowObj); and something like this (but the problem here is that you do not have any true way of uniquely identifying the row with a List, unless within the list is a unique identifier for that row): public Integer getRowId() { Integer rowId = steps.indexOf(getRowObj()); return rowId; } You can now use the rowId in your javascript for a particular column to identify the row. To achieve this you really need to factor out your columns. A very good tutorial on the contrib:table can be found at: https://tapestrywebcomponentexamples.dev.java.net/ Again the end of this has become a bit criptic but it is definitely worth looking at the mentioned tutorial because it will explain how to extract your columns to provide better structure which will enable you to add the javascript mentioned and also provide a unique way of identifying the row by giving each row an id rather than just using a List. Hope this is of use, Paul >From: "Roland Chan" <[EMAIL PROTECTED]> >Reply-To: "Tapestry users" <[email protected]> >To: <[email protected]> >Subject: Row number in contrib:table? >Date: Wed, 13 Apr 2005 14:39:30 -0400 > >I'm using contrib:table in this way (note procedure.steps:ArrayList): > ><table jwcid="[EMAIL PROTECTED]:Table" class="steps" > source="ognl:procedure.steps" > columns="instruction, status, primaryContact"> ></table> > >I've taken a look around at the various contrib components and am not clear >on how I can add a column that would essentially give me the row number (ie. >Current List index number). I recall seeing one post describing in very >little detail how to accomplish this by assigning a value to the "row" >parameter. > >If someone could describe how to correctly do this keeping in mind that I'm >relatively new to the contrib library that'd be fantastic. > >Regards, >R. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
