dispatcher.register(TrousersStore.class, new StoreCallback() {
@Override
public Agreement voteFor(final Action action) {
if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.UnderwearStore.class);
}
else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.ShoesStore.class, org.jboss.gwt.circuit.sample.wardrobe.stores.CoatStore.class);
}
else {
return Agreement.NONE;
}
}