Introduce easier way to disable column sorting in Grid
------------------------------------------------------
Key: TAP5-754
URL: https://issues.apache.org/jira/browse/TAP5-754
Project: Tapestry 5
Issue Type: Improvement
Affects Versions: 5.1.0.5
Reporter: Vjeran Marcinko
I have seldom need for Grid sorting so I almost always turn it off. Currently
this is a bit awkward procedure. I also rarely configure Grid with BeanModel
created in my page class, because template way of configuring Grid is
sufficient for me.
I have to introduce 3 new objects just for this purpose in this class, and also
do some coding in setupRender():
@Property
private BeanModel model;
@Inject
private BeanModelSource beanModelSource;
@Inject
private ComponentResources componentResources;
void setupRender() {
....
model = beanModelSource.createDisplayModel(Employee.class,
componentResources.getMessages());
List<String> propertyNames = model.getPropertyNames();
for (String propertyName : propertyNames) {
model.get(propertyName).sortable(false);
}
}
Tapestry 4 had simple way of using character "!" in template that achieved the
same thing so I feel kinda nostalgic for it...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.