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 7567543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:41:25+00:00 2026-05-30T14:41:25+00:00

I want the checkbox only to be rendered, if the label is not empty.

  • 0

I want the checkbox only to be rendered, if the label is not empty.

<tr:panelCaptionGroup>
...
    <tr:selectBooleanCheckbox 
        id="XField1"
        render="#{!empty myController.form.model.XField1}"
        value="#{myController.form.model.XFieldChecked1}"
        text="#{myController.form.model.XField1}"
        simple="false" />
</tr:panelCaptionGroup>

XField1 is a String, XFieldChecked1 is a Boolean. It does not work, it always shows the checkbox, even if the string is null or “”.

In that case, the output is (removed some attributes for clarity):

<table border="0" summary="" class="af_selectBooleanCheckbox" id="modelXField3__xc_">  
<tbody><tr>
  <td nowrap="" class="af_selectBooleanCheckbox_label"></td>
  <td valign="top" nowrap="" class="AFContentCell">
    <span id="modelXField3__xc_c" class="af_selectBooleanCheckbox_content">
      <input type="checkbox" value="t" name="modelXField3" id="modelXField3">
      <label for="modelXField3"></label>
    </span>
  </td>
</tr></tbody>
</table>
  • 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-30T14:41:27+00:00Added an answer on May 30, 2026 at 2:41 pm

    As for every other JSF UI component, the attribute name is rendered, not render.

    See also:

    • <tr:selectBooleanCheckbox> tag documentation
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to send the form after clicking on the label next to checkbox.
I want to use checkbox on datatable like that : <h:selectBooleanCheckbox styleClass=selectBooleanCheckbox valueChangeListener=#{CompletedInventoriesBean.changeUID} value=#{CompletedInventoriesBean.isChecked(userinventorieswithuser.id)}
I want to submit a form only if a checkbox is checked (as opposed
How to grey out a checkbox? I want a checkbox to be clickable only
I want to have a checkbox for terms and conditions, label of which should
I want to get the selected Indices or Items only in checkBox lsit instead
So I want to submit only when a checkbox is checked (I want to
I want to include checkbox in Twitter Bootstrap drop-down menu's but I'm unable to
I want my website to have a checkbox that users can click so that
I want to create a table structure with checkbox for each row and each

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.