nbuytaert1 / apex-select2

Select lists in Oracle APEX as they should be
https://apex.oracle.com/pls/apex/f?p=64237:20
GNU General Public License v2.0
56 stars 18 forks source link

Another Question : How do you set the plugin value? #100

Closed JacoFourie closed 6 years ago

JacoFourie commented 6 years ago

We have a dialog page where you can select a list of people to send a email to. Let say you choose 2 people. When the dialog returns the values they are sent in this format.

CFISCHAT:JNOTNAGEL

Now let say the user forgot to select a person and now the user wants to add another person so you send the value back to the select2 item.

Then only the first name is shown not both of them.

So my question is what is the format to send to the plugin to be populated with so it shows all the values pairs that was selected so a user can add more and not have to select all of the people again. The string that is sent to the control is in the select from the DB.

Not sure if what I am asking makes any sense.

nbuytaert1 commented 6 years ago

Returning a colon delimited list of values is the right way.

How do you set the value of the Select2 page item? Are you using the "Source" setting on the page item, or are you using a dynamic action/JavaScript?

You might want to read the following StackOverflow post if you're setting the values client-side: https://stackoverflow.com/questions/24905607/cant-set-multiple-values-in-select2

JacoFourie commented 6 years ago

Hi. Thanks for the reply. The Select2 item is on a dialog. The item gets its value from a page that calls the dialog using a button. On the button you can specify the source item on the page and the target on the dialog. The target on the dialog is the Select2 item.

JacoFourie commented 6 years ago

We have this working now. Thanks for a cool plugin.

abhinavk1807 commented 4 years ago

@JacoFourie, please share the solution for this