docs: update form filler article based on value options refactor#5754
Open
ugur-vaadin wants to merge 1 commit into
Open
docs: update form filler article based on value options refactor#5754ugur-vaadin wants to merge 1 commit into
ugur-vaadin wants to merge 1 commit into
Conversation
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5754.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 62e3298 |
rolfsmeds
requested changes
Jun 29, 2026
| Selection fields like [classname]`ComboBox`, [classname]`Select`, [classname]`MultiSelectComboBox`, and [classname]`CheckboxGroup` take a value from a known set. [methodname]`fieldValueOptions()` registers that set with the controller, and the labels are presented to the LLM as the field's choices. When the LLM picks a label, the controller resolves it to the field's value type and writes the result to the field. | ||
| Selection fields like [classname]`ComboBox`, [classname]`Select`, [classname]`MultiSelectComboBox`, and [classname]`CheckboxGroup` take a value from a known set. [methodname]`fieldValueOptions()` registers that set with the controller. | ||
|
|
||
| The registration carries the field's domain items. The controller renders each item to an LLM-facing label through the field's own [methodname]`setItemLabelGenerator()`. When the LLM picks a label, the controller applies the same labeler to the registered items and writes the matching one back. |
Contributor
There was a problem hiding this comment.
Suggested change
| The registration carries the field's domain items. The controller renders each item to an LLM-facing label through the field's own [methodname]`setItemLabelGenerator()`. When the LLM picks a label, the controller applies the same labeler to the registered items and writes the matching one back. | |
| The registration carries the field's domain items. The controller renders each item into an LLM-facing label through the field's own [methodname]`setItemLabelGenerator()`. When the LLM picks a label, the controller applies the same labeler to the registered items and writes the matching one back. |
| ValueOptions.forField(projectField).options(projects)); | ||
| ---- | ||
|
|
||
| The LLM sees project names. When it picks one, the controller writes the matching [classname]`Project` instance to the field. |
Contributor
There was a problem hiding this comment.
Suggested change
| The LLM sees project names. When it picks one, the controller writes the matching [classname]`Project` instance to the field. | |
| In the above example, the LLM sees project names. When it picks one, the controller writes the matching [classname]`Project` instance to the field. |
| ---- | ||
|
|
||
| The converter runs once per chosen label, and the resolved values are written to the field as a set. | ||
| The selected items are written to the field as a set, in the order the LLM returned them. |
Contributor
There was a problem hiding this comment.
Suggested change
| The selected items are written to the field as a set, in the order the LLM returned them. | |
| The selected items are written to the field as a set, in the order returned by the LLM. |
| .itemLabelGenerator(Project::code)); | ||
| ---- | ||
|
|
||
| The explicit generator overrides the field's for both the labels surfaced to the LLM and the lookup that resolves a chosen label back to an item. The field's UI continues to render through its own generator. |
Contributor
There was a problem hiding this comment.
Suggested change
| The explicit generator overrides the field's for both the labels surfaced to the LLM and the lookup that resolves a chosen label back to an item. The field's UI continues to render through its own generator. | |
| The explicit generator overrides both the labels surfaced to the LLM and the lookup that resolves a chosen label back to an item. The field's UI continues to render through its own generator. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the form filler article based on value options API refactor.
Follow-up to vaadin/flow-components#9564