Posts

Showing posts with the label pass-through

apex HTML pass through not working

Pass through attribute doesn't generate proper html HTML Pass through provided by salesforce in VF pages has been very useful when working with javascript libraries, However while working on the same I came across a situation where Pass through attribute doesn't get passed to generated html if the binding variable is 'Currency' type. Below is the example. Controller 1: public Opportunity Oppty {get;set;} VF page 1: <apex:outputField value = '{!Oppty.Amount}' html-passedValue='XYZ'></apex:outputField> Generated html 1: <span id="j_id0:j_id1:j_id14">$20</span> Hence you can see that the pass through attribute is not generated. However if you change the binding variable to any type other then Currency, pass through will start working. as shown below. VF page 1: <apex:outputField value = '{!Oppty.name}' html-passedValue='XYZ'></apex:outputField> ...