Exemplo n.º 1
0
 @UiHandler("newPropertyButton")
 void newPropertyClick(ClickEvent event) {
   lockRequired.fire(new LockRequiredEvent());
   if (getContext() != null) {
     newFieldPopup.init(getContext());
     newFieldPopup.show();
   }
 }
Exemplo n.º 2
0
  @PostConstruct
  private void init() {

    newFieldPopup.addPopupHandler(
        new NewFieldPopupView.NewFieldPopupHandler() {
          @Override
          public void onCreate(String fieldName, String fieldLabel, String type, boolean multiple) {
            createNewProperty(
                dataObject,
                DataModelerUtils.unCapitalize(fieldName),
                fieldLabel,
                type,
                multiple,
                true);
          }

          @Override
          public void onCreateAndContinue(
              String fieldName, String fieldLabel, String type, boolean multiple) {
            createNewProperty(
                dataObject,
                DataModelerUtils.unCapitalize(fieldName),
                fieldLabel,
                type,
                multiple,
                false);
          }

          @Override
          public void onCancel() {
            newFieldPopup.hide();
          }
        });
  }