You need to sign in to do that
Don't have an account?
How to list multiple contacts in a Lightning app based on a custom Visualforce page
Hello, I am quite new in Visualfroce so my question could be considered quite stupid by some of you. I apologize for that.
I created a custom VisualForce page listing one account and its related list of contacts. Display was done via a pageBlockTable (see code below), it worked fine but was not optimal to be displayed on a mobile device..
<apex:pageBlockTable value="{!contacts}" var="cont_acc" columns="3">
<apex:column value="{!cont_acc.Name}"/>
<apex:column value="{!cont_acc.Phone}"/>
<apex:column value="{!cont_acc.Email}"/>
</apex:pageBlockTable>
So I changed strategy, and I am using html formatting+apex:outputField function in order to enhance the layout of the page. It works, but only for the insertion of one single contact. See code extract below (part of a <table> element):
<tr>
<td><apex:outputField value="{!contacts[0].Name}" /></td>
<td><apex:outputField value="{!contacts[0].Phone}" /></td>
<td><apex:outputField value="{!contacts[0].EMail}" /></td>
</tr>
Is there something which would allow me to have at the same time all data of pageBlockTable (so the whole list of contacts related to a particular account) but keeping the nice tabular HTML formatting? In other words, something like a C/C++ "for" cycle?
Thanks a lot in advance for your help on this! Cheers from Germany
You can use the jQuery or Bootstrap to make the UI more responsible for the users. Check this link http://elvery.net/demo/responsive-tables/ which helps to build the responsive table. Check this link for how to use bootstrap in visualforce page https://developer.salesforce.com/blogs/developer-relations/2014/03/twitter-bootstrap-and-visualforce-in-minutes.html
All Answers
You can use the jQuery or Bootstrap to make the UI more responsible for the users. Check this link http://elvery.net/demo/responsive-tables/ which helps to build the responsive table. Check this link for how to use bootstrap in visualforce page https://developer.salesforce.com/blogs/developer-relations/2014/03/twitter-bootstrap-and-visualforce-in-minutes.html