Class OKPopup

java.lang.Object
org.eclnt.jsfserver.defaultscreens.OKPopup
All Implemented Interfaces:
Serializable, BasePopup.IPopupListener, ModalPopup.IModalPopupListener, ICCServerConstants

public class OKPopup extends Object implements Serializable, ModalPopup.IModalPopupListener, ICCServerConstants
Default popup dialog for message output.

Instances of the popup dialog are created using the createInstance* methods.

There are three texts that can be passed:

(.) a title, this is the popup window's title
(.) a text, this is the message
(.) a headline, this is a (typically) short text that you may output as headline in front of the message text. The headline is rendered with a larger font. The headline is optional.

You can register an event listener in order to get notified when the user has pressed the OK-button.
See Also:
  • Field Details

    • PAGENAME_DEFAULT

      public static String PAGENAME_DEFAULT
    • PAGENAME_HTML

      public static String PAGENAME_HTML
  • Constructor Details

    • OKPopup

      public OKPopup()
  • Method Details

    • initialize

      public static void initialize()
    • createInstance

      public static OKPopup createInstance(String title, String text)
    • createInstance

      public static OKPopup createInstance(String title, String text, OKPopup.IOKListener okListener)
    • getBodyBackgroundColor

      public String getBodyBackgroundColor()
    • setBodyBackgroundColor

      public void setBodyBackgroundColor(String bodyBackgroundColor)
    • setText

      public void setText(String value)
    • getText

      public String getText()
    • setTextAlign

      public void setTextAlign(String value)
    • getTextAlign

      public String getTextAlign()
    • setTextColor

      public void setTextColor(String value)
    • getTextColor

      public String getTextColor()
    • setTextContentType

      public void setTextContentType(String textContentType, boolean avoidSanitizing)
      Parameters:
      textContentType -
      avoidSanitizing - If set to true then the text content will be inserted into the client side HTML without any sanitizing. You are responsible for ensuring that no e.g. unwanted script is part of the HTML.
    • setTextContentType

      public void setTextContentType(String textContentType)
    • getTextContentType

      public String getTextContentType()
    • getTextContentAvoidSanitizing

      public boolean getTextContentAvoidSanitizing()
    • getButtonImage

      public String getButtonImage()
    • setButtonImage

      public void setButtonImage(String buttonImage)
    • getCancelButtonImage

      public String getCancelButtonImage()
    • setCancelButtonImage

      public void setCancelButtonImage(String cancelButtonImage)
    • getImageBackgroundColor

      public String getImageBackgroundColor()
    • setImageBackgroundColor

      public void setImageBackgroundColor(String imageBackgroundColor)
    • getImageBgpaint

      public String getImageBgpaint()
    • setImageBgpaint

      public void setImageBgpaint(String imageBgpaint)
    • getHeadlineRendered

      public boolean getHeadlineRendered()
    • setHeadline

      public void setHeadline(String value)
    • getHeadline

      public String getHeadline()
    • setIcon

      public void setIcon(String value)
    • getIcon

      public String getIcon()
    • getModalPopup

      public ModalPopup getModalPopup()
    • isIconRendered

      public boolean isIconRendered()
    • onClose

      public void onClose(javax.faces.event.ActionEvent ae)
    • onCancel

      public void onCancel(javax.faces.event.ActionEvent ae)
    • close

      public void close()
    • reactOnPopupClosedByUser

      public void reactOnPopupClosedByUser()
      Specified by:
      reactOnPopupClosedByUser in interface BasePopup.IPopupListener
    • setTextOk

      public void setTextOk(String value)
      Explicitly set the text of the OK button - otherwise the default text will be shown.
    • getTextOk

      public String getTextOk()
    • setTextCancel

      public void setTextCancel(String value)
      Set the text of cancel-button. If not specified the default text is shown.
    • getTextCancel

      public String getTextCancel()
    • setShowCancel

      public void setShowCancel(boolean value)
      By default the popup has an OK button - the user can cancel by closing the popup usRing the normal popup close icon. But: if setting showCancel to "true" then the cancel button is shown explicitly.
    • getShowCancel

      public boolean getShowCancel()
    • getBodyBgpaint

      public String getBodyBgpaint()
    • setBodyBgpaint

      public void setBodyBgpaint(String bodyBgpaint)