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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:10:12+00:00 2026-06-07T03:10:12+00:00

I am trying to figure out following problem. I have a simple rich:select <rich:select

  • 0

I am trying to figure out following problem. I have a simple rich:select

<rich:select listWidth="310" id="userSelect" value="#{departmentBacking.selectedUserId}" 
disabled="#{departmentBacking.unassignCheckbox}"enableManualInput="true" defaultLabel="#{not departmentBacking.unassignCheckbox ? 'start typing a surname...' : 'Uncheck unassign departments first'}">

        <f:selectItems value="#{departmentBacking.userList}" var="user" itemValue="#{user.id}" itemLabel="#{user.surname} #{user.name} - #{user.email}" />

</rich:select>

It selects a person who is later set as leader of some departments. Works well. However, if I only need to unassign departments, without choosing new one, problems start to occur. If the unnassignCHeckbox is selected, I don’t want to use this value at all. However, I cannot make the jsf engine to do the postback, since I always get a validation error.

MyForm:userSelect: Validation Error: Value is not valid

I assume this is because the default value of #{user.id} is 0 and no user with this id is to be found in userList. The bean is view scoped. Is there a way to somehow either skip the validation or exclude the rich:select from the submitting form?.

  • 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-07T03:10:14+00:00Added an answer on June 7, 2026 at 3:10 am

    Try adding a <f:selectItem> with the 0 value and a “SELECT” label (or whatever). That will solve your problem, and add a validation that when the unnassignCHeckbox is unselected, the selectedUserId value must be greater than 0 (this last only if its not yet implemented).

    <rich:select listWidth="310" id="userSelect" value="#{departmentBacking.selectedUserId}" 
        disabled="#{departmentBacking.unassignCheckbox}"enableManualInput="true"
        defaultLabel="#{not departmentBacking.unassignCheckbox ? 'start typing a surname...' : 'Uncheck unassign departments first'}">
    
        <f:selectItem itemValue="0" itemLabel = "SELECT SURNAME" />
        <f:selectItems value="#{departmentBacking.userList}" var="user"
            itemValue="#{user.id}"
            itemLabel="#{user.surname} #{user.name} - #{user.email}" />
    
    </rich:select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to figure out the following simple problem in order to get
I am trying to figure out how to make my layout have the following
I'm trying to figure out how XSLT process namespace prefixes and have following example:
I'm trying to figure out the best query to accomplish the following. I have
I'm trying to figure out the following issue related to BigIntegers in Java 7
I am going a bit nuts trying to figure out why the following won't
Trying to figure out this pseudo code. The following is assumed.... I can only
I'm trying to figure out how to add the following data to my json
I am trying to figure out how to accomplish the following task: Create a
I am trying to figure out how to do the following: 1) After a

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.