Just another site

invalid value in selectitems when we refresh the selectitems

here’s the scenario: there’s a selectonemenu on the page, which dynamically load items based on the customer’s selection on another drop down list on the same page. problem is that after we loading new items for this selectonemenu, we can see them but trying to save will give error “invalid value”.


The new selected item can’t be found in the latest selected items. This is classic hashCode(), equals() issue, we just need to overwrite the equals method, and let two entity with the same value equal to each other.

e.g: LeadJobDetails.xhtml vet setting



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: