You need to sign in to do that
Don't have an account?
Bhupendra yadav
outputfield pass through attribute not working
SFDC documentatoin says that html pass through worksfork with outputfield, however whenever we bind the outputfield with any currency type field and try to pass through attribute it doen'st work. it behave in following way. Am I missing something here ?
Controller
public CObj__c CObj {get;set;}
VF page
<apex:outputField value = '{!CObj.Amount__c}' html-passedValue='XYZ'></apex:outputField>
Generated html
<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.
Controller
public CObj__c CObj {get;set;}
VF page
<apex:outputField value = '{!CObj.Amount__c}' html-passedValue='XYZ'></apex:outputField>
Generated html
<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.
This is the correct syntax,
<apex:outputPanel layout="block" html-data-role="panel" html-data-id="main" <apex:insert name="main"/>
<apex:outputField value = "{!CObj.Amount__c}" html-passedValue="XYZ"></apex:outputField>
Try the text in double quotes and check if that works,
Regards,
Ashish