RE: Make Tapestry add an id to the tag of the grid

Mon, 21 Sep 2015 07:37:59 -0700

>> t:id and id are different. t:id is the Tapestry component id in the 
>> template. id is the HTML client-side id. Try <t:grid t:id="yourWantedId"  
>> id="yourWantedId">. Grid has the @SupportsInformalParameters, so it should 
>> work.

Whoops, I see my confusion, thanks for clearing that up.

I just tried to add

id="grid1"

to the <t:grid tag, like 

<t:grid 
        ....
        t:id="grid1"
        id="grid1"
        ....

 but I get 

org.apache.tapestry5.ioc.util.UnknownValueException: Class [my page class] does 
not contain a property (or public field) named 'grid1'.

However I also realized that a solution where I need to modify all the 
templates of pages that contain grids won't do. I need the Grid component 
itself to generate a client-side id in the client HTML and provide a way for my 
page classes to know this id. I hope there is a way to do so and then I will 
see if I can extend / compose / customize the Grid component to do that.

Reply via email to