Package com.habitsoft.kiyaa.metamodel

Examples of com.habitsoft.kiyaa.metamodel.Action


          action.perform(AsyncCallbackFactory.<Void>defaultNewInstance());
        }
      });
      if(test != null) {
        if(actionTests == null) actionTests = new ActionSeries();
        actionTests.add(new Action() {
          @Override
          public void perform(AsyncCallback<Void> callback) {
            test.getValue(new AsyncCallbackProxy<Boolean,Void>(callback) {
              @Override
              public void onSuccess(Boolean result) {
View Full Code Here


    @Name("removeFilterAction")
    public void addRemoveFilterAction(@Name("removeLabel") String removeLabel, @Name("restoreLabel") String restoreLabel) {
      if(removeFilterActionLabel != null) {
        removeFilterActionLabel.setText(removeLabel);
      } else {
        removeFilterActionLabel = addAction(removeLabel, new Action() {
          @Override
          public void perform(AsyncCallback<Void> callback) {
            applyDefaultFilter = false;
            if(restoreFilterActionLabel != null)
                restoreFilterActionLabel.setVisible(true);
            removeFilterActionLabel.setVisible(false);
            applyFilter(true);
            callback.onSuccess(null);
          }
        }, new Value<Boolean>() {
          public void getValue(AsyncCallback<Boolean> callback) {
            callback.onSuccess(applyDefaultFilter);
          }
          public void setValue(Boolean newValue, AsyncCallback<Void> callback) {
            applyDefaultFilter = ((Boolean)newValue).booleanValue();
                    applyFilter(true);
            callback.onSuccess(null);
          }
        }, false);
      }
      if(restoreFilterActionLabel != null) {
        restoreFilterActionLabel.setText(restoreLabel);
      } else {
        restoreFilterActionLabel = addAction(restoreLabel, new Action() {
          @Override
          public void perform(AsyncCallback<Void> callback) {
            applyDefaultFilter = true;
                    if(removeFilterActionLabel != null)
                        removeFilterActionLabel.setVisible(true);
View Full Code Here

    if(actions.size() == 0) {
      this.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          final String value = getValue();
          if(actions.containsKey(value)) {
            Action action = (Action)actions.get(value);
            action.perform(new AsyncCallback<Void>() {
              public void onSuccess(Void result) {
              }
              public void onFailure(Throwable caught) {
                GWT.log("Action "+value+" failed: "+caught, caught);
              }
View Full Code Here

TOP

Related Classes of com.habitsoft.kiyaa.metamodel.Action

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.