package com.nexirius.ulc.example1.function;
import com.nexirius.framework.datamodel.DataModel;
import com.nexirius.framework.htmlview.HTMLParser;
import com.nexirius.framework.htmlview.HTMLSessionVariable;
import com.nexirius.framework.htmlview.function.HTMLFunction;
public class MyColorFunction implements HTMLFunction {
public String getFunctionName() {
return "MyColorFunction";
}
public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser, String[] arguments) throws Exception {
DataModel model = parser.getModel();
String backgroundColorId = model.getBackgroundColorId();
if (backgroundColorId != null) {
parser.getOut().write("BGCOLOR=$!color(\"".getBytes());
parser.getOut().write(backgroundColorId.getBytes());
parser.getOut().write("\")".getBytes());
}
}
}