Hi,
I have one drop down list and a pick-list. Upon the selection from the drop down list I have used Ajax event to populate the pick-list.
Now I have selected 2-3 values from source list to target list from the pick-list. But when I am again selecting a different option from the drop down the entire pick-list is getting updated. The previously selected target values are gone.
My requirement is to retain those values in the target box in pick-list and changing the source upon selecting from drop down. I have used Ajax event and update the pick-list id.
Please, anyone having any idea let me know asap.
Retain target list values in Picklist
-
- Posts: 22
- Joined: 07 Jan 2016, 13:22
- Location: Kolkata
Mainak Mukherjee
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
-
- Posts: 22
- Joined: 07 Jan 2016, 13:22
- Location: Kolkata
Can anyone please suggest on this? I am stuck due to this.
Anyone's help is appreciated.
Anyone's help is appreciated.
Mainak Mukherjee
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
currently not possible.
A possible solution would be to enhance the DualListModel to set a selected flag for each item.
A possible solution would be to enhance the DualListModel to set a selected flag for each item.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Posts: 277
- Joined: 08 Jul 2013, 17:53
It seems like something you could do with just two separate lists and some bean methods to handle the scenario
-
- Posts: 22
- Joined: 07 Jan 2016, 13:22
- Location: Kolkata
Hi,smokeybandit wrote:It seems like something you could do with just two separate lists and some bean methods to handle the scenario
Primefaces picklist is having 2 lists by default. Source and target list. My requirement is to retain the values which has been selected from the source list and pushed to target list then change the drop-down option and re populate the updated source list while keeping the previous selection in the target list in UI.
Mainak Mukherjee
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
Kolkata, India
Programmer / Web Developer
PrimeFaces 5.2 / PF Extensions 3.2.0
JSF 2.2 / IBM WebSphere Portal 7.x
-
- Posts: 277
- Joined: 08 Jul 2013, 17:53
Yes, and you'll have to get creative with either how you populate the source list from the dropdown or how to maintain the target list in order to do what you want.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 59 guests