Find your content:

Search form

You are here

How to display HeaderValue on vf Page

 
Share
<apex:tab label="Opportunity" id="TabTWO" style="font-weight:bold;width:200px;">
                  <apex:pageblock title="Opportunities">
                      <apex:pageblocksection >
                          <apex:pageBlockTable value="{!Opportunities}" var="Opportunity"> 
                              <apex:column headerValue="RecordTypeId" value="{!Opportunity.RecordTypeId}" />
                              <apex:column headerValue="Name" value="{!Opportunity.name}"/>
                              <apex:column headerValue="StageName" value="{!Opportunity.StageName}"/>
                              <apex:column headerValue="CloseDate" value="{!Opportunity.CloseDate}"/>
                              <apex:column headerValue="Sales Representative" value="{!Opportunity.Sales_Rep__c}"/>
                              <apex:column headerValue="Date Of Appointment" value="{!Opportunity.Date_of_Appointment__c}"/>
                          </apex:pageBlockTable>
                      </apex:pageblocksection>
                  </apex:pageblock>            
              </apex:tab>

enter image description here


Attribution to: rakesh

Possible Suggestion/Solution #1

Updating following Screenshot

So they say a picture speaks a thousand words! :) This now looks like a CSS issue to me, rather than anything wrong with the markup you posted in your question, as my demo shows. What other custom CSS do you have on the page?

It looks like the headers are being rendered just being clipped. If you use the Chrome's Developer Tools you will probably find the HTML is being output. It's the CSS that is hiding it. Try removing some of the custom CSS on your page bit by bit. Things like 'style' and 'class' attributes, as well as inline style tags and imports. Also worth trying other browsers, it's unlikely the Salesforce standard CSS is broken though, so my money is still on some custom CSS your using on the page.

Working Sample

Assuming your bindings are returning data (have you debugged this?). Then the VF markup in your example seems to work fine for me? I had to adjust your sample a little as I didn't have the full page or code to test this.

If this does not give you any clues, please include more detail on what your getting and confirm you've check the variables in your controller have the correct data, e.g. you have some rows.

The following code...

<apex:page standardController="Opportunity" recordSetVar="Opportunities">
    <apex:tabPanel>
        <apex:tab label="Opportunity" id="TabTWO"
            style="font-weight:bold;width:200px;">
            <apex:pageblock title="Opportunities">
                <apex:pageblocksection>
                    <apex:pageBlockTable value="{!Opportunities}" var="Opportunity">
                        <apex:column headerValue="Name" value="{!Opportunity.name}" />
                        <apex:column headerValue="StageName"
                            value="{!Opportunity.StageName}" />
                        <apex:column headerValue="CloseDate"
                            value="{!Opportunity.CloseDate}" />
                    </apex:pageBlockTable>
                </apex:pageblocksection>
            </apex:pageblock>
        </apex:tab>
    </apex:tabPanel>
</apex:page>

Resulted in this...

enter image description here


Attribution to: Andrew Fawcett
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/5162

My Block Status

My Block Content