1 Reply Latest reply on Jul 8, 2007 7:03 AM by pmuir

    EL Expression String to Component?

      Hi All!

      I have a facelets template tag which gets the name of a bean as a parameter. The inclusion of the tag is as follows:

      <mb:associationTableInclude
      id="GruppeToBenutzers"
      tableInstance="#{associationTableGruppeToBenutzers}"
      

      Now in the Page where i define the tag i can output:
      <h:outputText value="#{tableInstance}"></h:outputText><br/>
      


      which gives me the output:
      associationTableGruppeToBenutzers
      



      But thats just a String. I want the Output that #{associationTableGruppeToBenutzers} would give me:
      associationTableGruppeToBenutzers@587234e
      


      So I can get the attributes and call the methods of the bean.

      So the question is, how to get from the string to the object with that name?
      I tried all sorts of combinations, including:
       ${tableInstance}
       #{ ${tableInstance}}
       #{component.instance(tableInstance)}
      #{interpolator.interpolate(tableInstance)}
       #{expressions.instance().createValueBinding(tableInstance).value}
      ...
      


      Now I'm out of ideas :-)

      Thanks for any light on this.
      Tobias Kilian