You need to sign in to do that
Don't have an account?
Hemnth
Cannot display Lists in visualforce Page. Tried alternatives such as sets and maps still no luck
I tried a simpe code to display a list of contacts in vfpage
checked all sharing settings every thing is public
this is my new dev edition signedup today
i had same issue with one signed up this month
is this a bug or an issue with my code
--- I can see contacts in debug logs
public class Payment { public List<Contact> ls{get;set;} public Set<String> st{get;set;} public string str{get;set;} public Payment(){ List<Contact> ls = new List<Contact>(); ls = [select id, name from contact limit 3]; Set<String> st = new Set<String>(); st.add('1111111'); st.add('addad'); st.add('gxghdy'); st.add('6366vx'); str = '123'; } }
<apex:page controller="Payment"> {!ls}{!st}{!str} <apex:pageBlock > <apex:pageBlockTable value="{!ls}" var="a"> <apex:column value="{!a.name}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
checked all sharing settings every thing is public
this is my new dev edition signedup today
i had same issue with one signed up this month
is this a bug or an issue with my code
--- I can see contacts in debug logs
we have same post related to your requirement, check folloing post
https://developer.salesforce.com/forums/?id=9060G000000XivqQAC
Thanks, let us know if it will helps you
your code is perfect but contact list variable was decleared again new in constracter that's was an issue, Please use below code that's was working perfect :--
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
use <apex:form> tag in VF code and don't declare again set of string and List of contact in the constructor Hope this helps you