use of noNamespace.TableT 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.TableT in project mdw-designer by CenturyLinkCloud.
the class BamEventComposer method getBamPageletTable.
private TableT getBamPageletTable() throws BamPageletValidationException {
List<TableT> tables = bamPagelet.getTABLEList();
if (tables == null || tables.size() != 1)
throw new BamPageletValidationException("Bad BAM Pagelet - Should contain a single TABLE element");
TableT bamTable = tables.get(0);
if (AttributesTableContainer.getNameWidget(bamTable) == null)
throw new BamPageletValidationException("Bad BAM Pagelet - TABLE should contain a subelement with NAME='name'");
if (AttributesTableContainer.getValueWidget(bamTable) == null)
throw new BamPageletValidationException("Bad BAM Pagelet - TABLE should contain a subelement with NAME='value'");
return bamTable;
}
Aggregations