I'm trying to dynamically add a hidden input field to my composite component. The problem is that I somehow can not access the property of my backing facescomponent with the value expression. Example:
public void encodeBegin(FacesContext context) throws IOException {
HtmlInputHidden someInput = new HtmlInputHidden();
someInput.setValueExpression("value", createValueExpression("#{cc ne null}", String.class)); //this will be rendered to <input type="hidden" value="false"/>
...
}
When I use a CDI-Managed-Bean in the value-expression this works. When I add an inputfield with access to #{cc} by using xhtml this also works (e.g. input type="hidden" value="#{cc ne null}"/> will render to input type="hidden" value="true"/>). Is this a bug or am I missing something? I'm using wildfly 8 with mojarra-2.2.6.
Thanks in advance