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 7535251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:15:45+00:00 2026-05-30T06:15:45+00:00

In the jsf page I created, 3 other jsp pages are added through page

  • 0

In the jsf page I created, 3 other jsp pages are added through page include, each of these has its own backing bean and pre populates from webservices, values through scriptcollector prerender method. While saving, how to get the submitted values in my save action method? Is it possible to get each of these beans with their current values from Faces Context?
I am using JSF 1.1.

  • 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-30T06:15:46+00:00Added an answer on May 30, 2026 at 6:15 am

    You can inject one managed bean in other managed bean as managed property. In JSF 1.x this is to be done with the <managed-property> declaration in faces-config.xml.

    Here’s a kickoff example of how 3 web service beans are to be injected in 1 form bean.

    <managed-bean>
        <managed-bean-name>webServiceBean1</managed-bean-name>
        <managed-bean-class>com.example.WebServiceBean1</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>webServiceBean2</managed-bean-name>
        <managed-bean-class>com.example.WebServiceBean2</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>webServiceBean3</managed-bean-name>
        <managed-bean-class>com.example.WebServiceBean3</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>formBean</managed-bean-name>
        <managed-bean-class>com.example.FormBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
            <property-name>webServiceBean1</property-name>
            <value>#{webServiceBean1}</value>
        </managed-property>
        <managed-property>
            <property-name>webServiceBean2</property-name>
            <value>#{webServiceBean2}</value>
        </managed-property>
        <managed-property>
            <property-name>webServiceBean3</property-name>
            <value>#{webServiceBean3}</value>
        </managed-property>
    </managed-bean>
    

    This way you can just access them “the usual way” inside the form submit method.

    public class FormBean {
    
        private WebServiceBean1 webServiceBean1;
        private WebServiceBean2 webServiceBean2;
        private WebServiceBean3 webServiceBean3;
    
        public String submit() {
            // Here you can just access the submitted data through the injected beans.
        }
    
        // Add/generate setters. Getters are not necesary.
    }
    

    As an alternative, you can use Application#createValueBinding() to evaluate EL programmatically.

    public String submit() {
        FacesContext context = FacesContext.getCurrentInstance();
        Application application = context.getApplication();
        WebServiceBean1 webServiceBean1 = (WebServiceBean1) application.createValueBinding("#{webServiceBean1}").getValue(context);
        WebServiceBean1 webServiceBean1 = (WebServiceBean2) application.createValueBinding("#{webServiceBean2}").getValue(context);
        WebServiceBean1 webServiceBean1 = (WebServiceBean3) application.createValueBinding("#{webServiceBean3}").getValue(context);
        // ...
    }
    

    Note that above methods are deprecated in JSF 1.2 and newer in favor of unified EL API. See also Get JSF managed bean by name in any Servlet related class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a web page that print some text using JSF I've added spaces
I have a JSF page that is included in other JSF pages (basically a
I have created a JSF 2 page which uses Facelets to define the structure
I have a JSF page which has a variable number inputText elements containing numeric
I have a JSF/Seam web app which has a page with a form which,
I am using eclipse to create my jsf project. I created my own components,
I want to implement Prime Faces example I created this JSF page: <?xml version='1.0'
My goal is to present a jsf page that has Create, Retrieve and Update
JBoss JSF page cache doesn't always seem to be updated when I change my
i have a jsf page which displays an image from an url http://ichart.finance.yahoo.com/z?s=^NSEI&t=1d&q=l&l=on&z=l&p=s&a=v&p=s i

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.