Announcement Announcement Module
Collapse
No announcement yet.
Cannot use spring bean with JSF scope? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot use spring bean with JSF scope?

    I am using spring web flow 2.4 with Spring faces (JSF myfaces 2.1.9)
    I have declared a bean in my web-mvc.xml:

    <bean id="myBean" class="..." scope="view"/>

    and when referencing it in my facelet #{myBean.someProperty} I get the following error message:
    java.lang.IllegalStateException: No Scope registered for scope 'view'

    I get the same result when using "flow" scope, but using request or session scope works. I even remember having this working a while ago but now it seems like it isn't working.

    Anyone know my problem, something with my configuration? Any help would be appreciated

  • #2
    Apparently I had forgotten to include the scope-registrar in my configuration, now it works!

    Originally posted by Guitarkalle View Post
    I am using spring web flow 2.4 with Spring faces (JSF myfaces 2.1.9)
    I have declared a bean in my web-mvc.xml:

    <bean id="myBean" class="..." scope="view"/>

    and when referencing it in my facelet #{myBean.someProperty} I get the following error message:
    java.lang.IllegalStateException: No Scope registered for scope 'view'

    I get the same result when using "flow" scope, but using request or session scope works. I even remember having this working a while ago but now it seems like it isn't working.

    Anyone know my problem, something with my configuration? Any help would be appreciated

    Comment

    Working...
    X