Skip to content

Instantly share code, notes, and snippets.

@jawher
Created August 11, 2010 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawher/519927 to your computer and use it in GitHub Desktop.
Save jawher/519927 to your computer and use it in GitHub Desktop.
Collection<Link> links = Link.select();
e.register("ul#content > li", new Repeater<Link>(
new SimpleValue<Iterable<Link>>(links)), new SubTemplator()
.register("ul.tags li", new Repeater<String>(
new TransformValue<Iterable<String>, Link>(
new ElementDataValue<Link>()) {
@Override
protected Iterable<String> transform(Link s) {
return s.tags;
}
}), new SubTemplator().register("a", new Texter(
new ElementDataValue<String>()))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment