0 Replies Latest reply on Jun 23, 2010 10:42 AM by astein

    Nested EL-Expressionfor included pages

    astein

      Hi there.


      I'm trying to parameterize a xhtml page that is included into another page.


      <ui:include src="include.xhtml">
        <ui:param name="parameter" value="PARAMETERVALUE" />
      </ui:include>
      



      Normally, this is not a problem as you can access the value of the passed-in parameter via



      #{parameter}



      in the other xhtml page.


      Now i want to parameterize an already existing EL expression, something like



      <h:outputText value="#{myBean.doSomething(FIXEDPART1 #{parameter} FIXEDPART2)}" />



      I tried a lot of things: (surround parameter with ', [ and ], $ and so on), but nothing worked.


      The only thing that finally worked was a nested EL expression without the fixed parts before and after:


      <h:outputText value="#{myBean.doSomething(parameter)}" />



      But I need those. Is there any way to do this? I'm attempting to get this working for some time now...
      Of course there are ugly workarounds like


      <c:set var="variable" value="myBean.doSomething(FIXEDPART1 #{parameter} FIXEDPART2)" />
      <h:outputText value="#{variable}" />
      



      but I'd like to know if there's another, less hack-like way... Any ideas? Thanks!


      --


      André