use of noNamespace.DropdownT in project mdw-designer by CenturyLinkCloud.
the class BamEventComposer method createBamDataTable.
private void createBamDataTable() {
if (attributesTableContainer != null) {
if (dataTableDirtyStateListener != null)
attributesTableContainer.removeDirtyStateListener(dataTableDirtyStateListener);
attributesTableContainer.dispose();
}
// attributes
TableT bamTable = null;
if (bamPagelet != null) {
try {
bamTable = getBamPageletTable();
} catch (BamPageletValidationException ex) {
PluginMessages.uiError(ex, "BAM Pagelet");
}
}
String label;
if (bamTable != null && (bamTable.getNAME() != null || bamTable.getLABEL() != null)) {
label = bamTable.getLABEL() == null ? bamTable.getNAME() : bamTable.getLABEL();
bamTable.setLABEL(label);
for (DropdownT dropdown : bamTable.getDROPDOWNList()) {
if ("Variables".equalsIgnoreCase(dropdown.getSOURCE())) {
WorkflowProcess processVersion = getProcess();
if (processVersion != null) {
List<String> varNames = processVersion.getNonDocRefVariableNames();
// add process variable values
for (String var : varNames) {
OptionT option = dropdown.addNewOPTION();
option.setVALUE("#{" + var + "}");
option.setStringValue(var);
}
}
}
}
}
attributesTableContainer = createAttributesTable(getWidth(), LAYOUT_COLS, bamTable);
dataTableDirtyStateListener = new DirtyStateListener() {
public void dirtyStateChanged(boolean dirty) {
if (bamMessage != null) {
bamMessage.setAttributes(attributesTableContainer.getAttributes());
Event event = new Event();
event.widget = attributesTableContainer.tableEditor.getTable();
event.data = attributesTableContainer.getAttributes();
fireModify(new ModifyEvent(event));
}
}
};
attributesTableContainer.addDirtyStateListener(dataTableDirtyStateListener);
this.layout(true);
}
use of noNamespace.DropdownT in project mdw-designer by CenturyLinkCloud.
the class AttributesTableContainer method setEditable.
public void setEditable(boolean editable) {
boolean lEditable = editable;
// need values to select
WidgetT valueWidget = getValueWidget(pageletTable);
if (valueWidget instanceof DropdownT) {
DropdownT dropdown = (DropdownT) valueWidget;
if (dropdown.getOPTIONList().isEmpty())
lEditable = false;
}
tableEditor.setEditable(lEditable);
}
Aggregations