You need to sign in to do that
Don't have an account?
roni shore
Display comma separated values
Hi Guys - I have written a controller which is being used in an vf component. My issue is I need to display adresses comma seperated.
pls suggest
controller
------------
public with sharing class DisplayList{
public List<Address__c> Records {get; set;}
public DisplayList(){
Records = [SELECT Name
FROM Address__c
WHERE Billing_Account__c = :ApexPages.currentPage().getParameters().get('Id')];
system.debug('record-->'+Records);
}
}
vf component snippet
=----------------------------
</apex:repeat>
<apex:repeat value="{!Records}" var="Record">
<div><span>Service Addresses:</span><span><apex:outputText value="{!Record.Name}" escape="false"/></span></div>
</apex:repeat>
pls suggest
controller
------------
public with sharing class DisplayList{
public List<Address__c> Records {get; set;}
public DisplayList(){
Records = [SELECT Name
FROM Address__c
WHERE Billing_Account__c = :ApexPages.currentPage().getParameters().get('Id')];
system.debug('record-->'+Records);
}
}
vf component snippet
=----------------------------
</apex:repeat>
<apex:repeat value="{!Records}" var="Record">
<div><span>Service Addresses:</span><span><apex:outputText value="{!Record.Name}" escape="false"/></span></div>
</apex:repeat>
If you want to display the addresses seperated by comma in single line then refer the below code:
VF Page: Apex Code:
Hope this helps.
All Answers
If you want to display the addresses seperated by comma in single line then refer the below code:
VF Page: Apex Code:
Hope this helps.