Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The "Tapestry5GridComponent" page has been changed by BasileChandesris.
http://wiki.apache.org/tapestry/Tapestry5GridComponent?action=diff&rev1=8&rev2=9

--------------------------------------------------

  
  == How to hide a column ==
  If you want to hide a column from the Grid:
+ 
+ 
+  * Tapestry 5.1 :
+ 
+ {{{
+ <t:grid t:source="list" exclude="id"/>
+ }}}
+ 
+ 
+  * Tapestry :
  {{{
  <t:grid t:source="list" remove="id"/>
  }}}
@@ -112, +122 @@

  
  }}}
  
+ 
+ == How to rename a column ==
+ You want to rename column called "name" to "account":
+ 
+  * Template part :
+ 
+ {{{
+ <t:grid t:source="bill" model="model" />
+ }}}
+ 
+  * Java part :
+ 
+ {{{
+ public class Page {
+     /** The model. */
+     @Retain
+     private BeanModel model;
+ 
+     /** The bean model source. */
+     @Inject
+     private BeanModelSource beanModelSource;
+ 
+     /** The resources. */
+     @Inject
+     private ComponentResources resources;
+ 
+   void pageLoaded() {
+     this.model = beanModelSource.createDisplayModel(DeviceEquipment.class, 
resources.getMessages());
+     this.model.include("name");
+     this.model.get("name").label("account"); // Rename column
+   }
+   ...
+ }}}
+ 
+ 
+ == Grid component reference ==
+ See 
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to