You need to sign in to do that
Don't have an account?
Issue with apex:OutputText
Hi,
Pls let me know, the error with the following code. In the VF page , the headers are not displaying.
<apex:page controller="BulkDeleteSobject2_Controller" showHeader="true" sidebar="true">
<apex:sectionHeader title="BulkDelete" subtitle="SObject"/>
<apex:form >
<apex:pageBlock id="theBlock">
<apex:pageBlockButtons location="both">
<apex:commandButton value="Delete Selected" action="{!DeleteSelected}" onclick="if(!confirm('Are you sure?')) return false;"/>
</apex:pageBlockButtons>
<apex:pageMessages />
<apex:pageBlockSection columns="1">
<apex:selectList size="1" value="{!SelectedObject}" id="objects">
<apex:selectOptions value="{!sObjectList}" />
<apex:actionSupport event="onchange" action="{!executeSelect}" reRender="theBlock"/>
</apex:selectList>
<apex:pageBlockTable value="{!WrapperList}" var="item" id="records">
<apex:column style="width:100px;">
<apex:facet name="Header">
<apex:outputText value="Delete"/>
</apex:facet>
<apex:inputCheckbox value="{!item.DeleteThis}"/>
</apex:column>
<apex:column >
<apex:facet name="Header">
<apex:outputText value="Name/Id"/>
</apex:facet>
<apex:outputText value="{!item.Name}" rendered="{!HasName == true}"/>
<apex:outputText value="{!item.sObj.Id}" rendered="{!HasName == false}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Pls let me know, the error with the following code. In the VF page , the headers are not displaying.
<apex:page controller="BulkDeleteSobject2_Controller" showHeader="true" sidebar="true">
<apex:sectionHeader title="BulkDelete" subtitle="SObject"/>
<apex:form >
<apex:pageBlock id="theBlock">
<apex:pageBlockButtons location="both">
<apex:commandButton value="Delete Selected" action="{!DeleteSelected}" onclick="if(!confirm('Are you sure?')) return false;"/>
</apex:pageBlockButtons>
<apex:pageMessages />
<apex:pageBlockSection columns="1">
<apex:selectList size="1" value="{!SelectedObject}" id="objects">
<apex:selectOptions value="{!sObjectList}" />
<apex:actionSupport event="onchange" action="{!executeSelect}" reRender="theBlock"/>
</apex:selectList>
<apex:pageBlockTable value="{!WrapperList}" var="item" id="records">
<apex:column style="width:100px;">
<apex:facet name="Header">
<apex:outputText value="Delete"/>
</apex:facet>
<apex:inputCheckbox value="{!item.DeleteThis}"/>
</apex:column>
<apex:column >
<apex:facet name="Header">
<apex:outputText value="Name/Id"/>
</apex:facet>
<apex:outputText value="{!item.Name}" rendered="{!HasName == true}"/>
<apex:outputText value="{!item.sObj.Id}" rendered="{!HasName == false}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
All Answers
Thanks for the Quick response.
It would be great, if you pls let me know the reason why the facet tag was not working.
Thank you
A placeholder for content that's rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_facet.htm
Best Practices for Using Component Facets
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_additional_facet.htm
In <apex:pageBlockTable it better to user <apex:column headerValue='value'.
or use <apex:outputField not <apex:outputText if you are using the standard field