Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5967347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:55:51+00:00 2026-05-22T19:55:51+00:00

How can I get rid of the empty space by components not rendered via

  • 0

How can I get rid of the empty space by components not rendered via rendered attribute?

I want to display a list of objects in a dataTable and sort them by a property they have. I do it likes this:
view plaincopy to clipboardprint?

<t:dataTable value="#{someBean.values}" var="value">  
    <h:column>  
        <f:facet name="header">  
            <t:outputText value="X" />  
        </f:facet>  
        <h:panelGroup rendered="#{value.property eq 'X'}">  
          <!-- some stuff -->  
        </h:panelGroup>  
    </h:column>  
    <h:column>  
        <f:facet name="header">  
            <t:outputText value="Y" />  
        </f:facet>  
        <h:panelGroup rendered="#{value.property eq 'Y'}">  
          <!-- some stuff -->  
        </h:panelGroup>  
    </h:column>                 
</t:dataTable>  

It will display one item every row only, because of the rendered thingy. How can I avoid this? I stumpled upon this also on other occasions…

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:55:52+00:00Added an answer on May 22, 2026 at 7:55 pm

    Use a single column and render in there.

    <t:dataTable value="#{someBean.values}" var="value">  
        <h:column>  
            <f:facet name="header">  
                <t:outputText value="#{value.property}" />  
            </f:facet>  
            <h:panelGroup rendered="#{value.property eq 'X'}">  
              <!-- some stuff -->  
            </h:panelGroup>  
            <h:panelGroup rendered="#{value.property eq 'Y'}">  
              <!-- some stuff -->  
            </h:panelGroup>  
        </h:column>                 
    </t:dataTable>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to get rid of the strip of empty space at the
The black lines are awful, how can I get rid of them? I want
Can someone figure out how to get rid of the NOT EXISTS statements in
How can i get rid of Zend default error not to show Value is
Does anyone know how I can get rid of the following assembler warning? Code
How can I get rid of: <input type=hidden name=__VIEWSTATE id=__VIEWSTATE value=.../> Completely !
How can i get rid of trailing spaces in preg_split result without using preg_replace
I can't get rid of compiler warning assignment makes pointer from integer without a
I can't seem to get rid of this error- Parse error: syntax error, unexpected
Can get all triples with value null in specific field? All people with date_of_birth

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.