try { if (Tag.class.isAssignableFrom(tagClass)) { customTagModel = new TagTransformModel(tagNameCData, tagClass); } else { customTagModel = new SimpleTagDirectiveModel(tagNameCData, tagClass);
public Writer getWriter(Writer out, Map args) throws TemplateModelException { try { Tag tag = (Tag) getTagInstance(); FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext(); Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper()); return w; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e);
public Writer getWriter(Writer out, Map args) throws TemplateModelException Tag tag = (Tag)getTagInstance(); FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext(); Tag parentTag = (Tag)pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper());
public int afterBody() throws TemplateModelException { try { if (isIterationTag) { int dab = ((IterationTag) tag).doAfterBody(); switch(dab) { case Tag.SKIP_BODY: endEvaluation(); return END_EVALUATION; case IterationTag.EVAL_BODY_AGAIN: return REPEAT_EVALUATION; default: throw new TemplateModelException("Unexpected return value " + dab + "from " + tag.getClass().getName() + ".doAfterBody()"); } } endEvaluation(); return END_EVALUATION; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e); } }
public Writer getWriter(Writer out, Map args) throws TemplateModelException { try { Tag tag = (Tag) getTagInstance(); FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext(); Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper()); return w; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e);
TemplateModel impl; if(Tag.class.isAssignableFrom(tagClass)) { impl = new TagTransformModel(tagClass);
public int afterBody() throws TemplateModelException { try { if (isIterationTag) { int dab = ((IterationTag) tag).doAfterBody(); switch(dab) { case Tag.SKIP_BODY: endEvaluation(); return END_EVALUATION; case IterationTag.EVAL_BODY_AGAIN: return REPEAT_EVALUATION; default: throw new TemplateModelException("Unexpected return value " + dab + "from " + tag.getClass().getName() + ".doAfterBody()"); } } endEvaluation(); return END_EVALUATION; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e); } }
public Writer getWriter(Writer out, Map args) throws TemplateModelException { try { Tag tag = (Tag) getTagInstance(); FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext(); Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper()); return w; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e);
try { if (Tag.class.isAssignableFrom(tagClass)) { customTagModel = new TagTransformModel(tagNameCData, tagClass); } else { customTagModel = new SimpleTagDirectiveModel(tagNameCData, tagClass);
public int afterBody() throws TemplateModelException { try { if (isIterationTag) { int dab = ((IterationTag) tag).doAfterBody(); switch(dab) { case Tag.SKIP_BODY: endEvaluation(); return END_EVALUATION; case IterationTag.EVAL_BODY_AGAIN: return REPEAT_EVALUATION; default: throw new TemplateModelException("Unexpected return value " + dab + "from " + tag.getClass().getName() + ".doAfterBody()"); } } endEvaluation(); return END_EVALUATION; } catch (Exception e) { throw toTemplateModelExceptionOrRethrow(e); } }
try { if (Tag.class.isAssignableFrom(tagClass)) { customTagModel = new TagTransformModel(tagNameCData, tagClass); } else { customTagModel = new SimpleTagDirectiveModel(tagNameCData, tagClass);
throw toTemplateModelExceptionOrRethrow(e);