Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGridField: SelectItem-FilterEditor that uses setGroupValueFunction-logic

    Hi Isomorphic,

    I have a ListGridField with the following GroupValueFunction that is used when I group the ListGrid by this field.

    Code:
    setGroupValueFunction(new GroupValueFunction() {
    	@Override
    	public Object getGroupValue(Object value, ListGridRecord record, ListGridField field, String fieldName,
    			ListGrid grid) {
    		Integer i = record.getAttributeAsInt(ListGridFieldMaxAccounts.this.getName());
    		if (i == null)
    			return "ERROR";
    		else if (i == 0)
    			return "No accounts";
    		else if (i > 0 && i <= 10)
    			return "1-10 accounts";
    		else if (i > 10 && i <= 20)
    			return "11-20 accounts";
    		else if (i > 20 && i <= 50)
    			return "21-50 accounts";
    		else
    			return "more than 50 Accounts";
    	}
    });
    What is the suggested approach for a SelectItem in the ListGrid's filter-row, that has exactly the same options (five in this case)?
    The selection has to stand for a AdvancedCriteria with AND, I'd guess.

    From whats happening in the end (2 criteria, AND-connected) it should be similar to the DateRangeItem that is shown in the filter row for DateItems in the ListGrid.

    Thanks,
    Blama
Working...
X