Skip to content

docs: document ComponentEvent.getSource as the listener component #19850 - #25449

Merged
mcollovati merged 1 commit into
vaadin:mainfrom
AzazelSensei:docs/component-event-getsource-19850
Sep 3, 2026
Merged

mcollovati merged 1 commit into
vaadin:mainfrom
AzazelSensei:docs/component-event-getsource-19850

Conversation

@AzazelSensei

Copy link
Copy Markdown
Contributor

ComponentEvent.getSource() inherited EventObject's javadoc ("the object on which the Event initially occurred"). That reads as if a nested child is the source.

This documents that getSource is the component the listener was registered with. Same idea as the example in #19850.

Fixes #19850

…din#19850

EventObject.getSource says the event initially occurred on the source,
which reads as if a nested child (e.g. a Checkbox) is returned. Clarify
that getSource is the component the listener was registered with.
@mcollovati
mcollovati added this pull request to the merge queue Sep 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 3, 2026
@mcollovati
mcollovati added this pull request to the merge queue Sep 3, 2026
Merged via the queue into vaadin:main with commit 7639ba9 Sep 3, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add javadoc for ComponentEvent.getSource

3 participants