header.setEventActions(asMapOfNull(headerActions, FBScript.class));
form.addFormItem(header);
}
List<TaskPropertyRef> inputs = task.getInputs();
if (inputs != null && !inputs.isEmpty()) {
TableRepresentation tableOfInputs = new TableRepresentation();
tableOfInputs.setRows(inputs.size());
tableOfInputs.setColumns(2);
tableOfInputs.setHeight("" + (inputs.size() * 30) + "px");
tableOfInputs.setEffectClasses(tableEffects);
tableOfInputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
for (int index = 0; index < inputs.size(); index++) {
TaskPropertyRef input = inputs.get(index);
LabelRepresentation labelName = new LabelRepresentation();
labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
labelName.setEffectClasses(labelEffects);
labelName.setValue(input.getName());
labelName.setWidth("100px");
tableOfInputs.setElement(index, 0, labelName);
LabelRepresentation labelValue = new LabelRepresentation();
labelValue.setEventActions(asMapOfNull(labelActions, FBScript.class));
labelValue.setEffectClasses(labelEffects);
labelValue.setWidth("200px");
InputData data = new InputData();
data.setName(input.getName());
data.setValue(input.getSourceExpresion());
data.setMimeType("multipart/form-data");
data.setFormatter(new Formatter() {
@Override
public Object format(Object object) {
return object;
}
@Override
public Map<String, Object> getDataMap() {
return new HashMap<String, Object>();
}
});
labelValue.setInput(data);
labelValue.setValue("{variable}");
tableOfInputs.setElement(index, 1, labelValue);
}
LabelRepresentation labelInputs = new LabelRepresentation();
labelInputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
labelInputs.setEffectClasses(labelEffects);
labelInputs.setValue("Inputs:");
form.addFormItem(labelInputs);
form.addFormItem(tableOfInputs);
}
List<TaskPropertyRef> outputs = task.getOutputs();
if (outputs != null && !outputs.isEmpty()) {
TableRepresentation tableOfOutputs = new TableRepresentation();
tableOfOutputs.setRows(outputs.size());
tableOfOutputs.setColumns(2);
tableOfOutputs.setHeight("" + (outputs.size() * 30) + "px");
tableOfOutputs.setEffectClasses(tableEffects);
tableOfOutputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
for (int index = 0; index < outputs.size(); index++) {
TaskPropertyRef output = outputs.get(index);
LabelRepresentation labelName = new LabelRepresentation();
labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
labelName.setEffectClasses(labelEffects);
labelName.setValue(output.getName());
labelName.setWidth("100px");
tableOfOutputs.setElement(index, 0, labelName);
TextFieldRepresentation textField = new TextFieldRepresentation();
textField.setEventActions(asMapOfNull(textfieldActions, FBScript.class));
textField.setWidth("200px");
textField.setEffectClasses(textfieldEffects);
OutputData data = new OutputData();
data.setName(output.getName());
data.setValue(output.getSourceExpresion());
data.setMimeType("multipart/form-data");
data.setFormatter(new Formatter() {
@Override
public Object format(Object object) {
return object;
}
@Override
public Map<String, Object> getDataMap() {
return new HashMap<String, Object>();
}
});
textField.setOutput(data);
tableOfOutputs.setElement(index, 1, textField);
}
LabelRepresentation labelOutputs = new LabelRepresentation();
labelOutputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
labelOutputs.setEffectClasses(labelEffects);
labelOutputs.setValue("Outputs:");