Interface IConfirmpopup

All Superinterfaces:
IAnyGroup<IConfirmpopup>, IComponent<IConfirmpopup>, IHtmlBasedComponent<IConfirmpopup>, IPopupBase<IConfirmpopup>, IXulElement<IConfirmpopup>

public interface IConfirmpopup extends IPopupBase<IConfirmpopup>, IAnyGroup<IConfirmpopup>
Immutable Confirmpopup component.

An inline confirmation popup, anchored to a trigger component. It fires onOK when the user confirms and onCancel when they cancel or dismiss; both ride the generic action API — withAction/ withActions with ActionType.onOK/ActionType.onCancel.

Since:
11.0.0
Author:
peaker
See Also:
  • Confirmpopup
  • Field Details

    • DEFAULT

      static final IConfirmpopup DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zul.wgt.Confirmpopup"

      Specified by:
      getWidgetClass in interface IComponent<IConfirmpopup>
    • getTitle

      @Nullable default String getTitle()
      Returns the optional title row shown above the message body.

      Default: null (no title row).

    • withTitle

      IConfirmpopup withTitle(@Nullable String title)
      Returns a copy of this immutable component with the specified title.

      Sets the optional title row shown above the message body.

      Parameters:
      title - the title text; null or an empty string renders no title row.

      Default: null.

      Returns:
      A modified copy of the this object
    • getMessage

      @Nullable default String getMessage()
      Returns the confirmation message shown in the popup body.

      Default: null (no message).

    • withMessage

      IConfirmpopup withMessage(@Nullable String message)
      Returns a copy of this immutable component with the specified message.

      Sets the confirmation message shown in the popup body.

      Parameters:
      message - the message text; null or an empty string renders no message.

      Default: null.

      Returns:
      A modified copy of the this object
    • getIconSclass

      @Nullable default String getIconSclass()
      Returns the icon CSS class shown beside the message.

      Default: "z-icon-exclamation-triangle". An empty string means the icon is explicitly suppressed (no icon node is rendered).

    • withIconSclass

      IConfirmpopup withIconSclass(@Nullable String iconSclass)
      Returns a copy of this immutable component with the specified iconSclass.

      Sets the icon CSS class shown beside the message.

      Parameters:
      iconSclass - the icon's CSS class; an empty string suppresses the icon entirely.

      Default: "z-icon-exclamation-triangle".

      Returns:
      A modified copy of the this object
    • getSeverity

      @Nullable default String getSeverity()
      Returns the severity, which drives the icon/color styling of the popup, or null when it was reset to the default.

      Default: "warning".

    • withSeverity

      IConfirmpopup withSeverity(@Nullable String severity)
      Returns a copy of this immutable component with the specified severity.

      Sets the severity, which drives the icon/color styling of the popup.

      Parameters:
      severity - "info", "success", "warning", "error" or "neutral".

      Default: "warning".

      Returns:
      A modified copy of the this object
    • getPlacement

      @Nullable default String getPlacement()
      Returns the placement of this popup relative to the trigger element, or null when it was reset to the default.

      Default: "top". The arrow points from this popup toward the trigger.

    • withPlacement

      IConfirmpopup withPlacement(@Nullable String placement)
      Returns a copy of this immutable component with the specified placement.

      Sets the placement of this popup relative to the trigger element.

      Parameters:
      placement - "top", "bottom", "left" or "right".

      Default: "top".

      Returns:
      A modified copy of the this object
    • getDefaultFocus

      @Nullable default String getDefaultFocus()
      Returns which button gets keyboard focus when the popup opens, or null when it was reset to the default.

      Default: "ok". For destructive operations (severity="error"), prefer "cancel" so an accidental Enter keypress does not commit the action.

    • withDefaultFocus

      IConfirmpopup withDefaultFocus(@Nullable String defaultFocus)
      Returns a copy of this immutable component with the specified defaultFocus.

      Sets which button gets keyboard focus when the popup opens.

      Parameters:
      defaultFocus - either "ok" or "cancel".

      Default: "ok".

      Returns:
      A modified copy of the this object
    • of

      static IConfirmpopup of(String message)
      Returns the instance with the given message.
      Parameters:
      message - The confirmation message shown in the popup body
    • ofId

      static IConfirmpopup ofId(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component