Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ private Filter generateNumberFilter(Property<?> field, Object propertyId, Object
String gtValue = interval.getGreaterThanValue();
String eqValue = interval.getEqualsValue();
Class<?> typeClass = owner.getContainerDataSource().getType(propertyId);
;

if (!eqValue.isEmpty()) {
return new Compare.Equal(propertyId, parseNumberValue(typeClass, eqValue));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,31 @@ public FilterTable(String caption) {
java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("columnIdMap");
field.setAccessible(true);
_columnIdMap = (KeyMapper<Object>) field.get(this);
field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
field.setAccessible(true);
_visibleComponents = (HashSet<Component>) field.get(this);
//field = Table.class.getDeclaredField("visibleComponents"); // In Table constructor "visibleComponents" is always null !
//field.setAccessible(true);
//_visibleComponents = (HashSet<Component>) field.get(this);
} catch (Exception exception) {
throw new IllegalArgumentException("Unable to get columnIdMap or visibleComponents", exception);
}
generator = new FilterFieldGenerator(this);
initDone = true;
}

@Override
protected void refreshRenderedCells() {
super.refreshRenderedCells();

// NOTE: 'visibleComponents' HashSet is (re)created by method getVisibleCellsNoCache(...)
// But only when method refreshRenderedCells() calls it.
try {
java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
field.setAccessible(true);
_visibleComponents = (HashSet<Component>) field.get(this);
} catch (Exception exception) {
throw new IllegalArgumentException("Unable to get visibleComponents", exception);
}
}

@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
Expand Down Expand Up @@ -363,7 +378,7 @@ public void setVisibleColumns(Object... visibleColumns) {
/* Set this as parent to visible columns */
for (Object key : visibleColumns) {
Component filter = columnIdToFilterMap.get(key);
if (filter != null) {
if (filter != null && isFilterBarVisible()) {
filter.setParent(this);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,31 @@ public FilterTreeTable(String caption) {
java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("columnIdMap");
field.setAccessible(true);
_columnIdMap = (KeyMapper<Object>) field.get(this);
field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
field.setAccessible(true);
_visibleComponents = (HashSet<Component>) field.get(this);
//field = Table.class.getDeclaredField("visibleComponents"); // In Table constructor "visibleComponents" is always null !
//field.setAccessible(true);
//_visibleComponents = (HashSet<Component>) field.get(this);
} catch (Exception exception) {
throw new IllegalArgumentException("Unable to get columnIdMap or visibleComponents", exception);
}
generator = new FilterFieldGenerator(this);
initDone = true;
}

@Override
protected void refreshRenderedCells() {
super.refreshRenderedCells();

// NOTE: 'visibleComponents' HashSet is (re)created by method getVisibleCellsNoCache(...)
// But only when method refreshRenderedCells() calls it.
try {
java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
field.setAccessible(true);
_visibleComponents = (HashSet<Component>) field.get(this);
} catch (Exception exception) {
throw new IllegalArgumentException("Unable to get visibleComponents", exception);
}
}

@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
Expand Down