Interface RowModalFormAction<A extends RowModalFormAction<A>>
-
- All Superinterfaces:
Action<A>,Comparable<A>,Copyable<A>,FormAction<A>,ModalFormAction<A>,Serializable
- All Known Implementing Classes:
DefaultRowModalFormAction
public interface RowModalFormAction<A extends RowModalFormAction<A>> extends ModalFormAction<A>
A genericModalFormActionfor 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 Classes Modifier and Type Interface Description static classRowModalFormAction.Attributesstatic classRowModalFormAction.EndpointTypes-
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<Endpoint<?>>findSubmitEndpoint()Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.default Endpoint<?>getSubmitEndpoint()Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.default AiconName(String iconName)The 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 AnotRefreshOnMount()Undo a previous call torefreshOnMount().default ArefreshOnMount()Indicate 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 AsubmitUrl(String url)Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL.default AsubmitUrl(String url, String scope)Configure 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, type
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods 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, removeGroup
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
submitLabel, submitLabel
-
-
-
-
Method Detail
-
iconName
default A iconName(String 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
-
mapInitialValues
default A mapInitialValues(Mapping<?>... mappingsToAdd)
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
default A mapInitialValues(Collection<Mapping<?>> mappingsToAdd)
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:
for more details
-
refreshOnMount
default A refreshOnMount()
Indicate this action should trigger a refresh of the parentFetchGridafter a successful submission.- Returns:
- this
-
notRefreshOnMount
default A notRefreshOnMount()
Undo a previous call torefreshOnMount().- Returns:
- this
-
submitEndpoint
default A submitEndpoint(Endpoint<?> endpoint)
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Parameters:
endpoint- the endpoint- Returns:
- this
-
submitEndpoint
default A submitEndpoint(UnaryOperator<Endpoint<?>> fn)
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Parameters:
fn- the function to configure the endpoint- Returns:
- this
-
submitUrl
default A submitUrl(String url)
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL.- Parameters:
url- the endpoint url- Returns:
- this
-
submitScope
default A submitScope(String scope)
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint scope.- Parameters:
scope- the endpoint scope- Returns:
- this
-
submitUrl
default A submitUrl(String url, String scope)
Configure theRowModalFormAction.EndpointTypes.SUBMITendpoint URL and scope.- Parameters:
url- the endpoint urlscope- the endpoint scope- Returns:
- this
-
getSubmitEndpoint
default Endpoint<?> getSubmitEndpoint()
Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Returns:
- the endpoint
-
findSubmitEndpoint
default Optional<Endpoint<?>> findSubmitEndpoint()
Retrieve theRowModalFormAction.EndpointTypes.SUBMITendpoint.- Returns:
- an optional with the endpoint
-
-