Need help in accessing filtered entries of SelectManyMenu

UI Components for JSF
Post Reply
pspkmayurk
Posts: 1
Joined: 25 Nov 2015, 14:46

25 Nov 2015, 17:38

My goal is to replace
- an existing selectManyListBox of JSF 2.2
WITH
- a listbox where additionally I can have a filter to narrow down my list to select from.

I could achieve this using p:selectManyMenu with a 'filter=true' attribute. However in my form, there are two buttons -Add and Add All Please refer to the screenshot below.

Image

Add- should send the selected items to a custom table on the same page - This is currently achieved by submitting the form, accessing the selected entries and updating the custom table values. This works fine.

Now the problem is with the Add All button. The requirement is that clicking the Add All button should submit the form and in the java method that gets called we should be able to identify only the filtered items even without the user manually selecting any entry. Eg: Please see the screenshot below, all the red entries should automatically be selected and should be available at the java bean when Add All is clicked - much similar to the p:pickList's 'Add All' button.

Image

So how can we access only the filtered entries in the java bean? Any AJAX methods that does the same job is also helpful.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests