jsfmanaged-property

At what point is a field using @ManagedProperty annotation set?


At what point is a field using @ManagedProperty annotation set? Specifically, does it happen during construction or after construction?


Solution

  • Any field using @ManagedProperty annotation is set immediately after the constructor runs. So the same field can be used in a @PostConstruct method. That is what my main concern was while asking this question. For more lucid details please refer to the following excellent post https://stackoverflow.com/a/4889226/1391249