Package com.nexirius.ulc.example1.function

Source Code of com.nexirius.ulc.example1.function.MyColorFunction

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());
        }
    }
}
TOP

Related Classes of com.nexirius.ulc.example1.function.MyColorFunction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.