Changeset 7435


Ignore:
Timestamp:
Jan 9, 2018, 9:52:00 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2105: PropertyPathActionFactory? doesn't use the exportProperty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/list/PropertyPathActionFactory.java

    r6875 r7435  
    125125    Metadata<I> m = Metadata.getInstance(metaClass, entityName);
    126126    PropertyPath<I, V> propertyPath = m.getPropertyPath(property, false);
    127     PropertyPathAction<I, V> action = new PropertyPathAction<I, V>(propertyPath);
     127    PropertyPath<I, ?> exportPath = exportProperty == null ? propertyPath : m.getPropertyPath(exportProperty, false);
     128    PropertyPathAction<I, V> action = new PropertyPathAction<I, V>(propertyPath, exportPath);
    128129    action.setId(id);
    129130    action.setClazz(clazz);
     
    260261    interface. We subclass the {@link AbstractListColumnBean}
    261262    and then use the {@link PropertyPath} in the {@link #getValue(DbControl, Object)}
    262     method.
     263    and {@link #getExportValue(DbControl, Object)} methods.
    263264  */
    264265  static class PropertyPathAction<I, V>
     
    266267  {
    267268    private final PropertyPath<I, V> path;
    268    
    269     PropertyPathAction(PropertyPath<I, V> path)
     269    private final PropertyPath<I, ?> exportPath;
     270   
     271    PropertyPathAction(PropertyPath<I, V> path, PropertyPath<I, ?> exportPath)
    270272    {
    271273      this.path = path;
     274      this.exportPath = exportPath;
    272275    }
    273276   
     
    281284      return path.getValue(dc, item);
    282285    }
     286    @Override
     287    public Object getExportValue(DbControl dc, I item)
     288    {
     289      return exportPath.getValue(dc, item);
     290    }
    283291    // ------------------------------------
     292
    284293   
    285294  }
Note: See TracChangeset for help on using the changeset viewer.