Interface IConfirmpopup
- All Superinterfaces:
IAnyGroup<IConfirmpopup>,IComponent<IConfirmpopup>,IHtmlBasedComponent<IConfirmpopup>,IPopupBase<IConfirmpopup>,IXulElement<IConfirmpopup>
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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeIConfirmpopup.static classBuilds an updater of typeIConfirmpopupforUiAgent.smartUpdate(Locator, SmartUpdater).Nested classes/interfaces inherited from interface org.zkoss.stateless.sul.IPopupBase
IPopupBase.OpenOptionBuilder, IPopupBase.Position -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IConfirmpopupConstant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns which button gets keyboard focus when the popup opens, or null when it was reset to the default.default StringReturns the icon CSS class shown beside the message.default StringReturns the confirmation message shown in the popup body.default StringReturns the placement of this popup relative to the trigger element, or null when it was reset to the default.default StringReturns the severity, which drives the icon/color styling of the popup, or null when it was reset to the default.default StringgetTitle()Returns the optional title row shown above the message body.default StringReturns the client widget class.static IConfirmpopupReturns the instance with the given message.static IConfirmpopupReturns the instance with the given id.withDefaultFocus(String defaultFocus) Returns a copy ofthisimmutable component with the specifieddefaultFocus.withIconSclass(String iconSclass) Returns a copy ofthisimmutable component with the specifiediconSclass.withMessage(String message) Returns a copy ofthisimmutable component with the specifiedmessage.withPlacement(String placement) Returns a copy ofthisimmutable component with the specifiedplacement.withSeverity(String severity) Returns a copy ofthisimmutable component with the specifiedseverity.Returns a copy ofthisimmutable component with the specifiedtitle.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IPopupBase
getOpen, isVisible, withOpenMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.wgt.Confirmpopup"- Specified by:
getWidgetClassin interfaceIComponent<IConfirmpopup>
-
getTitle
Returns the optional title row shown above the message body.Default:
null(no title row). -
withTitle
Returns a copy ofthisimmutable component with the specifiedtitle.Sets the optional title row shown above the message body.
- Parameters:
title- the title text;nullor an empty string renders no title row.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getMessage
Returns the confirmation message shown in the popup body.Default:
null(no message). -
withMessage
Returns a copy ofthisimmutable component with the specifiedmessage.Sets the confirmation message shown in the popup body.
- Parameters:
message- the message text;nullor an empty string renders no message.Default:
null.- Returns:
- A modified copy of the
thisobject
-
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
Returns a copy ofthisimmutable component with the specifiediconSclass.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
thisobject
-
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
Returns a copy ofthisimmutable component with the specifiedseverity.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
thisobject
-
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
Returns a copy ofthisimmutable component with the specifiedplacement.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
thisobject
-
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
Returns a copy ofthisimmutable component with the specifieddefaultFocus.Sets which button gets keyboard focus when the popup opens.
- Parameters:
defaultFocus- either"ok"or"cancel".Default:
"ok".- Returns:
- A modified copy of the
thisobject
-
of
Returns the instance with the given message.- Parameters:
message- The confirmation message shown in the popup body
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-