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>
--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]