//String nameHtml = nameField.getEditor();
//String verbosityLevelHtml = verbosityLevelField.getEditor();
/** Create TD for Source Component */
TD sourceCell = null;
SourceIF pipeSourceComponent = pipe.getSource();
if((pipeSourceComponent == null) && (pipe.getSourceID() != null)) {
// Source component which cannot be loaded
sourceCell = getUnknownComponentCell(
pipe.getSourceID(),
pers,
PipeComponentIF.TYPE_SOURCE,
labels);
} else {
sourceCell = getComponentCell(
pipeSourceComponent,
pers,
PipeComponentIF.TYPE_SOURCE,
labels);
}
/** Create TD for Destination Component */
TD destinationCell = null;
DestinationIF pipeDestinationComponent = pipe.getDestination();
if((pipeDestinationComponent == null) && (pipe.getDestinationID() != null)) {
// Destination component which cannot be loaded
destinationCell = getUnknownComponentCell(
pipe.getDestinationID(),
pers,
PipeComponentIF.TYPE_DESTINATION,
labels);
} else {
destinationCell = getComponentCell(
pipeDestinationComponent,
pers,
PipeComponentIF.TYPE_DESTINATION,
labels);
}
/** TODO: If Converter component is unloadable, Converter list should display
label "converter_component_unloadable" (+ConverterID) instead of 'null'
*/
TD convertersCell = getConvertersCell(converterField, pers, labels);
Table componentTable = new Table()
.setBorder(0)
.setCellSpacing(0)
.setCellPadding(5)
.addElement(
new TR()
.addElement(
new TD().addElement(new B(labels.getLabel("source"))).setClass("ttheader1"))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(new B("-->")))
.addElement(
new TD().addElement(new B(labels.getLabel("converters"))).setClass(
"ttheader1"))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(new B("-->")))
.addElement(
new TD().addElement(new B(labels.getLabel("destination"))).setClass(
"ttheader1")))
.addElement(
new TR()
.setVAlign(AlignType.TOP)
.addElement(sourceCell.setBgColor("FFFFFF"))
.addElement(convertersCell.setBgColor("FFFFFF"))
.addElement(destinationCell.setBgColor("FFFFFF")));
// --------------------------
// A button to start the pipe
// --------------------------
Input startButton = new Input(Input.BUTTON, "strt", labels.getLabel("start"));
startButton.setOnClick("document.forms[0]." + ACTION + ".value=" + ACTION_START
+ ";document.forms[0].submit()");
Table infoTable = new Table()
.setBorder(0)
.setCellSpacing(0)
.setCellPadding(5)
.addElement(
new TR()
.addElement(
new TD().addElement(startButton)));
//Add pipe execution information after pipe execution
if(parameters.getInt(ACTION) == ACTION_START) {
infoTable.addElement(
new TD().setRowSpan(1).setVAlign(AlignType.MIDDLE).addElement(new B(labels.getLabel("starttimeeditor")+":")))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(dateFormat.format(pipe.getStartTime())))
.addElement(
new TD().setRowSpan(1).setVAlign(AlignType.MIDDLE).addElement(new B(labels.getLabel("endtimeeditor")+":")))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(dateFormat.format(pipe.getEndTime())))
.addElement(
new TD().setRowSpan(1).setVAlign(AlignType.MIDDLE).addElement(new B(labels.getLabel("editorduration")+":")))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(DurationFormatUtils.formatDuration(pipe.getDuration(),DURATION_FORMAT)))
.addElement(
new TD().setRowSpan(1).setVAlign(AlignType.MIDDLE).addElement(new B(labels.getLabel("editorstatus")+":")))
.addElement(
new TD().setRowSpan(2).setVAlign(AlignType.MIDDLE).addElement(pipe.getLastStatus()));
}
Template generalFieldsTemplate = Template.createTemplate(GENERAL_FIELDS_LAYOUT);
generalFieldsContext.writeEditors(generalFields, generalFieldsTemplate);