After submitting with commandButton, I'd like to update a primafaces picklist component... but only the source part not the target part. Is it possible to obtain the id of the source list of the picklist in order to update it?
Asked
Active
Viewed 469 times
1
-
1No you can't.. but why would you do it ? – Hatem Alimam Jul 15 '14 at 09:19
-
@HatemAlimam Because I have a dialog with a picklist (picklist2) (which is filled by the same data) and I want to remove the chosen items from the source of picklist1 when the user choose an item from picklist2 (but I don't want it to display the chosen items in the target of picklist1) – Sinda MOKADDEM Jul 15 '14 at 09:31
-
1Even if you have to use the same list for sources... I'm afraid you'll have to duplicate it in the bean to get it for picklist1 and picklist2. – rion18 Jul 16 '14 at 02:27
-
Finally what have I done is to reload the picklist1 with data at the end of the execution of the commandButton method. it worked well. Thanks to you @rion18 and HatemAlimam. – Sinda MOKADDEM Jul 16 '14 at 08:23
-
What if the user closes the dialog and wants to edit his choices on picklist1? – rion18 Jul 16 '14 at 08:25
-
@rion18 picklist1 belong to a form to create a new item.. whereas picklist2 (which is in the dialog) belong to a form to edit existing items.. it's 2 different jobs.. So if a user closes the dialog (of editing) and decide to create a new item it causes no problem. – Sinda MOKADDEM Jul 16 '14 at 08:36
-
Ohhhh then I didn't understand the question XD – rion18 Jul 16 '14 at 08:37