Re: Parameter Injection Problem

Splash Forums PrettyFaces Users Parameter Injection Problem Re: Parameter Injection Problem

#20709

paulcartmell
Participant

Hi Christian

The relevant code from the PageManager class looks like this:

/**

*

*/

public class PageManagerBean

{

/**

*

*/

@EJB

protected SiteManagerBean siteManagerBean;

/**

*

*/

protected String categoryURL;

/**

*

*/

public String getCategoryPage()

{

// Call to site manager to return page based on URL

return siteManagerBean.getPage(PageType.CATEGORY_PAGE, categoryURL);

}

/**

*

*/

public void setCateogryURL(String categoryURL)

{

this.categoryURL= categoryURL;

}

}

The actual error is a null pointer from the call to the SiteManagerBean; categoryURL is null at the time the getCategoryPage() method is called.

The setCategoryURL method is never called (I put a logger call in to check) and then I get a 404 because of the error.

I have tried version 3.1.0 and get the same error; switching back to 3.0.1 immediately fixes the problem.

Thanks

Paul.