0 Replies Latest reply on Jul 11, 2008 7:22 AM by toroskar

    Programmatically binding of an UIComponent to a backing bean

    toroskar

      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)}"/>
      


      But in my case I have to do the same programmatically, but I'm not able to get it working.

      This is the code:
      HtmlModalPanel modalPanel = new HtmlModalPanel();
      
      ValueExpression ve = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createValueExpression( FacesContext.getCurrentInstance().getELContext(),"#
      {logit$visualizationManager.childrenViz}",String.class);
      
      modalPanel.setValueExpression("binding" +",ve);
      
      


      I didn't get any type of errors, but nothing is happening..

      Can anyone help me to figure out what's wrong? Thanks in advance