You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mark <ma...@xeric.net> on 2011/01/31 23:02:21 UTC

property of a property in include parameter of a grid

Lets say I have a car object and and engine object in a one to one relationship.

It would seem like I should be able to do something like this to add
the engine name to the grid.

<t:grid source="listOfCars" row="car"  include="engine.name"/>

It appears that the grid won't let you reference the property of a
property using include.  I know I can add a parameter and get it to
work, but it seems like this should work.  Is there a reason it
doesn't?

Mark

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


Re: property of a property in include parameter of a grid

Posted by Ulrich Stärk <ul...@spielviel.de>.
You'd have to recursively build PropertyAdapters for all child propertys of the bean, something Grid 
is not designed to do.

To achieve what you want isn't that hard though:

<t:grid source="listOfCars" row="car" add="engine">
   <p:engineCell>
     ${car.engine.name}
   </p:engineCell>
</t:grid>

Pay attention to the different semantics of add and include.

Uli


On 31.01.2011 23:02, Mark wrote:
> Lets say I have a car object and and engine object in a one to one relationship.
>
> It would seem like I should be able to do something like this to add
> the engine name to the grid.
>
> <t:grid source="listOfCars" row="car"  include="engine.name"/>
>
> It appears that the grid won't let you reference the property of a
> property using include.  I know I can add a parameter and get it to
> work, but it seems like this should work.  Is there a reason it
> doesn't?
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

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