Package org.cxbox.core.dto.rowmeta
Class PreAction
java.lang.Object
org.cxbox.core.dto.rowmeta.PreAction
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PreAction.PreActionBuilderbuilder()static PreActionconfirm()confirm with defaulttitleand auto-generatedtext
title- default 'Are you sure?'static PreActionconfirm(@NonNull UnaryOperator<PreActionConfirmBuilder.Cf> cf) confirm with yourtitle,text, and button names (yesTextandnoText)static PreActionDeprecated, for removal: This API element is subject to removal in a future version.static PreActionconfirmWithWidget(@NonNull String widget, @NonNull UnaryOperator<PreActionConfirmWithWidgetBuilder.Cfw> cf) confirm with yourwidget,title, and button names (yesTextandnoText)static PreActionstatic PreActionerror()static PreActiongetMessage(String action) getType()static PreActioninfo()static PreAction
-
Field Details
-
WITHOUT_MESSAGE
- See Also:
-
-
Constructor Details
-
PreAction
-
-
Method Details
-
confirm
confirm with defaulttitleand auto-generatedtext
title- default 'Are you sure?'titlewill be shown (actually its translation defined in Frontend i18n)text- will be auto-generated by backend fromPreActionType.CONFIRMATIONtemplate. -
confirm
Deprecated, for removal: This API element is subject to removal in a future version.as of release 4.0.0-M16, replaced by configurableconfirm(cf -> cf.text("Changes will be saved")). -
confirm
confirm with yourtitle,text, and button names (yesTextandnoText)PreAction.confirm(cf -> cf .title("Approve?") //or withoutTitle() .text("Changes will ba saved") //or withoutText() .yesText("Yes") .noText("Cancel"))- Returns:
- preActio
-
confirmWithWidget
public static PreAction confirmWithWidget(@NonNull @NonNull String widget, @NonNull @NonNull UnaryOperator<PreActionConfirmWithWidgetBuilder.Cfw> cf) confirm with yourwidget,title, and button names (yesTextandnoText)- Parameters:
widget- widget name of any*FormPopup.widget.jsonplaced on sameviewand having samebc, as widget with button, that triggered confirmationPreAction.confirmWithWidget("myWidget", cf -> cf .title("Approve?") //or withoutTitle() .yesText("Yes") .noText("Cancel"))- Returns:
- preAction
-
info
-
info
-
error
-
error
-
custom
-
builder
-
getType
-
getMessage
-
getCustomParameters
-
getMessage
-
confirm(cf -> cf.text("Changes will be saved")).