Search in sources :

Example 36 with FieldData

use of org.drools.workbench.models.testscenarios.shared.FieldData in project drools-wb by kiegroup.

the class ListEditorRow method suffleUp.

@UiHandler("suffleUp")
public void suffleUp(final ClickEvent event) {
    if (index > 0) {
        FieldData oneUp = parentField.getCollectionFieldList().get(index - 1);
        FieldData onMyLine = parentField.getCollectionFieldList().get(index);
        parentField.getCollectionFieldList().set(index, oneUp);
        parentField.getCollectionFieldList().set(index - 1, onMyLine);
        parent.renderEditor();
    }
}
Also used : CollectionFieldData(org.drools.workbench.models.testscenarios.shared.CollectionFieldData) FieldData(org.drools.workbench.models.testscenarios.shared.FieldData) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Example 37 with FieldData

use of org.drools.workbench.models.testscenarios.shared.FieldData in project drools-wb by kiegroup.

the class ListEditorRow method newItemBelow.

@UiHandler("newItemBelow")
public void newItemBelow(final ClickEvent event) {
    FieldData newFieldData = new FieldData();
    newFieldData.setName(parentField.getName());
    parentField.getCollectionFieldList().add(index + 1, newFieldData);
    parent.renderEditor();
}
Also used : CollectionFieldData(org.drools.workbench.models.testscenarios.shared.CollectionFieldData) FieldData(org.drools.workbench.models.testscenarios.shared.FieldData) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Aggregations

FieldData (org.drools.workbench.models.testscenarios.shared.FieldData)37 FactData (org.drools.workbench.models.testscenarios.shared.FactData)29 Test (org.junit.Test)26 CollectionFieldData (org.drools.workbench.models.testscenarios.shared.CollectionFieldData)20 Field (org.drools.workbench.models.testscenarios.shared.Field)13 Scenario (org.drools.workbench.models.testscenarios.shared.Scenario)12 VerifyFact (org.drools.workbench.models.testscenarios.shared.VerifyFact)11 VerifyField (org.drools.workbench.models.testscenarios.shared.VerifyField)11 ArrayList (java.util.ArrayList)10 Import (org.kie.soup.project.datamodel.imports.Import)9 ExecutionTrace (org.drools.workbench.models.testscenarios.shared.ExecutionTrace)8 KieSession (org.kie.api.runtime.KieSession)8 ClassTypeResolver (org.kie.soup.project.datamodel.commons.types.ClassTypeResolver)8 TypeResolver (org.kie.soup.project.datamodel.commons.types.TypeResolver)8 Cheese (org.drools.workbench.models.testscenarios.backend.Cheese)7 Expectation (org.drools.workbench.models.testscenarios.shared.Expectation)5 VerifyRuleFired (org.drools.workbench.models.testscenarios.shared.VerifyRuleFired)5 HashMap (java.util.HashMap)4 UiHandler (com.google.gwt.uibinder.client.UiHandler)3 FactAssignmentField (org.drools.workbench.models.testscenarios.shared.FactAssignmentField)3