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

  • Home
  • SEARCH
  • 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 7026107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:04:23+00:00 2026-05-28T00:04:23+00:00

I need to create a custom Component with JSF 2.0 (not composite component), that

  • 0

I need to create a custom Component with JSF 2.0 (not composite component), that is similar to a SelectManyCheckbox, but has a different UI. I try to do this by subclassing UISelectMany and creating a new custom Renderer.

What I don’t understand is, how is the input data on the client passed through the Component into the Bean. There must be a way to collect the http params from the POST, put it in a List and set the List in the Bean.

edited

What I already tried is similar to this:

public void decode(FacesContext context, UIComponent component) {
    if ((context == null) || (component == null)) {
        throw new NullPointerException();
   }
   MapComponent map = (MapComponent) component;
   String key = getName(context, map);
   String value = (String)context.getExternalContext().
       getRequestParameterMap().get(key);
   if (value != null)
      map.setCurrent(value);
   }
}

I can see in the debugger, that my http-params are fetched correctly. I can also see, that my custom Converter will be called after that. But the values do not reach the Bean. But I can see a unspecific validation error in the log.
After reading some tutorials on the net I still don’t understand how this works. There must be some glue-code, that takes the converted value and passes it to the setter in the Bean. Does anybody know how this works?

Thanks
Jan

  • 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-28T00:04:24+00:00Added an answer on May 28, 2026 at 12:04 am

    There must be a way to collect the http params from the POST, put it in a List and set the List in the Bean.

    This is normally to be done in decode() method of the Renderer class. In case of Mojarra, it’s the com.sun.faces.renderkit.html_basic.MenuRenderer class. Just download the source and peek in there how it’s to be done.

    Basically, you just grab the request parameter values associated with the component’s client ID as parameter name and then set it as submitted value by the UIInput#setSubmittedValue().

    public void decode(FacesContext context, UIComponent component) {
        ((UIInput) component).setSubmittedValue(context.getExternalContext().getRequestParameterValuesMap().get(component.getClientId(context)));
    }
    

    (of course you need to do some validation beforehand; again, check the original source code)

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

Sidebar

Related Questions

I've got a custom component that I need to use if I create a
i kinda know how to create a Custom Web Part. But now i need
We have a product that we need to create an installer for. It has
I need to create a custom, reusable view component. I've been trying to look
I need to create transparent component inheriting from TCustomControl.. so it is custom painted,
What is the component that allows me to create a custom properties form? I
I need to create a custom GUI Component about same like shown in the
I create a custom dataset that I pass off to a black boxed component.
I'm attempting to create a custom JButton that has interchangeable skin components. Using CardLayout
I need to create a custom component in Flex 4.5 by extending the spark

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.