Class DialogFrameworkOptions.Builder

java.lang.Object
org.primefaces.model.DialogFrameworkOptions.Builder
Enclosing class:
DialogFrameworkOptions

public static final class DialogFrameworkOptions.Builder extends Object
  • Method Details

    • widgetVar

      public DialogFrameworkOptions.Builder widgetVar(String widgetVar)
      Custom widgetVar of the dialog, if not declared it will be automatically created as "id+dlgWidget".
      Parameters:
      widgetVar -
      Returns:
    • modal

      public DialogFrameworkOptions.Builder modal(boolean modal)
      Controls modality of the dialog.
      Parameters:
      modal -
      Returns:
    • resizable

      public DialogFrameworkOptions.Builder resizable(boolean resizable)
      When enabled, makes dialog resizable.
      Parameters:
      resizable -
      Returns:
    • draggable

      public DialogFrameworkOptions.Builder draggable(boolean draggable)
      When enabled, makes dialog draggable.
      Parameters:
      draggable -
      Returns:
    • width

      public DialogFrameworkOptions.Builder width(String width)
      Width of the dialog.
      Parameters:
      width -
      Returns:
    • height

      public DialogFrameworkOptions.Builder height(String height)
      Height of the dialog.
      Parameters:
      height -
      Returns:
    • contentWidth

      public DialogFrameworkOptions.Builder contentWidth(String contentWidth)
      Width of the dialog content. NOTE: 'auto' cannot be used because the dialog is displayed in an IFrame.
      Parameters:
      contentWidth -
      Returns:
    • contentHeight

      public DialogFrameworkOptions.Builder contentHeight(String contentHeight)
      Height of the dialog content.
      Parameters:
      contentHeight -
      Returns:
    • closable

      public DialogFrameworkOptions.Builder closable(boolean closable)
      Whether the dialog can be closed or not.
      Parameters:
      closable -
      Returns:
    • includeViewParams

      public DialogFrameworkOptions.Builder includeViewParams(boolean includeViewParams)
      When enabled, includes the view parameters.
      Parameters:
      includeViewParams -
      Returns:
    • headerElement

      public DialogFrameworkOptions.Builder headerElement(String headerElement)
      Client id of the element to display inside header.
      Parameters:
      headerElement -
      Returns:
    • minimizable

      public DialogFrameworkOptions.Builder minimizable(boolean minimizable)
      Makes dialog minimizable.
      Parameters:
      minimizable -
      Returns:
    • maximizable

      public DialogFrameworkOptions.Builder maximizable(boolean maximizable)
    • closeOnEscape

      public DialogFrameworkOptions.Builder closeOnEscape(boolean closeOnEscape)
      Whether the dialog can be closed with escape key.
      Parameters:
      closeOnEscape -
      Returns:
    • minWidth

      public DialogFrameworkOptions.Builder minWidth(Integer minWidth)
      Minimum width of a resizable dialog.
      Parameters:
      minWidth -
      Returns:
    • minHeight

      public DialogFrameworkOptions.Builder minHeight(Integer minHeight)
      Minimum height of a resizable dialog.
      Parameters:
      minHeight -
      Returns:
    • appendTo

      public DialogFrameworkOptions.Builder appendTo(String appendTo)
      Appends the dialog to the element defined by the given search expression.
      Parameters:
      appendTo -
      Returns:
    • dynamic

      public DialogFrameworkOptions.Builder dynamic(boolean dynamic)
      Enables lazy loading of the content with ajax.
      Parameters:
      dynamic -
      Returns:
    • showEffect

      public DialogFrameworkOptions.Builder showEffect(String showEffect)
      Effect to use when showing the dialog
      Parameters:
      showEffect -
      Returns:
    • hideEffect

      public DialogFrameworkOptions.Builder hideEffect(String hideEffect)
      Effect to use when hiding the dialog
      Parameters:
      hideEffect -
      Returns:
    • position

      public DialogFrameworkOptions.Builder position(String position)
      Defines where the dialog should be displayed
      Parameters:
      position -
      Returns:
    • fitViewport

      public DialogFrameworkOptions.Builder fitViewport(boolean fitViewport)
      Dialog size might exceeed viewport if content is bigger than viewport in terms of height. fitViewport option automatically adjusts height to fit dialog within the viewport.
      Parameters:
      fitViewport -
      Returns:
    • responsive

      public DialogFrameworkOptions.Builder responsive(boolean responsive)
      In responsive mode, dialog adjusts itself based on screen width.
      Parameters:
      responsive -
      Returns:
    • focus

      public DialogFrameworkOptions.Builder focus(String focus)
      Defines which component to apply focus by search expression.
      Parameters:
      focus -
      Returns:
    • onShow

      public DialogFrameworkOptions.Builder onShow(String onShow)
      Client side callback to execute when dialog is displayed.
      Parameters:
      onShow -
      Returns:
    • onHide

      public DialogFrameworkOptions.Builder onHide(String onHide)
      Client side callback to execute when dialog is hidden.
      Parameters:
      onHide -
      Returns:
    • blockScroll

      public DialogFrameworkOptions.Builder blockScroll(boolean blockScroll)
      Whether to block scrolling of the document when dialog is modal.
      Parameters:
      blockScroll -
      Returns:
    • styleClass

      public DialogFrameworkOptions.Builder styleClass(String styleClass)
      One or more CSS classes for the dialog.
      Parameters:
      styleClass -
      Returns:
    • iframeStyleClass

      public DialogFrameworkOptions.Builder iframeStyleClass(String iframeStyleClass)
      One or more CSS classes for the iframe within the dialog.
      Parameters:
      iframeStyleClass -
      Returns:
    • resizeObserver

      public DialogFrameworkOptions.Builder resizeObserver(boolean resizeObserver)
      Use ResizeObserver to automatically adjust dialog-height after e.g. AJAX-updates. Resizeable must be set false to use this option.
      Parameters:
      resizeObserver -
      Returns:
    • resizeObserverCenter

      public DialogFrameworkOptions.Builder resizeObserverCenter(boolean resizeObserverCenter)
      Can be used together with resizeObserver = true. Centers the dialog again after it was resized to ensure the whole dialog is visible onscreen.
      Parameters:
      resizeObserverCenter -
      Returns:
    • build

      public DialogFrameworkOptions build()