You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by astilla <an...@talis.com> on 2006/06/22 10:26:47 UTC
Tomahawk DIV not supporting dynamic children?
Hi,
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: http://www.nabble.com/Tomahawk-DIV-not-supporting-dynamic-children--t1828873.html#a4989127
Sent from the MyFaces - Users forum at Nabble.com.