Give your bean a field called displayname, combining firstname and lastname there. If you use
persistence, mark it as volatile. Then exclude firstname and lastname from displaying using grid's
exclude parameter.
HTH,
Uli
On 21.08.2009 12:41 schrieb Kai Weber:
Hi,
I have a Bean and want to display a combination of two fields in my Grid.
public class User {
String getFirstname(){...}
String getLastname(){...}
}
I use BeanModel in my Page class and tried to find a way to do it
programmatically, but failed. This way works:
myModel = beanModelSource.createDisplayModel(User.class,
componentResources.getMessages());
...
<table t:type="grid" t:model="mymodel" t:source="users" row="user">
<t:parameter name="nameCell">
${user.firstname} ${user.lastname}
</t:parameter>
</table>
But, is this the really the only way? I wanted to customize the display of the
name cell in Java.
Kai
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org