@@ -0,0 +1,1873 @@
+package com.wizzardo.http.framework.template.taglib.g;%0A%0Aimport com.wizzardo.http.framework.template.Body;%0Aimport com.wizzardo.http.framework.template.ExpressionHolder;%0Aimport com.wizzardo.http.framework.template.RenderResult;%0Aimport com.wizzardo.http.framework.template.Tag;%0Aimport com.wizzardo.tools.evaluation.AsBooleanExpression;%0A%0Aimport java.util.Map;%0A%0A/**%0A * Created by wizzardo on 26.05.15.%0A */%0Apublic class CheckBox extends Tag %7B%0A%0A    @Override%0A    public Tag init(Map%3CString, String%3E attrs, Body body, String offset) %7B%0A        ExpressionHolder name = new ExpressionHolder%3C%3E(remove(attrs, %22name%22), true);%0A%0A        String id = attrs.remove(%22id%22);%0A        String value = attrs.remove(%22value%22);%0A%0A        append(offset);%0A        append(%22%3Cinput type=%5C%22checkbox%5C%22 name=%5C%22%22);%0A        append(model -%3E %7B%0A            RenderResult result = new RenderResult();%0A            String nameString = String.valueOf(name.getRaw(model));%0A            result.append(nameString);%0A            if (id == null)%0A                result.append(%22%5C%22 id=%5C%22%22).append(nameString);%0A%0A            return result;%0A        %7D);%0A%0A        if (id != null)%0A            append(%22%5C%22 id=%5C%22%22).append(new ExpressionHolder%3C%3E(id, true));%0A%0A        append(%22%5C%22%22);%0A        if (value != null)%0A            append(%22 value=%5C%22%22).append(new ExpressionHolder%3C%3E(value, true)).append(%22%5C%22%22);%0A%0A        String ch;%0A        if ((ch = attrs.remove(%22checked%22)) != null) %7B%0A            if (ch.equalsIgnoreCase(%22true%22))%0A                append(%22 checked=%5C%22checked%5C%22%22);%0A            else if (!ch.equalsIgnoreCase(%22false%22)) %7B%0A                ExpressionHolder checked = new ExpressionHolder%3C%3E(ch, true);%0A                append((model) -%3E new RenderResult(AsBooleanExpression.toBoolean(checked.getRaw(model)) ? %22 checked=%5C%22checked%5C%22%22 : %22%22));%0A            %7D%0A        %7D%0A%0A        prepareAttrs(attrs);%0A        append(%22/%3E%5Cn%22);%0A        return this;%0A    %7D%0A%7D%0A

add CheckBox tag