myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Andraschko <andraschko.tho...@gmail.com>
Subject JSF 2.3: Scopes of new CDI artifact in FacesScopeObjectProducer
Date Fri, 01 Sep 2017 07:42:52 GMT
Hi,

i just checked the FacesScopeObjectProducer:

   @Produces
   @Named("component")
   @FacesScoped
   public UIComponent getComponent()
   {
       return
UIComponent.getCurrentComponent(FacesContext.getCurrentInstance());
   }

   @Produces
   @Named("cc")
   @FacesScoped
   public UIComponent getCompositeComponent()
   {
       return
UIComponent.getCurrentCompositeComponent(FacesContext.getCurrentInstance());
   }

I wonder if this is this the right scope for it?
Shoudln't it be @Dependendent as the component changes multiple times?
Not sure about the performance then... I think it would be perform much
slower as in 2.2.
Does 2.3 force us to use @Named instead ElResolver for it?

Regards,
Thomas

Mime
View raw message