Hide and Show in Visualforce page

Sample code:


public class popup
  public boolean displayPopup {get; set;}

  public void closePopup()
    displayPopup = false;

  public void showPopup()
    displayPopup = true;

Visualforce page:

<apex:page controller = "popup">
    <apex:commandButton value = "Show" action = "{!showPopup}"/>
    <apex:outputPanel layout = "block" rendered = "{!displayPopup}">
      <apex:commandButton value = "hide" action = "{!closePopup}"/>


No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit