Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically pass through all on* event attributes #5325

Conversation

BalusC
Copy link
Contributor

@BalusC BalusC commented Sep 30, 2023

jakartaee/faces#1507

With this PR, the following finally works for any on* event attribute and f:ajax event="..." without need to register event name as a new attribute in component as long as the event name is covered by ClientBehaviorHolder#getEventNames():

<h:inputText oninput="...">
    <f:ajax event="input" ... />
</h:inputText>

Done so far:

  • New jakarta.faces.component.html.HtmlEvents helper class for managing all these attributes
  • Mojarra impl has been adjusted
  • updated ClientBehaviorHolder#getEventNames() to catch up current standard (without the need to add new attribute getter/setter pairs!)
  • add context param which makes it possible to add new event names so it doesn't anymore throw exception on them: jakarta.faces.ADDITIONAL_HTML_EVENT_NAMES, defined in new jakarta.faces.component.html.HtmlEvents class
  • set in stone in Faces spec: 7236717

components; reverted temp changes to AjaxHandler/UIComponentBase
jakartaee/faces#1507
jakartaee/faces#1507 -- we still need to bump
Java version of Faces 5.0 project to align with Jakarta EE 11
…tomatically_pass_through_all_on-event_attributes
@tandraschko
Copy link
Contributor

looks good for me

@volosied @melloware can you also give a look plz?

@melloware
Copy link
Contributor

I like it. This is a big change but it will be a good one for 5.0. I will have to study the MyFaces code on exactly where to put this stuff.

faces_issue_1507_automatically_pass_through_all_on-event_attributes
@volosied
Copy link
Contributor

Sorry, didn't see the notifications until now. I'll take a look at this tomorrow or Tuesday!

faces_issue_1507_automatically_pass_through_all_on-event_attributes
@BalusC
Copy link
Contributor Author

BalusC commented Feb 10, 2024

API part of original PR is split into jakartaee/faces#1880

faces_issue_1507_automatically_pass_through_all_on-event_attributes
…tomatically_pass_through_all_on-event_attributes
@BalusC BalusC merged commit ac60c84 into master Sep 5, 2024
1 of 3 checks passed
@BalusC BalusC deleted the faces_issue_1507_automatically_pass_through_all_on-event_attributes branch September 5, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants