Search in sources :

Example 1 with CustomTag

use of org.webpieces.templating.impl.tags.CustomTag in project webpieces by deanhiller.

the class MyHtmlTagCreator method createTags.

@Override
public List<Tag> createTags() {
    List<Tag> tags = new ArrayList<Tag>();
    // add any custom tags you like here...
    tags.add(new CustomTag("/webpiecesxxxxxpackage/web/tags/mytag.tag"));
    tags.add(new IdTag(converter, "/webpiecesxxxxxpackage/web/tags/id.tag"));
    // you can also override(subclass or whatever) any tag by replacing it in the map
    // This replaces the field tag
    // put(new FieldTag(converter, "/webpiecesxxxxxpackage/base/tags/field.tag"));
    // This one subclasses FieldTag to add yet another field tag using #{myfield}# such that
    // we then can use #{field}# and #{myfield}# for different types of fields
    tags.add(new MyFieldTag(converter));
    return tags;
}
Also used : ArrayList(java.util.ArrayList) CustomTag(org.webpieces.templating.impl.tags.CustomTag) Tag(org.webpieces.ctx.api.extension.Tag) CustomTag(org.webpieces.templating.impl.tags.CustomTag)

Aggregations

ArrayList (java.util.ArrayList)1 Tag (org.webpieces.ctx.api.extension.Tag)1 CustomTag (org.webpieces.templating.impl.tags.CustomTag)1