Inject values of the variable.

Hello bar!

name:bar

age:20

/UrlRules.java
rules.add("/var-injection/{name}/{age}", "/templates/variableinjection.html").priority(1);
/templates/variableinjection.html
<section>
	<article>
		<!-- the default "render" method of SimpleSnippet will be used -->
		<div afd:render="SimpleSnippet">title here</div>

		<afd:snippet render="SimpleSnippet:setProfileByVariableInjection">
			<p id="name">name:<span>dummy name</span></p>
			<p id="age">age:<span>0</span></p>
		</afd:snippet>
	</article>
</section>
/snippet/SimpleSnippet.java
public Renderer render(String name) {
    // replace the whole title node
    if (StringUtils.isEmpty(name)) {
        name = "Asta4D";
    }
    Element element = ElementUtil.parseAsSingle("<div>Hello " + name + "!</div>");
    return Renderer.create(":root", element);
}

public Renderer setProfileByVariableInjection(String name, int age) {
    Renderer render = Renderer.create();
    render.add("p#name span", name);
    render.add("p#age span", age);
    return render;
}