You need to sign in to do that
Don't have an account?
Patrick Ledbetter HS
apex:outputField will not render a div tag correctly
From VF Page:
<div style="float: left; width: 20%;">
<apex:outputField value="{!d.Company__c}" />
</div>
In the controller, if the Company__c is null, I want to set its value to '<div class="spacer" />' so that the div tag is rendered correctly on the page. My output at the moment is literally <div class="spacer" />.
The goal is to have 5 static columns on the page but if one of the custom fields for the custom object is null, I just want a placeholder there in the HTML so that everything continues to line up correctly.
Please review this code :-
Apex Controller :- ShowHideHTMLControler Vfpage:-
Kindly mark my solution as the best answer if it helps you.
Regards
Mukesh
All Answers
Please review this code :-
Apex Controller :- ShowHideHTMLControler Vfpage:-
Kindly mark my solution as the best answer if it helps you.
Regards
Mukesh
<!-- COLUMN 1 DATA -->
<apex:outputPanel rendered="{!d.Company__c != null}">
<div style="float: left; width: 20%;">
<apex:outputField value="{!d.Company__c}" />
</div>
</apex:outputPanel>
<apex:outputPanel rendered="{!d.Company__c == null}">
<div style="float: left; width: 20%;"> </div>
</apex:outputPanel>