0

To save some real estate i just removed pageBlockSection and instead of it i used plain table tag. But the issue is the label defined in the apex:outputText tag has not rendered but the value is.

For example, in the below line of code, label "Number of Sales Orders" did not render but i got the "noof" value displayed on the page. I searched View Page source but did not find the label. What could be the issue?

<td><apex:outputText label="Number of Sales Orders" value="{!SONumOf}" id="noof"/></td>

Issue Code Snippet:

 <apex:pageBlock title="Open Sales Orders" rendered="{!displayOpenSalesOrders}">
            <table>
                <tr>
                    <td><apex:outputText label="Number of Sales Orders" value="{!SONumOf}" id="noof"/></td>     

                    <td><apex:commandButton action="{!GenerateCSV}" id="btnOpenSalesCSV" value="Download" image="{!URLFOR($Resource.UtilityImages, 'Images/Download28x28px.png')}" /> </td>   
                    <td><apex:outputText label="Total Amount" id="totalamount" value="{0,number,0.00}">
                            <apex:param value="{!SOTotalAmount}" />
                        </apex:outputText>
                    </td>
                </tr>
            </table>
            <apex:pageBlockTable value="{!OpenSalesOrders}" var="so"  styleClass="dataTable">
                <apex:column headerValue="Order #" value="{!so.OrderNo}"/>
                <apex:column headerValue="Document Date">
                    <apex:outputText value="{0,date,MM/dd/yyyy}">
                        <apex:param value="{!so.DocumentDate}" />
                    </apex:outputText>
                </apex:column>

                <apex:column headerValue="Purchase Order #" style="width:10%;" value="{!so.PurchaseOrderNo}"/>
                <apex:column headerValue="Sales Org" style="width:10%;" value="{!so.SalesOrg}"/>
                <apex:column headerValue="Amount" style="text-align:right;width:10%;" value="{!so.Amount}"/>
                <apex:column headerValue="Currency" style="text-align:center;" value="{!so.Curren}"/>
                <apex:column headerValue="Products" style="width:30%;" value="{!so.Product}"/>
            </apex:pageBlockTable>

enter image description here

Previous code that worked fine: (this includes pageBlockSection)

 <apex:pageBlock title="Open Sales Orders" rendered="{!displayOpenSalesOrders}">
        <apex:pageBlockSection >
            <apex:outputText label="Number of Sales Orders" value="{!SONumOf}" id="noof"/>     
            <apex:commandButton action="{!GenerateCSV}" id="btnOpenSalesCSV" value="Download" image="{!URLFOR($Resource.UtilityImages, 'Images/Download28x28px.png')}" />       
            <apex:outputText label="Total Amount" id="totalamount" value="{0,number,0.00}">
                <apex:param value="{!SOTotalAmount}" />
            </apex:outputText>

        </apex:pageBlockSection>
        <apex:pageBlockTable value="{!OpenSalesOrders}" var="so"  styleClass="dataTable">
            <apex:column headerValue="Order #" value="{!so.OrderNo}"/>
            <apex:column headerValue="Document Date">
                <apex:outputText value="{0,date,MM/dd/yyyy}">
                    <apex:param value="{!so.DocumentDate}" />
                </apex:outputText>
            </apex:column>

            <apex:column headerValue="Purchase Order #" style="width:10%;" value="{!so.PurchaseOrderNo}"/>
            <apex:column headerValue="Sales Org" style="width:10%;" value="{!so.SalesOrg}"/>
            <apex:column headerValue="Amount" style="text-align:right;width:10%;" value="{!so.Amount}"/>
            <apex:column headerValue="Currency" style="text-align:center;" value="{!so.Curren}"/>
            <apex:column headerValue="Products" style="width:30%;" value="{!so.Product}"/>
        </apex:pageBlockTable>
1

Why not use the apex:outputLabel? It should work.

<td><apex:outputText label="Number of Sales Orders" value="{!SONumOf}" id="noof"/></td>

to

<td><apex:outputLabel for="noof" value="Number of Sales Orders" /><apex:outputText value="{!SONumOf}" id="noof"/></td>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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