I don't know what happened in your case (why rendered="#{1==2}" evaluated to "true"), the "rendered" attribute accepts any boolean expression, take a look in this article to see the sintax and operators accepted by the EL:

http://developers.sun.com/docs/jscreator/help/2update1/jsp-jsfel/jsf_expression_language_intro.html

Glauco P. Gomes

Anton Gavazuk escreveu:
Thanks,

wanted something more 'dynamic'

by the way which conditions accepts rendered attribute?
I tried rendered="#{1==2}"
and component is still being rendered - maybe I made mistake in expression?


2009/4/29 Glauco P. Gomes <[email protected] <mailto:[email protected]>>

    Try this:


    <h:dataTable var="raw">
     <h:column>
       <h:outputText value="1" rendered="#{condition1}" />
       <h:outputText value="2" rendered="#{not condition1}" />
     <h:column>
    </h:dataTable>

    Glauco P. Gomes

    Anton Gavazuk escreveu:

        Hi all,

        question - is it possible to somehow manage table row items or
        even whole table row inside dataTable tag:

        what I want to get in result:

        <h:dataTable var="raw">
          <h:column>
              <c:choose>
                   <c:when test="condition1">
                          1
                    </c:when>
                   <c:otherwise>
                         2
                    </c:otherwise>
              </c:choose>
          <h:column>
        </h:dataTable>

        I tried this, but it doesnt work and I suppose why. So is it
        possible somehow to work with dataTable items in any way?

        Thanks,
        Anton




Reply via email to