Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by GabrielLandais: http://wiki.apache.org/tapestry/Tapestry5GridComponent The comment on the change is: Tried to answer questions ------------------------------------------------------------------------------ == How to disable sorting for a column == It is very likely possible to disable sorting for a column. How is that done? + One solution is to create a specific BeanModel for your Grid : + + * Template part : + {{{ + <t:grid t:source="list" model="model"/> + }}} + + * Java part : + + {{{ + /** The model. */ + @Retain + private BeanModel model; + + /** The bean model source. */ + @Inject + private BeanModelSource beanModelSource; + + /** The resources. */ + @Inject + private ComponentResources resources; + + /** + * Page loaded. + */ + void pageLoaded() { + BeanModel model = beanModelSource.create(Entity.class, false, resources); + model.get("XXX").sortable(false); + } + + }}} == How to define the initial sort column == - ??? + TODO not tested + + * Template part : + + {{{ + <t:grid t:source="list" t:id="theGrid"/> + }}} + + * Java part : + + {{{ + /** The form. */ + @Component + private Grid theGrid; + + @SetupRender + public void setupGrid() { + theGrid.updateSort("XXX"); + } + + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
