Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5949285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:13:38+00:00 2026-05-22T17:13:38+00:00

I am using jsf 2.0 and I have two bean Navigation (Application Scope )

  • 0

I am using jsf 2.0 and I have two bean Navigation (Application Scope ) and Module (Request Scope). I want to use methods of Navigation bean in Module Bean. I am doing in this way
In Module Bean

 @ManagedProperty(value = "#{navigationBean}")
    private NavigationBean navigationBean;

But when I am trying to get navigationBean.SomeMethod it is not working as navigation bean is null . How to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:13:39+00:00Added an answer on May 22, 2026 at 5:13 pm

    The both beans needs to be a fullworthy @ManagedBean. The acceptor should have a public setter method for the injected bean. The injected bean is only available in @PostConstruct and beyond (i.e. in all normal event methods, but thus not in the constructor of the acceptor).

    So, this ought to work:

    @ManagedBean
    @ApplicationScoped
    public class Navigation {
        // ...
    }
    

    @ManagedBean
    @RequestScoped
    public class Module {
    
        @ManagedProperty(value="#{navigation}")
        private Navigation navigation;
    
        @PostConstruct
        public void init() {
            navigation.doSomething();
        }
    
        public void setNavigation(Navigation navigation) {
            this.navigation = navigation;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application using JSF and JPA(Eclipse link). I have two
I have a web application thats using JSF 2. In this application I am
I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I have small application using JSF 1.1. It is using NTLM for authentication. What
Using jsf 1.2, hibernate, richfaces 3.3.0GA and facelets. I have this code in my
I have a Java application runnning on a Glassfish server using JSF 2.0.2. at
I have two dependent dropdowns on a JSF page that work fine. I use
I am using JSF and Hibernate in my application. Say I have a user
I have following two methods in my backing bean - public String validateUser() {
I have JSF page has two drop down lists and I want to load

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.