Package com.onec.ui
Record Class PageComponent
java.lang.Object
java.lang.Record
com.onec.ui.PageComponent
public record PageComponent(PageComponent.Kind kind, String text, String customType, Map<String,Object> payload, Class<?> entity)
extends Record
A freeform block a
Page composes beyond the widget grid: a text block, a
div-custom extension, a full interactive entity list, or a section of action buttons.
Renderer-agnostic; the DivKit emitter compiles it (text → div-text, custom →
div-custom, list → the onec-list surface built from the entity's metadata, actions →
the onec-actions button section).-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPageComponent(PageComponent.Kind kind, String text, String customType, Map<String, Object> payload, Class<?> entity) Creates an instance of aPageComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PageComponentA section of action buttons under an optional heading.static PageComponentReturns the value of thecustomTyperecord component.Class<?> entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.static PageComponentThe full interactive list surface for a catalog/document, embedded in the page.payload()Returns the value of thepayloadrecord component.text()Returns the value of thetextrecord component.static PageComponentfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PageComponent
public PageComponent(PageComponent.Kind kind, String text, String customType, Map<String, Object> payload, Class<?> entity) Creates an instance of aPageComponentrecord class.- Parameters:
kind- the value for thekindrecord componenttext- the value for thetextrecord componentcustomType- the value for thecustomTyperecord componentpayload- the value for thepayloadrecord componententity- the value for theentityrecord component
-
-
Method Details
-
text
-
custom
-
list
The full interactive list surface for a catalog/document, embedded in the page. -
actions
A section of action buttons under an optional heading.buttonsare the rendered descriptors (key/label/icon/server/url); the server handlers live on thePageBuilderand are resolved by key when the button posts back. The renderer fills in the page route the buttons post to. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
customType
Returns the value of thecustomTyperecord component.- Returns:
- the value of the
customTyperecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-