You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Britske <gb...@gmail.com> on 2007/09/25 10:08:43 UTC

how to reference public field of included component in template (T5)

Some context first:

I'm using the T5 grid with the row-parameter to bind the current-row to a
property 'cityresult' so that I can edit the contents of all cells of the
name-column (works splendid by the way)

<table t:type="Grid" row="cityresult" source="allCityResults">
  <t:parameter name="namecell"> 
     ${cityresult.city.name} 
   </t:parameter>
</table>

However, I forsee that some pages will contain multiple grids, which would
mean I need multiple binding-properties analogously as 'cityresult' in my
page-class, which clutters my page-class a bit.

At the same time the Grid-component internally has a private field _row of
type Object and a getter (getRow()). Instead of the above I want to be able
to access this field (through the getter or whatever) directly in my 
page-template. 

So for instance I would end up with: 

 <table t:type="Grid" id="allcities" source="allCityResults">
  <t:parameter name="namecell"> 
     ${cityresult.city.name} 
   </t:parameter>
</table>

Is something like this at all possible? What needs to be done to make it
possible, or would you discourage it for a particular reason? 

Thanks,
Geert-Jan

-- 
View this message in context: http://www.nabble.com/how-to-reference-public-field-of-included-component-in-template-%28T5%29-tf4514005.html#a12874918
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org