Guest User

Untitled

a guest
Mar 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. public class RenderExampleClass {
  2. /****get set varaible which will carry the true or false condition to the page****/
  3. public Boolean showPanelHistory{ get; set;}
  4. /****get set varaible which carry the list of accounts to the page****/
  5. public Account accountList{ get; set;}
  6.  
  7. /****Acction method which is used in the page which acts like switch*****/
  8. public PageReference showpanel(){
  9. if(showPanelHistory == false) {
  10. showPanelHistory = true;
  11. }
  12. else if(showPanelHistory == true){
  13. showPanelHistory = false;
  14. }
  15. return null;
  16. }
  17. /***Example methos that to query the list of accounts***/
  18. public void accountList(){
  19. accountList = [
  20. SELECT Id,
  21. Name,
  22. Type
  23. FROM Account
  24. ];
  25. }
  26. /***** Setting up showPanelHistory = false directly in constructor
  27. so when page loads the switch willl be in false condition********/
  28. public RenderExampleClass() {
  29. showPanelHistory = false;
  30. }
  31. }
Add Comment
Please, Sign In to add comment