Hello Thiago,
great, works fine! Thank you very much - seems I overlooked the "this
may be null for a synthetic or placeholder property" in the JavaDoc
completly.
Is there any way to get the grid to not display any name in the header
of my synthetic column? I know how to change it, but giving null, an
empty string or a whitespace results in a tapestry exception stating
"Parameter label was null or contained only whitespace".
Regards,
Tobias
Thiago H de Paula Figueiredo schrieb:
On Fri, 14 Dec 2007 13:57:54 -0200, Tobias Wehrum
<[EMAIL PROTECTED]> wrote:
Tobias Wehrum schrieb:
Hello everyone!
Is there a way to add extra rows to a BeanEditForm and extra columns
to a Grid - rows / columns which doesn't represent a property of the
given model? I need it to edit or show values which are relevant for
the model, but like I said not included in it, as well as present
links in an own column like "edit", "delete", "move" etc..
Now, you need to create a BeanModel in your page class and pass it to
the Grid:
@Inject
private BeanModelSource beanModelSource;
@Inject
private ComponentResources componentResources;
public BeanModel getBeanModel() {
BeanModel beanModel =
beanModelSource.create(YourClassnameHere.class, false,
componentResources);
beanModel.add("action", null); // action is just a name I chose.
return beanModel;
}
Then, inside your Grid, provide the template for your column:
<t:parameter name="actionCell">
<!-- Note that the name parameter must be the parameter passed to
BeanModel.add concatenated with Cell -->
Your links here! :)
</t:parameter>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]