GroupTable

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

GroupTable

Postby grmo » Thu Aug 09, 2007 1:57 am

When is the GroupTable due to come out of the Beta stage? In particular I was curious as to whether it would have better support for labelling the group headings. At present it seems you need to write for yourself something as complicated as the following code:
Code: Select all
ObjectConverterManager.initDefaultConverter();
ObjectConverterManager.registerConverter(DefaultGroupRow.class, new DefaultObjectConverter() {
    public String toString(Object object, ConverterContext context) {
        if (object instanceof DefaultGroupRow) {
            DefaultGroupRow row = (DefaultGroupRow) object;
            StringBuffer buf = new StringBuffer();
            DefaultGroupTableModel defaultGroupTableModel = (DefaultGroupTableModel) row.getTreeTableModel();
            for (int i = 0; i < row.getNumberOfConditions(); i++) {
                buf.append(" ");
                if (defaultGroupTableModel.isSingleLevelGrouping() || i == row.getNumberOfConditions() - 1) {
                    buf.append(defaultGroupTableModel.getActualModel().getColumnName(row.getConditionColumn(i)));
                    buf.append(": ");
                    buf.append(row.getConditionValue(i));
                }
            }
            return buf.toString();
        }
        return null;
    }
});

Or is there an easier way? All I am looking for is something sensible to say what the group is, rather than the default Object.toString for a DefaultGroupRow, which clearly means nothing to the user.
grmo
 
Posts: 33
Joined: Fri Jul 27, 2007 1:44 am

Postby JIDE Support » Thu Aug 09, 2007 7:44 am

It will get out of beta when people are happy with it. So it really depends on the feedbacks we received from users.

ObjectConverter is suppose to be the replacement for the simple toString method on any Object. This gives you the complete control of what to do display on the group row. We could register this converter as the default converter for group row if you think that will help.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby grmo » Fri Aug 10, 2007 2:20 am

Yes, it would make sense to me to make something sensible like the one I quoted (or the one used in your demo) to be the default converter. Newbie users would definitely benefit from not having to worry about it when trying out the GroupTable. Advanced users could always change it later.
grmo
 
Posts: 33
Joined: Fri Jul 27, 2007 1:44 am

Postby JIDE Support » Fri Aug 10, 2007 8:18 am

I will simply override toString method of DefaultGroupRow to do the default conversion. User will still be able to add a converter like the demo and do more stuff.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby grmo » Mon Aug 13, 2007 1:02 am

Great, thanks.
grmo
 
Posts: 33
Joined: Fri Jul 27, 2007 1:44 am

Postby JIDE Support » Mon Aug 13, 2007 3:06 pm

Just so you know, we fixed this in 2.1.2.02 release.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 15 guests

cron