Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to display a text label and check box side by side as a column header in an <apex:pageBlockTable>. Below is my code where I am trying to achieve this:

<apex:page standardController="Account" recordSetVar="accList">
  <apex:pageBlock >
      <apex:form >
          <apex:pageBlockTable value="{!accList}" var="acc">
              <apex:column value="{!}">
                  <apex:facet name="header">{!$Label.Name}<apex:inputCheckbox /></apex:facet>

But on the header only check box is displayed and not the label. Please help me on this.

share|improve this question
up vote 8 down vote accepted

You have the wrong format for the label merge field, hence nothing is being displayed. If you used <apex:outputLabel value="{!$Label.Name}"/> you'd see the error. The value you're trying to display is for custom labels that are defined at an org level.

You can fix this by using {!$ObjectType.Account.Fields.Name.Label}.

That said, if you are trying to use a custom label, or the account name field's label, both cases require that you use an <apex:outputPanel> tag inside the facet to group the components together like so:

<apex:facet name="header">
  <apex:outputPanel layout="none">
    <apex:outputLabel value="{!$ObjectType.Account.Fields.Name.Label}"/><apex:inputCheckbox />
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.