maxtorzito
maxtorzito

Reputation: 318

FacesComponent scope

What scope has a FacesComponent??.

Can i set something like ViewScope? SessionScope?

@FacesComponent(value="myComponent")
  public class MyComponent extends UINamingContainer  {
  }

Upvotes: 1

Views: 1021

Answers (1)

BalusC
BalusC

Reputation: 1108762

No, you can't. It makes design technically also no sense.

If you want to store some data in a certain scope, just explicitly store them in the desired scope yourself in one of the component's methods. The session scope for example is as a Map available by ExternalContext#getSessionMap().

Upvotes: 1

Related Questions