To clarify, when you resolve it from a jsp page do you do so from within a JSF component? As in:

<h:outputText value=”#{searchManager.someproperty}”/>

 

If yes and it works, then this is some problem with the wiring, best addressed by appfuse and the raibleans ;)

 

Otherwise check to see that you have the proper delegating variable resolver in the <application> tag of your faces-config.xml, this should be a spring class from their jsf package (org.springframework.blah…jsf.DelegatingVariableResolver) and that there are no conflicting variable resolvers above it; as they go in order of precedence. In fact you are best off making sure the spring resolver is right on top because it delegates to the default JSF resolver if it cant find a spring bean of that id. I have to say though, that I don’t know if Appfuse has some different funkier way of wiring the two together.

 

And yes that looks like a WebApplicationContext (the sure test is if there is a <listener> with org.springframework.blah….ContextLoaderListener).

 


From: Robert Campbell [mailto:[EMAIL PROTECTED]
Sent: Friday, 14 July 2006 6:10 PM
To: MyFaces Discussion
Subject: Re: JSF/Spring integration - managed-property problem

 


I'm using Spring 1.2.7 under AppFuse 1.9.1

I think I'm using a regular spring context.. how do I check for sure? Here is the Spring context config in web.xml:

    <!-- Context Configuration locations for Spring XML files -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext-*.xml</param-value>
    </context-param>

I tried to resolve it from a jsp page and it worked okay.


I am using Tomcat 5.5.17

And yes, I'm getting a NPE when I try to use the object that is supposed to be set using the managed-property. Here is the relevant part of the backing bean:

    private SearchManager searchManager;

    public void setSearchManager(SearchManager searchManager) {
        log.info("*************** setSearchManager has been called ***************");
        this.searchManager = searchManager;
    }   
   
    public SearchManager getSearchManager() {
        return searchManager;
    } 

I never see the "*** setSearchManager has been called ***" message..



This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender except where the sender expressly,
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.

Reply via email to