PhoenixNestedParamsAdapter
class PhoenixNestedParamsAdapter[Owner, Schema, Domain, Group, Row]Bounded Phoenix indexed nested-parameter translation into stable keyed core rows.
Use only at a Phoenix compatibility boundary. Phoenix row indexes are positional; this adapter
requires _persistent_id controls and translates them to core FormRowKey identity before
projection. The original payload and browser target remain available on the resulting event.
Parameters
definitionThe form definition that projects and validates the translated payload.
rowsThe repeated rows submitted in Phoenix's indexed nested-parameter shape.
maxNewRowsThe maximum number of rows that
"new"sort entries may add per payload; always positive.
Defined by scalive.PhoenixNestedParamsAdapter. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:19-428)
Types2
Event
type Event = FormEvent[Owner, Schema, Domain]The typed event this adapter produces, the same type as the definition's Event.
Defined by scalive.PhoenixNestedParamsAdapter.Event. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:29-29)
Key
type Key = FormRowKey[Group]The type of a stable row key for the adapted repeated group.
Defined by scalive.PhoenixNestedParamsAdapter.Key. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:32-32)
Methods10
event
def event(data: FormData, kind: FormEventKind): EventTranslates a Phoenix-compatible payload into keyed rows and projects it as a typed event.
This form has no browser target.
Defined by scalive.PhoenixNestedParamsAdapter.event. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:48-49)
def event(data: FormData, kind: FormEventKind, target: Option[FormPath]): EventTranslates a Phoenix-compatible payload into keyed rows and projects it as a typed event.
This form also translates the positional browser target to its keyed row and keeps the
original in browserTarget.
Defined by scalive.PhoenixNestedParamsAdapter.event. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:56-57)
field
def field[Input, Value](formId: String, row: FormRowView[Owner, Schema, Group, Row], index: Int, field: FormField[Group, Input, Value]): FormControl[Owner, Input, Value, Nothing]Returns the control that renders a row field under its Phoenix-compatible positional name and
id, for row rendered at index.
Its value and errors come from the row's stable keyed address, so they follow the row when it
moves. Its name is fieldName and its id is fieldId. Like field on a form value, it
reports no blur feedback.
Defined by scalive.PhoenixNestedParamsAdapter.field. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:142-150)
fieldId
def fieldId[Input, Value](formId: String, index: Int, field: FormField[Group, Input, Value]): StringPhoenix-compatible positional id; use only at the compatibility rendering boundary.
Defined by scalive.PhoenixNestedParamsAdapter.fieldId. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:120-133)
fieldName
def fieldName[Input, Value](index: Int, field: FormField[Group, Input, Value]): StringReturns a Phoenix-compatible positional browser name for a declared row field.
Defined by scalive.PhoenixNestedParamsAdapter.fieldName. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:113-117)
onChange
def onChange[Msg](changed: Event => Msg, recovered: Event => Msg): Mod.Attr[Msg]Handles translated LiveView phx-change and recovery payloads as typed events.
This form sends changes to changed and recoveries after a reconnect to recovered.
Defined by scalive.PhoenixNestedParamsAdapter.onChange. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:75-81)
def onChange[Msg](f: Event => Msg): Mod.Attr[Msg]Handles translated LiveView phx-change and recovery payloads as typed events.
This form sends both to f.
Defined by scalive.PhoenixNestedParamsAdapter.onChange. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:63-69)
onRecover
def onRecover[Msg](f: Event => Msg): Mod.Attr[Msg]Handles a translated Phoenix-compatible recovery payload.
Defined by scalive.PhoenixNestedParamsAdapter.onRecover. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:106-107)
onSubmit
def onSubmit[Action <: reflect.Enum, Msg](submitter: FormSubmitter[Owner, Schema, Action])(f: (Event, Either[FormSubmitter.DecodeError, Action]) => Msg): Mod.Attr[Msg]Handles a translated Phoenix-compatible submission (phx-submit) as a typed event.
This form also decodes which of the submitter's buttons submitted the form. submitter must
belong to this adapter's definition.
Defined by scalive.PhoenixNestedParamsAdapter.onSubmit. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:95-103)
def onSubmit[Msg](f: Event => Msg): Mod.Attr[Msg]Handles a translated Phoenix-compatible submission (phx-submit) as a typed event.
This form sends only the event.
Defined by scalive.PhoenixNestedParamsAdapter.onSubmit. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:87-88)
persistentId
def persistentId(row: FormRowView[Owner, Schema, Group, Row], index: Int): HtmlElement[Nothing]Renders the required mapping from a positional index to a row's stable key.
Defined by scalive.PhoenixNestedParamsAdapter.persistentId. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:162-170)
persistentIdName
def persistentIdName(index: Int): StringReturns the hidden stable-id control name for a positional Phoenix row index.
Defined by scalive.PhoenixNestedParamsAdapter.persistentIdName. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:110-110)
sortControl
def sortControl(row: FormRowView[Owner, Schema, Group, Row], index: Int): HtmlElement[Nothing]Renders a Phoenix sort entry for a row at its current positional index.
Defined by scalive.PhoenixNestedParamsAdapter.sortControl. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:173-182)
Values5
definition
val definition: FormDefinition[Owner, Domain]The form definition that projects and validates the translated payload.
Defined by scalive.PhoenixNestedParamsAdapter.definition. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:20-20)
dropName
val dropName: StringPhoenix array-control name used to submit row indexes to remove.
Empty values, such as the one from the hidden control that keeps the array present, are
ignored. A payload may carry at most maxRowsPerGroup indexes to remove.
Defined by scalive.PhoenixNestedParamsAdapter.dropName. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:42-42)
maxNewRows
val maxNewRows: IntThe maximum number of rows that "new" sort entries may add per payload; always positive.
Defined by scalive.PhoenixNestedParamsAdapter.maxNewRows. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:22-22)
rows
val rows: RepeatedRows[Owner, Group, Row]The repeated rows submitted in Phoenix's indexed nested-parameter shape.
Defined by scalive.PhoenixNestedParamsAdapter.rows. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:21-21)
sortName
val sortName: StringPhoenix array-control name used to submit row order and "new" placeholders.
Defined by scalive.PhoenixNestedParamsAdapter.sortName. View source (scalive/api/src/scalive/forms/PhoenixNestedParamsAdapter.scala:35-35)