javaee / javaserverfaces-spec

JavaServer(TM) Faces Specification web site

Home Page:https://javaee.github.io/javaserverfaces-spec/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support @Inject on JSF artifacts

glassfishrobot opened this issue · comments

Support @Inject on JSF artifacts

@manfredriem said:
Make sure the following artifacts are mentioned in the spec PDF when describing @Inject support

  • applicationMap
  • externalContext
  • facesContext
  • session (delegating that responsibility back to default CDI runtime)
  • sessionMap
  • view
  • viewMap
  • converters annotated with @FacesConverter (and managed = true)
  • validators annotated with @FacesValidator (and managed = true)
  • behaviors annotated with @FacesBehavior (and managed = true)
  • requestCookieMap

@edburns said:
Do you have any plans to support Component, Behavior and Validator?

@manfredriem said:
In Progress

@manfredriem said:
Note @Inject on UIComponent instances will not be done as the view state is managed outside of CDI.

@arjantijms said:

Note @Inject on UIComponent instances will not be done as the view state is managed outside of CDI.

IFF there would be an @ComponentScope then as a side-effect of that it may became feasible to allow injection of the UIComponent instances.

@BalusC said:
Injection of @FacesContext is currently not done properly. It's currently request scoped, but it should actually be "faces context scoped", as an (error) dispatch can create a new FacesContext within the very same request. The current approach will throw ISE from assertNotReleased() when the FacesContext is being referenced in EL.

This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1316

I think @Inject UIComponet could be done by:
#1448 - also if i don't prefer to access uicomponents in the backing bean if it's avoidable.

Closing this as this issue is migrated to jakartaee/faces#1316