Search in sources :

Example 1 with ActivityFilterPanel

use of org.activityinfo.ui.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);
                    Log.debug("FilterPanelSet: Filter changed = " + value);
                    ValueChangeEvent.fire(FilterPanelSet.this, value);
                }
            });
            myRegistrations.add(registration);
        }
    }
    return manager;
}
Also used : HandlerRegistration(com.google.gwt.event.shared.HandlerRegistration) ActivityFilterPanel(org.activityinfo.ui.client.page.entry.ActivityFilterPanel) Filter(org.activityinfo.legacy.shared.command.Filter) HandlerManager(com.google.gwt.event.shared.HandlerManager) ActivityFilterPanel(org.activityinfo.ui.client.page.entry.ActivityFilterPanel)

Aggregations

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