Convert Comma Separated String to a List Using Apex
String name = 'Biswajeet, Abhijeet, Arijeet, Subhojeet'; List<String> lstName = name.split(','); System.debug(lstName);
String name = 'Biswajeet, Abhijeet, Arijeet, Subhojeet'; List<String> lstName = name.split(','); System.debug(lstName);
Set the apex:pageBlock mode="edit"
.
<apex:page standardController="Account"> <apex:form> <apex:pageBlock mode="edit" title="Account"> <apex:pageBlockButtons > <apex:commandButton action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:outputPanel> <apex:pageBlockSection columns="2" title="Account Information"> <apex:inputField value="{!Account.Name}" required="true"/> <apex:inputField value="{!Account.Phone}"/> </apex:pageBlockSection> </apex:outputPanel> </apex:pageBlock> </apex:form> </apex:page>
<apex:commandButton reRender="frm" value="Remove" action="{!remove}" onclick="if(!confirm('Do you want to remove?')){return false};" title="Remove"/>
Visualforce Page Button:
<apex:commandButton action="{!back}" value="Back"/>
Apex Controller:
public with sharing class ExampleController { private ApexPages.StandardController sctrl; public SaveAndReturnController(ApexPages.StandardController stdController) { this.sctrl = stdController; } public PageReference back() { PageReference cancel = sctrl.cancel(); return cancel; } }
Datetime dt = (Datetime)Account.Start_Date__c; Date d = dt.format('MM/dd/yyyy');