Esempio n. 1
0
  private Widget valueEditor(final ActionFieldValue val) {
    DataModelOracle completions = this.getModeller().getSuggestionCompletions();
    String type = "";
    if (completions.isGlobalVariable(this.model.getVariable())) {
      type = completions.getGlobalVariable(this.model.getVariable());
    } else {
      type = this.getModeller().getModel().getLHSBindingType(this.model.getVariable());
      /*
       * to take in account if the using a rhs bound variable
       */
      if (type == null && !this.readOnly) {
        type =
            this.getModeller().getModel().getRHSBoundFact(this.model.getVariable()).getFactType();
      }
    }

    DropDownData enums =
        completions.getEnums(
            type, val.getField(), FieldNatureUtil.toMap(this.model.getFieldValues()));
    ActionValueEditor actionValueEditor =
        new ActionValueEditor(
            val, enums, this.getModeller(), this.getEventBus(), val.getType(), this.readOnly);
    actionValueEditor.setOnChangeCommand(
        new Command() {

          public void execute() {
            setModified(true);
          }
        });
    return actionValueEditor;
  }
Esempio n. 2
0
 private Widget fieldSelector(final ActionFieldValue val) {
   return new SmallLabel(val.getField());
 }