Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RenderExampleClass {
- /****get set varaible which will carry the true or false condition to the page****/
- public Boolean showPanelHistory{ get; set;}
- /****get set varaible which carry the list of accounts to the page****/
- public Account accountList{ get; set;}
- /****Acction method which is used in the page which acts like switch*****/
- public PageReference showpanel(){
- if(showPanelHistory == false) {
- showPanelHistory = true;
- }
- else if(showPanelHistory == true){
- showPanelHistory = false;
- }
- return null;
- }
- /***Example methos that to query the list of accounts***/
- public void accountList(){
- accountList = [
- SELECT Id,
- Name,
- Type
- FROM Account
- ];
- }
- /***** Setting up showPanelHistory = false directly in constructor
- so when page loads the switch willl be in false condition********/
- public RenderExampleClass() {
- showPanelHistory = false;
- }
- }
Add Comment
Please, Sign In to add comment