Hi, Gunnar!
I think I know how to answer your first question. I assume your are using
Tapestry 5.2.4 as I am. :-) You need to create an explicit BeanModel,
customize its sorting funcionality and provide it to your Grid component.
*Page class*
@Inject
private BeanModelSource beanModelSource;
@Inject
private Messages messages;
public BeanModel getUnsortableBeanModel() {
BeanModel model = beanModelSource.createDisplayModel(YourModel.class,
messages);
for (String propName : model.getPropertyNames()) {
PropertyModel propModel = model.get(propName);
propModel.sortable(false);
}
}
*Page template*
You can add a checkbox column using BeanModel.add("propertyName", null).
It will be necessary to provide a render block for it in the template
(...).
Atenciosamente,
Matheus Eduardo Machado Moreira
matheus@gmail.com
*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans
2010/12/28 Gunnar Eketrapp
> Hi!
>
> I am using a grid inside a form to display a list of name + checkbox.
>
> The user can then select a number of names and press OK (or cancel).
>
> My questions are:
>
> 1) How do I disable the sorting functionality of the grid.
>
> 2) If I would like to suppport sorting and paging then I need some way to
> first submit what's been checked.
>
> Or should I skip the grid !?
>
> Thanks in advance,
> Gunnar Eketrapp
>