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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:59:19+00:00 2026-06-17T06:59:19+00:00

I am getting the following error: Conversion Error setting value ‘home’ for ‘null Converter’.

  • 0

I am getting the following error: Conversion Error setting value 'home' for 'null Converter'. Home is the string representation of what is being displayed.

To me, this doesnt make sense. Here is the JSF code:

<h:selectOneMenu value="#{createResourceDialogController.selectedDir}">
    <f:selectItems value="#{createResourceDialogController.dirs}" />
</h:selectOneMenu>

And here is the ManagedBean code:

public Map<String,IDir> getDirs()
{
    Map<String,IDir> retVal = new LinkedHashMap<String, IDir>();
    List<IDir> dirs;
    if(isCompanyResource)
    {
        dirs = convertToIDir(getCompanyDir());
    }
    else
    {
        dirs = convertToIDir(getUserDir());
    }
    for(IDir iDir : dirs)
    {
        retVal.put(iDir.getDir(),iDir);
    }
    return retVal;
}

public IDir getSelectedDir()
{
    return selectedDir;
}

public void setSelectedDir(IDir selectedDir)
{
    this.selectedDir = selectedDir;
}

To me, it appears that all the types match up and that converter isn’t even necessary. The getDirs() returns a map whose value is IDir. When the setter gets called, it should be getting the IDir? Any ideas?

  • 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-17T06:59:21+00:00Added an answer on June 17, 2026 at 6:59 am

    JSF converts your <h:selectOneMenu /> in an html select, which has only value and label attributes in plain text. So you need to use a converter for that, or also you can create a SelectItem list with id-label values and when you receive the form just reload IDir with the id.

    xhtml

    <h:selectOneMenu value="#{createResourceDialogController.selectedDirId}">
        <f:selectItems value="#{createResourceDialogController.options}" />
    </h:selectOneMenu>
    

    Backing Bean

    @ManagedBean
    @ViewScoped
    public class CreateResourceDialogController {
    
        private List<SelectItem> options;
    
        private String selectedDirId;
    
        private void initBean(){
            options = new ArrayList<SelectItem>();
            SelectItem item1 = new SelectItem(dir.getId.toString(), dir.getName());
            options.add(item1);
        }
    
        public List<SelectItem> getOptions(){
            return options;
        }
    
        public void setSelectedDirId(String dirId){
            selectedDirId = dirId;
        }
    
        public String getSelectedDirId(){
            return selectedDirId;
        }
    }
    

    Take a look to this tutorial. However you should consider going through a converter if you are going to reuse this code several times, as a cleaner solution.

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

Sidebar

Related Questions

I am getting the following error: Conversion failed when converting the varchar value '2010-01-10'
I am getting the following error The conversion of a varchar data type to
I'm getting the following compile error in the marked lines: error: conversion from ‘
I am getting following error error: invalid conversion from ‘const int*’ to ‘int*’ Following
Am getting following error message on calling WCF service: The formatter threw an exception
I am Getting following error on exporting the video using [exportSession exportAsynchronouslyWithCompletionHandler:^ Error: -[TiBlob
I am getting following error while installing the application on my device. before running
i am getting following error while getting data from dictionary -[__NSCFString objectForKey:]: unrecognized selector
I'm getting following error when I try to log onto phpMyAdmin. User * *
I am getting following error when I am trying to get WebResponse using WebResponse

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.