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

Tue, 22 Sep 2015 06:21:13 -0700

On Tue, 22 Sep 2015 06:18:32 -0300, Davide Vecchi <d...@amc.dk> wrote:

Thanks Thiago, actually your original advice works great when I test it in a clean new test page with a simple grid. I do get the id attribute in the <table> tag and no ecxeption.

Yay! :)

I don't even need to add the "literal:" prefix.

I just suggested that because of that weird exception. As I supposed, something else was trying to use that as if it was a property.

So putting an "id=...." attribute in the <t:grid> tag works perfectly. However as I recently realized it would be much better for me to use a solution where I don't need to change all the tml files of pages containing grids. It would be already better for me if I could add that id from the Java code of each page instead of in the page tml, so I will look into that.

The easiest way of adding some behavior to all instances of a given component is to add a class transformation (ComponentClassTransformWorker interface implementation) and use the MutableComponentModel.addMixinClassName(String className) to apply a mixin to it. This mixin will implement the behavior you want.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to