Package org.drools.guvnor.client.modeldriven.dt

Examples of org.drools.guvnor.client.modeldriven.dt.ActionSetFieldCol


    ActionRetractFactCol ret = new ActionRetractFactCol();
    ret.boundName = "f2";
    dt.actionCols.add(ret);

    ActionSetFieldCol set = new ActionSetFieldCol();
    set.boundName = "f1";
    set.factField = "goo1";
    set.type = SuggestionCompletionEngine.TYPE_STRING;
    dt.actionCols.add(set);

    ActionSetFieldCol set2 = new ActionSetFieldCol();
    set2.boundName = "f1";
    set2.factField = "goo2";
        set2.defaultValue = "whee";
    set2.type = SuggestionCompletionEngine.TYPE_STRING;
    dt.actionCols.add(set2);
View Full Code Here


  public void testRHS() {
    GuidedDTDRLPersistence p = new GuidedDTDRLPersistence();
    String[] row = new String[] {"1", "desc", "a", "a condition", "actionsetfield1", "actionsetfield2", "retract", "actioninsertfact1", "actioninsertfact2"};

    List<ActionCol> cols = new ArrayList<ActionCol>();
    ActionSetFieldCol asf1 = new ActionSetFieldCol();
    asf1.boundName = "a";
    asf1.factField = "field1";

    asf1.type = SuggestionCompletionEngine.TYPE_STRING;
    cols.add(asf1);

    ActionSetFieldCol asf2 = new ActionSetFieldCol();
    asf2.boundName = "a";
    asf2.factField = "field2";
    asf2.update = true;
    asf2.type = SuggestionCompletionEngine.TYPE_NUMERIC;
    cols.add(asf2);
View Full Code Here

    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
    ActionSetFieldCol asf = new ActionSetFieldCol();
    asf.boundName = "x";
    asf.factField = "age";
    asf.type = "String";

    dt.actionCols.add(asf);
View Full Code Here

    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
    ActionSetFieldCol asf = new ActionSetFieldCol();
    asf.boundName = "x";
    asf.factField = "age";
    asf.type = "String";
    asf.update = true;
View Full Code Here

  public void testRoundTrip() {

    GuidedDecisionTable dt = new GuidedDecisionTable();

    dt.actionCols.add(new ActionInsertFactCol());
    ActionSetFieldCol set = new ActionSetFieldCol();
    set.factField = "foo";
    dt.actionCols.add(set);

    dt.getMetadataCols().add(new MetadataCol());
View Full Code Here

    assertEquals(1, dt_.attributeCols.size());
    assertEquals(2, dt_.actionCols.size());
    assertEquals(1, dt_.conditionCols.size());

    assertTrue(dt_.actionCols.get(1) instanceof ActionSetFieldCol );
    ActionSetFieldCol asf = (ActionSetFieldCol) dt_.actionCols.get(1);
    assertEquals("foo", asf.factField);
    assertEquals(false, asf.update);
  }
View Full Code Here

  private GuidedDecisionTable dt;
  private SuggestionCompletionEngine sce;
    private Constants constants = GWT.create(Constants.class);

    public ActionSetColumn(SuggestionCompletionEngine sce, final GuidedDecisionTable dt, final Command refreshGrid, final ActionSetFieldCol col, final boolean isNew) {
    this.editingCol = new ActionSetFieldCol();
    this.dt = dt;
    this.sce = sce;

    editingCol.boundName = col.boundName;
    editingCol.factField = col.factField;
View Full Code Here

  private Widget editAction(final ActionCol c) {
    return new ImageButton("images/edit.gif", constants.EditThisActionColumnConfiguration(), new ClickListener() { //NON-NLS
      public void onClick(Widget w) {
        if (c instanceof ActionSetFieldCol) {
          ActionSetFieldCol asf = (ActionSetFieldCol) c;
          ActionSetColumn ed = new ActionSetColumn(getSCE(), dt, new Command() {
              public void execute() {
                scrapeData(-1);
                refreshGrid();
                refreshActionsWidget();
View Full Code Here

          }

          private void showSet() {
            ActionSetColumn set = new ActionSetColumn(getSCE(), dt, new Command() {
              public void execute() { newActionAdded(); }
            }, new ActionSetFieldCol(), true);
            set.show();
          }

          private void newActionAdded() {
            //want to add in a blank row into the data
View Full Code Here

            a.action = new ActionRetractFact(rf.boundName);
            a.boundName = rf.boundName;
            actions.add(a);
          }
        } else if (c instanceof ActionSetFieldCol) {
          ActionSetFieldCol sf = (ActionSetFieldCol)c;
          LabelledAction a = find(actions, sf.boundName);
          if (a == null) {
            a = new LabelledAction();
            a.boundName = sf.boundName;
            a.action = new ActionSetField(sf.boundName);
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.dt.ActionSetFieldCol

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.