You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bjørn T Johansen <bt...@havleik.no> on 2006/10/16 22:49:10 UTC

Managed properties not initialized after switch from JSF RI to Myfaces-core 1.1.4?

I am trying to switch from JSF RI to Myfaces-Core 1.1.4 but my managed properties are no longer initialized....
(i.e. I get a NPE exceptions when I try to use those objects)

Some of my faces-config looks like this..:

<managed-bean>
        <managed-bean-name>orderBean</managed-bean-name>
        <managed-bean-class>no.havleik.dt.jsf.order.OrderBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>sessionCont</property-name>
            <value>#{sessionScope.sessionScopesessionCont}</value>
        </managed-property>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>mainMenuDataModel</managed-bean-name>
        <managed-bean-class>no.havleik.dt.menu.MainMenuDataModel</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>sessionScopesessionCont</managed-bean-name>
        <managed-bean-class>no.havleik.dt.session.SessionContainerBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>mainMenuListener</managed-bean-name>
        <managed-bean-class>no.havleik.dt.menu.MainMenuSelectedListener</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>sessionCont</property-name>
            <value>#{sessionScope.sessionScopesessionCont}</value>
        </managed-property>
        <managed-property>
            <property-name>adminHelper</property-name>
            <value>#{adminHelperBean}</value>
        </managed-property>
        <managed-property>
            <property-name>prodPlan</property-name>
            <value>#{prodplanBean}</value>
        </managed-property>
        <managed-property>
            <property-name>order</property-name>
            <value>#{orderBean}</value>
        </managed-property>
    </managed-bean>


It is my bean with name mainMenuListener that doesn't get it's managed properties initialized..

Can anyone give me a hint to why?


Regards,

BTJ

-- 
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

Re: Managed properties not initialized after switch from JSF RI to Myfaces-core 1.1.4?

Posted by Bjørn T Johansen <bt...@havleik.no>.
No one has any ideas? :(

BTJ

On Mon, 16 Oct 2006 22:49:10 +0200
Bjørn T Johansen <bt...@havleik.no> wrote:

> I am trying to switch from JSF RI to Myfaces-Core 1.1.4 but my managed properties are no longer initialized....
> (i.e. I get a NPE exceptions when I try to use those objects)
> 
> Some of my faces-config looks like this..:
> 
> <managed-bean>
>         <managed-bean-name>orderBean</managed-bean-name>
>         <managed-bean-class>no.havleik.dt.jsf.order.OrderBean</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>         <managed-property>
>             <property-name>sessionCont</property-name>
>             <value>#{sessionScope.sessionScopesessionCont}</value>
>         </managed-property>
>     </managed-bean>
>     <managed-bean>
>         <managed-bean-name>mainMenuDataModel</managed-bean-name>
>         <managed-bean-class>no.havleik.dt.menu.MainMenuDataModel</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>     </managed-bean>
>     <managed-bean>
>         <managed-bean-name>sessionScopesessionCont</managed-bean-name>
>         <managed-bean-class>no.havleik.dt.session.SessionContainerBean</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>     </managed-bean>
>     <managed-bean>
>         <managed-bean-name>mainMenuListener</managed-bean-name>
>         <managed-bean-class>no.havleik.dt.menu.MainMenuSelectedListener</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>         <managed-property>
>             <property-name>sessionCont</property-name>
>             <value>#{sessionScope.sessionScopesessionCont}</value>
>         </managed-property>
>         <managed-property>
>             <property-name>adminHelper</property-name>
>             <value>#{adminHelperBean}</value>
>         </managed-property>
>         <managed-property>
>             <property-name>prodPlan</property-name>
>             <value>#{prodplanBean}</value>
>         </managed-property>
>         <managed-property>
>             <property-name>order</property-name>
>             <value>#{orderBean}</value>
>         </managed-property>
>     </managed-bean>
> 
> 
> It is my bean with name mainMenuListener that doesn't get it's managed properties initialized..
> 
> Can anyone give me a hint to why?
> 
> 
> Regards,
> 
> BTJ
>