Class ModalDef.ChildAction
- Enclosing class:
- ModalDef
ModalDef.childActions catalog — a stacked step a type="action"
input inside this dialog's form may open.
Dialog-presenting by construction
A child action carries no present field: opening a stacked dialog is the only thing it does. A child
with no form is a legal confirm-only child dialog.
No gating vocabulary, on purpose
There is deliberately no enabledWhen here, for three independent reasons. The rule type lives in the
rich-view module, which this module must not reference. A dialog opened where there is no row has no row data
to evaluate against, so a field-keyed rule would fail closed forever with no signal to its author. And the
subject of a child step is the draft in the open dialog, not the parent row — so evaluating the
parent row's data would answer a question nobody asked. Gating a child step is the server's job at
child-form-GET time; it already owns that GET and can refuse it.
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionWhether opening this child carries the parent dialog's current draft values to its form-source GET as one query parameter; omitted from the wire when unset orfalse .The child's submit endpoint; omitted from the wire when unset.The child dialog's read-only form-source URL; omitted from the wire when unset (a confirm-only child).The action id atype="action"input in this dialog's form names.The label painted on the button that opens this child.The child's submit method; omitted from the wire when unset.The child's on-success behaviour token; omitted from the wire when unset. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncarryDrafts(boolean value) Declares that opening this child carries the parent dialog's drafts (seecarryDrafts).Sets the child's submit endpoint.Sets the child dialog's read-only form-source URL.Sets the child's submit method.static ModalDef.ChildActionCreates a child action.Sets the child's on-success behaviour token.
-
Field Details
-
id
The action id atype="action"input in this dialog's form names. Required, non-blank. -
label
The label painted on the button that opens this child. Required, non-blank. -
form
The child dialog's read-only form-source URL; omitted from the wire when unset (a confirm-only child).Required if this child declares
carryDrafts— with no URL there is nothing for the draft query to ride on, so the drafts would vanish silently. -
endpoint
The child's submit endpoint; omitted from the wire when unset. Seeendpoint(String). -
method
The child's submit method; omitted from the wire when unset. Seemethod(String). -
onSuccess
The child's on-success behaviour token; omitted from the wire when unset. -
carryDrafts
Whether opening this child carries the parent dialog's current draft values to its form-source GET as one query parameter; omitted from the wire when unset orfalse .Without it a Review step opens empty and loses everything the operator typed. With it, the runtime serializes the parent's collected form values, URL-encodes them, and appends them as a single
juneauDraftsparameter, refusing visibly (and not opening the child) above a client-side byte cap measured on the encoded value.Drafts land in access logs and browser history. No secret may ride this channel.
-
-
Constructor Details
-
ChildAction
public ChildAction()
-
-
Method Details
-
of
Creates a child action.- Parameters:
id- The action id atype="action"input names. Must not benull or blank.label- The button label. Must not benull or blank.- Returns:
- A new
ModalDef.ChildAction. - Throws:
IllegalArgumentException- Ifidorlabelisnull or blank.
-
form
Sets the child dialog's read-only form-source URL.- Parameters:
value- The URL. Can benull to unset (a confirm-only child).- Returns:
- This object.
-
endpoint
Sets the child's submit endpoint.Optional individually; a child action whose dialog is meant to be submittable must declare both a non-safe
methodand anendpoint, or its Confirm visibly refuses withsafe-methodand sends nothing. A display-only child that never submits needs neither, which is why this is not aModalDef.validate()rule — this bean cannot know which of its children are meant to submit.- Parameters:
value- The endpoint. Can benull to unset.- Returns:
- This object.
-
method
Sets the child's submit method.Optional individually; see
endpoint(String)— a submittable child needs both, and a missing or safe method is a visible client-side refusal before any request is sent.- Parameters:
value- The method. Can benull to unset.- Returns:
- This object.
-
onSuccess
Sets the child's on-success behaviour token.- Parameters:
value- The token. Can benull to unset.- Returns:
- This object.
-
carryDrafts
Declares that opening this child carries the parent dialog's drafts (seecarryDrafts).Passing
false clears the flag rather than serializing an explicitfalse, so an un-opted-in child's payload is byte-identical to one that never mentioned it.- Parameters:
value-true to carry the parent's drafts;false (or unset) to open empty.- Returns:
- This object.
-