I am developing a application in which I am trying to bind an UIComponent (in this case the rich:modalPanel) component to a backing bean. When i do this fro an jsf file it works fine
<rich:panel binding="#{logit.visualizationManager.visualize(visualizationGraph)}"/>
HtmlModalPanel modalPanel = new HtmlModalPanel(); ValueExpression ve = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createValueExpression( FacesContext.getCurrentInstance().getELContext(),"# {logit$visualizationManager.childrenViz}",String.class); modalPanel.setValueExpression("binding" +",ve);