Using a custom CellRenderer with GroupTable

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Using a custom CellRenderer with GroupTable

Postby robertho21 » Wed Jun 15, 2011 11:02 am

Hi, I have a GroupTable which each column has defined a custom CellRenderer like this:

Code: Select all
        GroupTable groupTable = new GroupTable(model);
       
        int columnCount = getColumnModel().getColumnCount();
      for (int i = 0; i < columnCount; i++) {
         final TableColumn tableColumn = getColumnModel().getColumn(i);
         TableCellRenderer renderer = controller.getCellRenderer(i);
              renderer = AlertView.cellRenderer;
                        tableColumn.setCellRenderer(renderer);
      }


the first time I see the table is correct, all records are displayed as they are defined in the renderer, but when I group the table by a field, apparently is not applying the custom renderer any more.

Is there any way to implement custom renderer when a grouping is done.

The screenshots of the table before/after are attached.

Thanks.

Robertho.
Attachments
after.JPG
after grouping
after.JPG (76.89 KiB) Viewed 7745 times
before.JPG
before grouping
before.JPG (58.24 KiB) Viewed 7745 times
robertho21
 
Posts: 10
Joined: Fri Oct 29, 2010 4:38 pm

Re: Using a custom CellRenderer with GroupTable

Postby JIDE Support » Wed Jun 15, 2011 11:14 am

Cell renderers configured to TableColumn will be reset on table structure changed event. That's why it happens. Please try to implement JIDE technologies including CellStyle, ObjectConverterManager, CellRendererManager so that your setting could be persisted during grouping/ungrouping. Please check out the developer guide at http://jidesoft.com/products/download.htm for details.

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


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 28 guests

cron