Interface IConfirmpopup

    • Field Detail

      • DEFAULT

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

      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.wgt.Confirmpopup"

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

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

        Default: null (no title row).

      • withTitle

        IConfirmpopup withTitle​(@Nullable
                                java.lang.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 java.lang.String getMessage()
        Returns the confirmation message shown in the popup body.

        Default: null (no message).

      • withMessage

        IConfirmpopup withMessage​(@Nullable
                                  java.lang.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 java.lang.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
                                     java.lang.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 java.lang.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
                                   java.lang.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 java.lang.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
                                    java.lang.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 java.lang.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
                                       java.lang.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​(java.lang.String message)
        Returns the instance with the given message.
        Parameters:
        message - The confirmation message shown in the popup body
      • ofId

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