datatable and jstl together in jsf

Discussion in 'Java' started by yok ki, Sep 12, 2008.

  1. yok ki

    yok ki Guest

    Hi,

    I have that simplified code lets say:

    <h:datatable value="#{data.contacts}" var="contact">
    <h:column>
    <h:eek:utputText value="#{contact.name}" />
    </h:column>
    </h:datatable>

    and when i want to use a detail in that bean lets say showName boolean
    variable, how can i take that condition into that code?

    if i put that condition as usual, it is not working because contact is
    not a bean defined in managed beans.

    <c:if test="${contact.showName}">
    <h:column>
    <h:eek:utputText value="#{contact.name}" />
    </h:column>
    </c:if>


    and unfortunately our usual jsf syntax is not working also.

    <c:if test="#{contact.showName}">
    <h:column>
    <h:eek:utputText value="#{contact.name}" />
    </h:column>
    </c:if>

    Could you please lead me for a solution if you have any idea?

    Thanks and Regards...
    yok ki, Sep 12, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrea Desole

    JSF version of JSTL forEach?

    Andrea Desole, Dec 7, 2004, in forum: Java
    Replies:
    3
    Views:
    13,544
    masterprogrammer
    Aug 21, 2006
  2. Robert Mark Bram

    Custom JSTL that accepts JSTL expression

    Robert Mark Bram, Dec 15, 2004, in forum: Java
    Replies:
    0
    Views:
    970
    Robert Mark Bram
    Dec 15, 2004
  3. Replies:
    0
    Views:
    3,341
  4. beatdown

    JSF and JSTL

    beatdown, Jun 26, 2006, in forum: Java
    Replies:
    3
    Views:
    5,772
    Danno
    Jun 26, 2006
  5. DaFoot
    Replies:
    1
    Views:
    1,690
    DaFoot
    Oct 23, 2008
Loading...

Share This Page