Hi there,
I know that gwt templates don't support loops.
However, I'd like to have a loop in a render() method.
Let's say I have this simple UiRenderer template:
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder">
<ui:with field='name' type='java.lang.String' />
<div id="main">
<h2><ui:text from='{name}' /></h2>
<div id="HERE"></div>
</div>
</ui:UiBinder>
What I need to do is put some new code into div#HERE from render method.
Something like:
public void render(Context context, EntityProxy e, SafeHtmlBuilder sb) {
renderer.render(sb, e.getName());
for(Item item : e.getItems()) {
String s = "<span>"+item.getName()+"</span>";
//How to put every s from this loop into div#HERE ?
}
}
Obviously, this can be done in traditional way without templates. I'm just
wondering if it is possible with new UiRenderer.
Thanks,
Peter
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/fYwMtC7YrCQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.