use of org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues in project kie-wb-common by kiegroup.
the class AssignmentListItemWidgetTest method testSetProcessVariablesConst.
@Test
public void testSetProcessVariablesConst() {
ListBoxValues.ValueTester processVarTester = new ListBoxValues.ValueTester() {
public String getNonCustomValueForUserString(String userValue) {
return null;
}
};
ListBoxValues processVarListBoxValues = new ListBoxValues(AssignmentListItemWidgetView.CONSTANT_PROMPT, StunnerFormsClientFieldsConstants.INSTANCE.Edit() + " ", processVarTester, ActivityDataIOEditorViewImpl.CONSTANT_MAX_DISPLAY_LENGTH);
processVarComboBox.setAddCustomValues(true);
processVarComboBox.setListBoxValues(processVarListBoxValues);
String sConstant = "\"abcdeabcde12345\"";
widget.setConstant(sConstant);
widget.setProcessVariables(processVarListBoxValues);
verify(processVarComboBox, times(1)).setListBoxValues(processVarListBoxValues);
verify(processVarComboBox, times(2)).setListBoxValues(any(ListBoxValues.class));
verify(processVarComboBox).addCustomValueToListBoxValues(sConstant, "");
verify(processVar).setValue("\"abcdeabcde...\"");
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues in project kie-wb-common by kiegroup.
the class AssignmentListItemWidgetTest method testSetDataTypes.
@Test
public void testSetDataTypes() {
ListBoxValues dataTypeListBoxValues = new ListBoxValues(null, null, null);
String sCustomType = "com.test.CustomType";
widget.setCustomDataType(sCustomType);
widget.setDataTypes(dataTypeListBoxValues);
verify(dataTypeComboBox).setListBoxValues(dataTypeListBoxValues);
verify(dataTypeComboBox).addCustomValueToListBoxValues(sCustomType, "");
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues in project kie-wb-common by kiegroup.
the class ActivityDataIOEditorViewImpl method setInputAssignmentsProcessVariables.
@Override
public void setInputAssignmentsProcessVariables(final List<String> processVariables) {
ListBoxValues processVarListBoxValues = new ListBoxValues(AssignmentListItemWidgetView.CONSTANT_PROMPT, StunnerFormsClientFieldsConstants.INSTANCE.Edit() + " ", presenter.processVarTester(), CONSTANT_MAX_DISPLAY_LENGTH);
processVarListBoxValues.addValues(processVariables);
inputAssignmentsWidget.setProcessVariables(processVarListBoxValues);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues in project kie-wb-common by kiegroup.
the class ActivityDataIOEditorViewImpl method setPossibleOutputAssignmentsDataTypes.
@Override
public void setPossibleOutputAssignmentsDataTypes(final List<String> dataTypeDisplayNames) {
ListBoxValues dataTypeListBoxValues = new ListBoxValues(AssignmentListItemWidgetView.CUSTOM_PROMPT, StunnerFormsClientFieldsConstants.INSTANCE.Edit() + " ", presenter.dataTypesTester());
dataTypeListBoxValues.addValues(dataTypeDisplayNames);
outputAssignmentsWidget.setDataTypes(dataTypeListBoxValues);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues in project kie-wb-common by kiegroup.
the class AbstractComboBoxFieldRenderer method setComboBoxValues.
protected void setComboBoxValues(final List<String> values) {
valueListBoxValues = new ListBoxValues(ComboBoxWidgetView.CUSTOM_PROMPT, "Edit" + " ", null);
valueListBoxValues.addValues(values);
view.setComboBoxValues(valueListBoxValues);
}
Aggregations