Search in sources :

Example 1 with ActivityFilterPanel

use of org.activityinfo.client.page.entry.ActivityFilterPanel in project activityinfo by bedatadriven.

the class FilterPanelSet method ensureHandlers.

private HandlerManager ensureHandlers() {
    if (manager == null) {
        manager = new HandlerManager(this);
        myRegistrations = new ArrayList<HandlerRegistration>();
        for (FilterPanel panel : panels) {
            HandlerRegistration registration = panel.addValueChangeHandler(new ValueChangeHandler<Filter>() {

                @Override
                public void onValueChange(ValueChangeEvent<Filter> event) {
                    // or indicator (reports) is selected
                    if (event.getSource() instanceof ActivityFilterPanel || event.getSource() instanceof IndicatorFilterPanel) {
                        clearAttributeAndPartnerFilters();
                    }
                    Filter value = composeFilter(new Filter(), null);
                    ValueChangeEvent.fire(FilterPanelSet.this, value);
                }
            });
            myRegistrations.add(registration);
        }
    }
    return manager;
}
Also used : HandlerRegistration(com.google.gwt.event.shared.HandlerRegistration) ActivityFilterPanel(org.activityinfo.client.page.entry.ActivityFilterPanel) Filter(org.activityinfo.shared.command.Filter) HandlerManager(com.google.gwt.event.shared.HandlerManager) ActivityFilterPanel(org.activityinfo.client.page.entry.ActivityFilterPanel)

Aggregations

HandlerManager (com.google.gwt.event.shared.HandlerManager)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 ActivityFilterPanel (org.activityinfo.client.page.entry.ActivityFilterPanel)1 Filter (org.activityinfo.shared.command.Filter)1