2 Replies Latest reply on Jan 27, 2010 10:20 AM by v.lukoyanov

    if-else for s:fragment

    v.lukoyanov

      I know it's a quite stupid question, but anyway what is the best practice to replace this ugly construction?



      <s:fragment rendered="#{<LONG EL-expression>}">
      a
      </s:fragment>
      <s:fragment rendered="#{not <LONG EL-expression>}">
      b
      </s:fragment>




      As far as I understand the LONG EL-expression is calculated twice and that's BAD. So is there any if-else to be used in .xhtml?


      Thanks in advance.