0

I am trying to print out a sum of 2 Integer variables using outputText, however it appears with a different format than normal text. How can I get rid of this formatting?

<apex:outputText value="{0} relationships ">
    <apex:param value="{!numberOfContactRelations + numberOfAccountRelations}"/>
</apex:outputText>
<apex:outputText value="({!numberOfContactRelations} contact/{!numberOfAccountRelations} account)" />

enter image description here

The second outputText looks fine, however, the first one is the one I want to change.

0

Found out that this was caused by wrapping both outputText in a pageBlockSectionItem. Solved this by wrapping it in an outputPanel

<apex:pageBlockSectionItem >
    <apex:outputPanel >
        <apex:outputText value="{!numberOfContactRelations + numberOfAccountRelations} relationships "/>
        <apex:outputText value="({!numberOfContactRelations} contact/{!numberOfAccountRelations} account)" />
    </apex:outputPanel>
</apex:pageBlockSectionItem>

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.