@Test public void cForNested() { final String results = template.replace( "<c:forEach var=\"currentList\" items='${lists}'}'>" + "\nList: ${currentList}\n" + "<c:forEach var='currentItem' items='${currentList}'>" + " \tItem: ${currentItem}\t" + "</c:forEach>" + "\n------------\n"+ "</c:for>" , Maps.map( "lists", Lists.list( Lists.list("a1", "a2", "a3"), Lists.list("b1", "b2", "b3") ) ) ) ; Boon.equalsOrDie("#\n" + "List: [a1, a2, a3]\n" + " \tItem: a1\t \tItem: a2\t \tItem: a3\t\n" + "------------\n" + "\n" + "List: [b1, b2, b3]\n" + " \tItem: b1\t \tItem: b2\t \tItem: b3\t\n" + "------------\n" + "#", "#"+results +"#"); }
@Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); @Override String replace(String template, Object... context); @Override String replaceFromResource(String resource, Object... context); @Override String replaceFromFile(String resource, Object... context); @Override String replaceFromURI(String resource, Object... context); String inlcudeFromURI(String resource); void displayTokens(); static Template template(); static Template jstl(); void addFunctions(Class<?> functions); void addFunctions(String prefix, Class<?> functions); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); @Override String replace(String template, Object... context); @Override String replaceFromResource(String resource, Object... context); @Override String replaceFromFile(String resource, Object... context); @Override String replaceFromURI(String resource, Object... context); String inlcudeFromURI(String resource); void displayTokens(); static Template template(); static Template jstl(); void addFunctions(Class<?> functions); void addFunctions(String prefix, Class<?> functions);  }