if(clone)
cols++;
template.setVariable("cols", "" + cols);
Object o=editorResources.getModelValue();
RecallingList pipeList=null;
if(o instanceof RecallingList){
pipeList= (RecallingList) editorResources.getModelValue();
}
//write headers
Template header = template.getBlock("header");
Template headerColumn = header.getBlock("column");
for(Iterator iter = columnFields.iterator(); iter.hasNext();) {
FieldImpl column = (FieldImpl) iter.next();
headerColumn.setVariable("description", column.getDescription());
headerColumn.write();
}
if(move) {
headerColumn.setVariable("description", editorResources.getResource().getLabel(
this.moveLabel));
headerColumn.write();
}
if(delete) {
headerColumn.setVariable("description", editorResources.getResource().getLabel(
this.deleteLabel));
headerColumn.write();
}
if(clone) {
headerColumn.setVariable("description", editorResources.getResource().getLabel(
this.cloneLabel));
headerColumn.write();
}
header.write();
//write field editors
ContainingFieldIterator allFields = getAllFields(editorResources);
int rowNum = 0;
String rowClass = "ttrow1";
Template row = template.getBlock("row");
Template rowColumn = row.getBlock("column");
while(allFields.hasNext()) {
FieldImpl column = (FieldImpl) allFields.next();
if (this.pipeSet != null && pipeList != null) {
Pipe p = ( Pipe ) pipeList.get( rowNum );
if (this.pipeSet.contains( p ))
rowClass = "ttrow3";
}
// set css zeebra-class
rowColumn.setVariable("rowClass", rowClass);