tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H de Paula Figueiredo" <thiag...@gmail.com>
Subject Re: Customized display/edit blocks for components other than the grid
Date Mon, 27 Apr 2015 19:29:51 GMT
On Mon, 27 Apr 2015 12:04:48 -0300, Davide Vecchi <dv@amc.dk> wrote:

> Hi everybody,


> Now I'm wondering if there is some similar mechanism in Tapestry that  
> can be used not only for grids but also for other components, f.ex. a  
> normal TextField not inside a grid.

Not out-of-the-box.

> In other words I would like that f.ex. text fields outside any grid  
> could display and edit like the grid cells of the columns that I have  
> annotated with @DataType .

You can try doing something with ComponentOverride, a service introduced  
in 5.4, which will replace every usage of a component with another one.  
It's not documented yet, but you contribute overrides to it:

public static void  
contributeComponentOverride(MappedConfiguration<Class,Class> config) {
         config.add(TextField.class, YourTextField.class);

If you want to see the history of it plus learn a bit more about Java  
(seriously, the Tapestry team actually did learn while implementing and  
discussing this feature), you can read this ticket:  

Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer

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

View raw message