Class ServerValues
- All Implemented Interfaces:
Widget
Widget-marked declaration of named server-side scalar values.
This is a thin, typed facade over the existing VarResolver engine — not a second
templating language. An author declares named scalar value providers (for example failedCount or
lookbackReadable); a widget emitter publishes them into a per-render registry and interpolates their
resolved values into widget chrome text (titles / labels) as
Not $W. $FV resolves declared scalar values as plain text (serializer-encoded); it is
distinct from $W (HtmlWidgetVar), which emits raw widget HTML. $FV never injects HTML.
Providers must return a scalar (String / Number / Boolean) or List.toString() join — collection rendering is out of
scope here). Values are session-aware: each provider is a Function of the per-render
VarResolverSession.
Example:
ServerValues
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe frozen contract version for this widget.Ordered map of interpolation name → value declaration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerValuescreate()Creates an empty declaration.voidvalidate()Fail-closed bean validation.value(String name, Function<VarResolverSession, ?> provider) Declares a named scalar value provider.values(Map<String, ServerValuesValue> value) Sets the full ordered map of value declarations.
-
Field Details
-
CONTRACT_VERSION
The frozen contract version for this widget.- See Also:
-
values
Ordered map of interpolation name → value declaration.A
LinkedHashMapfor stablevalidate()/ emit order. This field is Java-only — it is never placed on a@BeanTypeand never marshals to VIEW_META (lambda providers are not a wire type).
-
-
Constructor Details
-
ServerValues
public ServerValues()
-
-
Method Details
-
create
Creates an empty declaration.- Returns:
- A new
ServerValues.
-
value
Declares a named scalar value provider.- Parameters:
name- The interpolation name (thexin"$FV{x}" ). Must not benull or blank.provider- The session-aware scalar provider. Must not benull .- Returns:
- This object.
-
values
Sets the full ordered map of value declarations.- Parameters:
value- The declarations, keyed by interpolation name. Must not benull .- Returns:
- This object.
-
validate
Description copied from interface:WidgetFail-closed bean validation.
-