Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <apex:dataTable value="{!acc}" var="a" cellpadding="4" border="1" rows="3">
  2. <apex:column headervalue="account name" width="20">
  3. <apex:inputField value="{!a.Name}"/>
  4. </apex:column>
  5.  
  6. <apex:column headervalue="account site" width="20" >
  7. <apex:inputField value="{!a.site}"/>
  8. </apex:column>
  9.  
  10. <apex:column headervalue="account phone" width="20" >
  11. <apex:inputField value="{!a.phone}"/>
  12. </apex:column>
  13. </apex:dataTable>
  14. </apex:pageBlockSection>
  15.  
  16. <apex:pageBlockButtons location="BOTTOM">
  17. <apex:commandButton action="{!insertNewItem}" value="save"/>
  18. </apex:pageBlockButtons>
  19.  
  20. insert acc;
  21.  
  22. acc= new list<account>();
  23. for(integer i=0 ; i<3 ;i++){
  24. account ac = new account();
  25. acc.add(ac);}
  26. return null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement