Questions tagged [selectmanymenu]

JSF tag to create a multi select dropdown.

The <h:selectManyMenu> is a JSF UI component which generates a HTML <select multiple="multiple" size="1"> element which allows you to bind the selected values to a managed bean property of collection or array type.

21 questions
16
votes
2 answers

org.hibernate.LazyInitializationException at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForModel

Despite of FetchType.EAGER and JOIN FETCH, I get a LazyInitalizationException while adding some objects to a @ManyToMany collection via a JSF UISelectMany component such as in my case the . The @Entity IdentUser, with…
codeSnippet
  • 181
  • 2
  • 7
6
votes
1 answer

How to get all the selected values from selectManyListbox / selectManyMenu / selectManyCheckbox?

How do I collect all selected values from UISelectMany components such as h:selectManyListbox, h:selectManyMenu, h:selectManyCheckbox, p:selectManyListbox, p:selectManyMenu, p:selectManyCheckbox, etc in backing bean? If someone can help with an…
Abhishek Dhote
  • 1,638
  • 10
  • 41
  • 62
4
votes
1 answer

How do UISelectOne and UISelectMany components preselect defaults in f:selectItems

I know how to preselect , in selected value should be one of the objects from , but how does this component work under the hood and can I change this behavior? In my case I've a duplicate object, actually this is two…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
3
votes
1 answer

UISelectMany in ui:repeat causes java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List

I have used the HashMap method for binding a list of checkboxes to a Map with success. This is nice since it allows you to have a dynamic number of checkboxes. I'm trying to extend that to a variable length list of…
Matt
  • 823
  • 1
  • 8
  • 17
2
votes
1 answer
2
votes
1 answer

throws ELException: The class 'java.lang.String' does not have the property 'foo'

I am trying to implement primefaces selectManyMenu in advanced mode as shown in the showcase, however not able to get it work. It works perfectly for selectOneMenu though. Here is my code for selectOneMenu:
Ankit
  • 1,075
  • 1
  • 8
  • 19
1
vote
0 answers

Primefaces SelectManyMenu of list of objects, set pre-selected values from another list

I have an ArrayList of a custom object (ArrayList allCells) and a sublist of allList (ArrayList checkedCells) . What I would like to do is display the allCells arraylist in a p:selectManyMenu and show the objects of my sublist…
NickAth
  • 1,089
  • 1
  • 14
  • 35
1
vote
1 answer

Primefaces selectManyMenu - Loading list from Object

So the scenario I have is such: I have a person that I load up that has a list of integer values that represent all of the videos that person has watched. For example, if person 12345 has viewed three videos, it would be represented in a list as…
user2124871
  • 803
  • 3
  • 9
  • 25
1
vote
0 answers

How to add space between checkbox and label value in p:selectmanymenu dropdown

I have a requirement to have a space between the checkbox and dropdown list items, where dropdown items are dynamically retrieved from BackingBean. I tried itemLabel="#{''.concat(' ').concat(bean.listValues)}" I also tried taking an emptyString…
Jag
  • 77
  • 8
1
vote
0 answers

@NotEmpty List validation

I have a JSF component which is mapped on a List in the corresponding bean. As I want the mapped field to contain at least one value when the form is submitted, this field is annoted @NotEmpty. Bean : public class MyBean { …
Tom
  • 375
  • 1
  • 4
  • 13
1
vote
0 answers

p:selectManyMenu deselect confirmation

I try to get a confirmation dialog when i deselect an item from a mutli-select p:selectManyMenu.
Kevin Busch
  • 191
  • 1
  • 4
  • 17
1
vote
1 answer

how can I bind ajax event to selectManyMenu component in primefaces

Can I modify SelectManyMenu component like autoComplete component in primefaces. In detail, instead of fetching all data to SelectManyMenu component at one time, I want to fetch the data according to the user's inputs (letters).I want to fetch data…
imageSail
  • 21
  • 4
1
vote
1 answer

Using Hashmap with SelectManyMenu with JSF

in an WebApp (JSF 2.1 with Primefaces) I want to use a HashMap to fill a SelectManyMenu (with Checkboxes). The HashMap is initialized with some Values and the key set to false. When the User selects the Checkboxes I want the Key to be set to true.…
1
vote
1 answer

Is there a way to prevent JSF from displaying previous/outdated content in h:selectManyMenu after validation error?

I have a form with, say a text field and a multi-select field.
Antares42
  • 1,406
  • 1
  • 15
  • 45
1
vote
1 answer

Primefaces SelectManyMenu Converter not Converting

I am using a converter throughout my system which uses the following annotation: @FacesConverter(forClass = Group.class) this works fine except for SelectManyMenu where the conversion doesn't seem to take place. My SelectManyMenu is defined as…
bradders
  • 11
  • 1
  • 3
1
2