Interface RowModalFormAction<A extends RowModalFormAction<A>>
- All Superinterfaces:
Action<A>,Comparable<A>,Copyable<A>,FormAction<A>,ModalFormAction<A>,Serializable
- All Known Implementing Classes:
DefaultRowModalFormAction
A generic
ModalFormAction for row-level actions within a grid. This action is primarily
useful in scenarios when interacting with an ad-hoc submission API that does not follow typical
CRUD conventions.- Author:
- Nick Crum (ncrum)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classNested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys -
Method Summary
Modifier and TypeMethodDescriptionRetrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.default Endpoint<?>Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.default AThe color of the icon to use for the row action.default AThe name of the icon to use for the row action.default AmapInitialValues(Mapping<?>... mappingsToAdd) Configure mappings from the row or context to the form's initial state.default AmapInitialValues(Collection<Mapping<?>> mappingsToAdd) Configure mappings from the row or context to the create form's state.default AUndo a previous call torefreshOnMount().default AIndicate this action should trigger a refresh of the parentFetchGridafter a successful submission.default AsubmitEndpoint(Endpoint<?> endpoint) Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.default AsubmitEndpoint(UnaryOperator<Endpoint<?>> fn) Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.default AsubmitScope(String scope) Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint scope.default AConfigure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL.default AConfigure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL and scope.Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Action
addComponent, addComponents, addEndpoint, addEndpoint, apply, attribute, clearEndpoints, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAttribute, getAttribute, getAttributes, getComponent, getComponent, getComponents, getComponentsList, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOperationType, getOrder, getPlacement, getScope, getType, hasAttribute, hasComponent, hasEndpoint, id, label, label, operationType, order, placement, removeAttribute, removeComponent, removeEndpoint, scope, self, setAttributes, setComponents, setEndpoints, setId, setLabel, setOperationType, setOrder, setPlacement, setScope, setType, typeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
addExternal, addExternal, addField, addField, addField, addFormComponents, addGroup, addGroup, external, field, findExternal, findField, findGroup, getExternal, getField, getGroup, group, removeExternal, removeField, removeGroupMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
submitLabel, submitLabel
-
Method Details
-
iconName
The name of the icon to use for the row action. If none provided, the label will be rendered. It is recommended to supply an icon name for better usability.See http://www.zondicons.com/icons.html for a list of icon names available.
- Parameters:
iconName- the name of the icon.- Returns:
- this
-
iconColor
The color of the icon to use for the row action.- Parameters:
iconColor- the color of the icon.- Returns:
- this
-
mapInitialValues
Configure mappings from the row or context to the form's initial state. This is used in order to ensure the submission of form data inherits certain values from the row or context, for example:// maps the row's "id" to the "productId" field in the create form action.mapInitialValues(Mappings.mapValue("row.id", "productId");- Parameters:
mappingsToAdd- the mappings to add- Returns:
- the action
-
mapInitialValues
Configure mappings from the row or context to the create form's state. This is used in order to ensure the submission of form data inherits certain values from the row or context.- Parameters:
mappingsToAdd- the mappings to add- Returns:
- the action
- See Also:
-
refreshOnMount
Indicate this action should trigger a refresh of the parentFetchGridafter a successful submission.- Returns:
- this
-
notRefreshOnMount
Undo a previous call torefreshOnMount().- Returns:
- this
-
submitEndpoint
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Parameters:
endpoint- the endpoint- Returns:
- this
-
submitEndpoint
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Parameters:
fn- the function to configure the endpoint- Returns:
- this
-
submitUrl
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL.- Parameters:
url- the endpoint url- Returns:
- this
-
submitScope
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint scope.- Parameters:
scope- the endpoint scope- Returns:
- this
-
submitUrl
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL and scope.- Parameters:
url- the endpoint urlscope- the endpoint scope- Returns:
- this
-
getSubmitEndpoint
Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Returns:
- the endpoint
-
findSubmitEndpoint
Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Returns:
- an optional with the endpoint
-