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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:35:13+00:00 2026-06-05T08:35:13+00:00

I have a request scoped CDI manage bean(Also tried with jsf managed bean but

  • 0

I have a request scoped CDI manage bean(Also tried with jsf managed bean but the same problem!) :

@Named
@RequestScoped
public class myController{

private HashMap<String, MyModel> modelMap;

@PostConstruct
private void init() {
  logModelMap = new HashMap<String, MyModel>();
  logModelMap.put("CONSTANT_1", new MyModel());
  logModelMap.put("CONSTANT_2", new MyModel());
  logModelMap.put("CONSTANT_4", new MyModel());
}
public HashMap getModelMap() {
   return logModelMap;
}
}

And MyModel class which is a simple pojo:

public class MyModel{

private String type = "";
private Date date;

//constructor, getter and setter methods
}

I have written a composit component using jsf and bind fields to textbox and calendar and I want to access fields inside hashmap and set some values:

#{myController.modelMap['CONSTANST_1'].type}
#{myController.modelMap['CONSTANST_1'].date}

#{myController.modelMap['CONSTANST_2'].type}
#{myController.modelMap['CONSTANST_2'].date}

#{myController.modelMap['CONSTANST_3'].type}
#{myController.modelMap['CONSTANST_3'].date}

but just the first two lines for constant_1 works and for other two constants, type and date are null !
I saw in firebug that values are sent to server properly but fields inside map are not set!
By the way I’m using primefaces command button with ajax to send data to server.

  • 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-06-05T08:35:15+00:00Added an answer on June 5, 2026 at 8:35 am

    Finally I got where the problem was.
    I had nested forms!!!
    One form that wraps my composite component and one form where I used my composite component!

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

Sidebar

Related Questions

I have a CDI bean annotated with @Named and @RequestScoped. It is working perfectly
I have two drop downs on a page whose backing bean is Request Scoped.
I have a request scoped bean, and I need to have access to the
Say I have a JSF backing bean, request scope, that has a List as
i am working on jsf 1.2 application. i have kept bean in request scope
I have the following conversation scoped backing bean: @Named @ConversationScoped public class TestConversation implements
I have already one session scoped CDI bean, which keeps currently logged in user
I have a @RequestScoped CDI bean that I want to turn into an EJB
I am using JSF 1.1. I have a JSF page with a request scoped
I have a Controller bean (SearchController) that has two managed bean as managed properties

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.