Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page controller="SampleCode">
- <apex:form>
- <apex:repeat value="{!AccountList}" var="a">
- <apex:outputField value="{! a.Name}"/>
- </apex:repeat>
- <apex:commandButton value="Submit" action="{! submit}"/>
- </apex:form>
- public class SampleCode {
- public List<Account> Accounts=new List<Account>();
- public List<Account> getAccountList(){
- Accounts=[Select Id,Name from Account];
- Details();
- Return Accounts;
- }
- public pageReference submit(){
- system.debug(2);
- //code here
- return null;
- }
- public void Details(){
- //Details code here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement