Results 1 to 2 of 2

Thread: Cannot use spring bean with JSF scope?

  1. #1
    Join Date
    Jan 2013
    Posts
    4

    Default 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. #2
    Join Date
    Jan 2013
    Posts
    4

    Default

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

    Quote 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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •