function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cha Tumtaweetikul 2Cha Tumtaweetikul 2 

Help w/ Visualforce page - apex:param rendering

I have the following:

<apex:outputText value="{0, number, currency}"><li>{!$ObjectType.Trips_Meetings__c.fields.Budget__c.Label}: <apex:param value="{!relatedTo.Budget__c}"/></li></apex:outputText>

Budget__c is already a currency field type, but I had to add 
value="{0, number, currency}"
in order to display the value with currency symbol and comma.

However, <apex:param/> is getting rendered w/ the <span> automatically.

This is what the result currently looks like:
  • Client Matter #: 55604
  • Estimated Cost:
           $55,604.00
  • Proposed Dates: test
But the goal is to have it displayed as:
  • Client Matter #: 55604
  • Estimated Cost: $55,604.00
  • Proposed Dates: test
I've tried using <apex:variable> and <apex:outputpanel>, but that did not do anything. How do I prevent the child of <apex:outputText>, <apex:param>, getting rendered w/ the <span>.

 
Maharajan CMaharajan C
Hi  Tumtaweetikul ,

Please try the below way:
<apex:outputText label="{!$ObjectType.Trips_Meetings__c.fields.Budget__c.Label}:" value="{0, number, currency}">
   <apex:param value="{!relatedTo.Budget__c}" />
</apex:outputText>

Thanks,
Maharajan.C
Cha Tumtaweetikul 2Cha Tumtaweetikul 2
I tried it, but still did not work. The extra spacing from <span> that is getting rendered by <apex:param/> is still there.
Dushyant SonwarDushyant Sonwar
Try the below code , it will work :)
<li>
    <apex:outputText value="{0, number, currency}">
        {!$ObjectType.Trips_Meetings__c.fields.Budget__c.Label}: <apex:param value="{!relatedTo.Budget__c}"/>
    </apex:outputText>
  </li>
Cha Tumtaweetikul 2Cha Tumtaweetikul 2
Thank you @Dushyant, I got it to work, thank you!!
Suraj Tripathi 47Suraj Tripathi 47

Hi,

<li>
    <apex:outputText value="{0, number, currency}">
        {!$ObjectType.Trips_Meetings__c.fields.Budget__c.Label}: <apex:param value="{!relatedTo.Budget__c}"/>
    </apex:outputText>
  </li>