I am trying to use the tomahawk div component in a bean and adding children to it dynamically with something like the following:-
<t:div id="entity" binding="#{entityManagedBean.entityDiv}" />
public Div getEntityDiv()
{
log.debug("creating div layer");
Div div = new Div();
HtmlOutputLabel label = new HtmlOutputLabel();
label.setValue("Field 1");
label.setFor("field1");
div.getChildren().add(label);
UIInput o = new UIInput();
o.setId("field1");
o.setRequired(true);
FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding binding = ctx.getApplication().createValueBinding("#{entityManagedBean.testField}");
o.setValueBinding("value", binding);
div.getChildren().add(o);
HtmlMessage message = new HtmlMessage();
message.setFor("field1");
div.getChildren().add(message);
return div;
}
Even though it looks like the children have been added from the debug logging nothing comes out on screen. When I used something other that the t:div, like a panel, it worked fine - am I missing something?
View this message in context: Tomahawk DIV not supporting dynamic children?
Sent from the MyFaces - Users forum at Nabble.com.

