How to set pre-selected values in Select2 APEX plugin?
up vote
0
down vote
favorite
I have a page 100
with a Classic Report
table region p100_report
. It renders with a query similar to this:
select id, pages_list from (
select id, listagg(col_page, ':') within group (order by col_page) as pages_list
from t1
group by id
order by id
) t1_lag;
So if t1
is a table like this:
|id|col_page |
|--|---------|
| 1| 102|
| 1| 103|
| 1| 500|
| 1| 600|
| 2| 101|
| 2| 102|
| 2| 103|
then t1_lag
is a table like this:
|id| pages_list|
|--|---------------|
| 1|102:103:500:600|
| 2| 101:102:103|
Each cell in p100_report
table, pages_list
column contains a link to the modal page 200
. It has Select2
Multi-select item called p200_pages_s2
.
List of values for p200_pages_s2
:
|pageID|pageName|
|------|--------|
| 100|Main |
| 101|First |
| 102|Second |
| 103|Third |
| 200|Modal |
| 500|Admin |
| 600|Log |
It uses pageID
for submits and pageName
for Select2
li
s display correctly.
I try to send specific page_list
values to page 200
with Link > Target > Set Items
, assigning #PAGES_LIST#
value (for example, 101:102:103
) to the P200_PAGES_S2
.
In session state it has required colon separated string value, but GUI part is empty. I tried different Dynamic Actions with Submit
, Refresh
, even some JS code from here, but nothing seems to work.
The problem: I need to set pre-selected values in ul.select2-selection__rendered
, add an interactive working li
for each value from the colon separated list. Any advice?
jquery-select2 oracle-apex-5.1
add a comment |
up vote
0
down vote
favorite
I have a page 100
with a Classic Report
table region p100_report
. It renders with a query similar to this:
select id, pages_list from (
select id, listagg(col_page, ':') within group (order by col_page) as pages_list
from t1
group by id
order by id
) t1_lag;
So if t1
is a table like this:
|id|col_page |
|--|---------|
| 1| 102|
| 1| 103|
| 1| 500|
| 1| 600|
| 2| 101|
| 2| 102|
| 2| 103|
then t1_lag
is a table like this:
|id| pages_list|
|--|---------------|
| 1|102:103:500:600|
| 2| 101:102:103|
Each cell in p100_report
table, pages_list
column contains a link to the modal page 200
. It has Select2
Multi-select item called p200_pages_s2
.
List of values for p200_pages_s2
:
|pageID|pageName|
|------|--------|
| 100|Main |
| 101|First |
| 102|Second |
| 103|Third |
| 200|Modal |
| 500|Admin |
| 600|Log |
It uses pageID
for submits and pageName
for Select2
li
s display correctly.
I try to send specific page_list
values to page 200
with Link > Target > Set Items
, assigning #PAGES_LIST#
value (for example, 101:102:103
) to the P200_PAGES_S2
.
In session state it has required colon separated string value, but GUI part is empty. I tried different Dynamic Actions with Submit
, Refresh
, even some JS code from here, but nothing seems to work.
The problem: I need to set pre-selected values in ul.select2-selection__rendered
, add an interactive working li
for each value from the colon separated list. Any advice?
jquery-select2 oracle-apex-5.1
1
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a page 100
with a Classic Report
table region p100_report
. It renders with a query similar to this:
select id, pages_list from (
select id, listagg(col_page, ':') within group (order by col_page) as pages_list
from t1
group by id
order by id
) t1_lag;
So if t1
is a table like this:
|id|col_page |
|--|---------|
| 1| 102|
| 1| 103|
| 1| 500|
| 1| 600|
| 2| 101|
| 2| 102|
| 2| 103|
then t1_lag
is a table like this:
|id| pages_list|
|--|---------------|
| 1|102:103:500:600|
| 2| 101:102:103|
Each cell in p100_report
table, pages_list
column contains a link to the modal page 200
. It has Select2
Multi-select item called p200_pages_s2
.
List of values for p200_pages_s2
:
|pageID|pageName|
|------|--------|
| 100|Main |
| 101|First |
| 102|Second |
| 103|Third |
| 200|Modal |
| 500|Admin |
| 600|Log |
It uses pageID
for submits and pageName
for Select2
li
s display correctly.
I try to send specific page_list
values to page 200
with Link > Target > Set Items
, assigning #PAGES_LIST#
value (for example, 101:102:103
) to the P200_PAGES_S2
.
In session state it has required colon separated string value, but GUI part is empty. I tried different Dynamic Actions with Submit
, Refresh
, even some JS code from here, but nothing seems to work.
The problem: I need to set pre-selected values in ul.select2-selection__rendered
, add an interactive working li
for each value from the colon separated list. Any advice?
jquery-select2 oracle-apex-5.1
I have a page 100
with a Classic Report
table region p100_report
. It renders with a query similar to this:
select id, pages_list from (
select id, listagg(col_page, ':') within group (order by col_page) as pages_list
from t1
group by id
order by id
) t1_lag;
So if t1
is a table like this:
|id|col_page |
|--|---------|
| 1| 102|
| 1| 103|
| 1| 500|
| 1| 600|
| 2| 101|
| 2| 102|
| 2| 103|
then t1_lag
is a table like this:
|id| pages_list|
|--|---------------|
| 1|102:103:500:600|
| 2| 101:102:103|
Each cell in p100_report
table, pages_list
column contains a link to the modal page 200
. It has Select2
Multi-select item called p200_pages_s2
.
List of values for p200_pages_s2
:
|pageID|pageName|
|------|--------|
| 100|Main |
| 101|First |
| 102|Second |
| 103|Third |
| 200|Modal |
| 500|Admin |
| 600|Log |
It uses pageID
for submits and pageName
for Select2
li
s display correctly.
I try to send specific page_list
values to page 200
with Link > Target > Set Items
, assigning #PAGES_LIST#
value (for example, 101:102:103
) to the P200_PAGES_S2
.
In session state it has required colon separated string value, but GUI part is empty. I tried different Dynamic Actions with Submit
, Refresh
, even some JS code from here, but nothing seems to work.
The problem: I need to set pre-selected values in ul.select2-selection__rendered
, add an interactive working li
for each value from the colon separated list. Any advice?
jquery-select2 oracle-apex-5.1
jquery-select2 oracle-apex-5.1
edited Nov 9 at 12:46
asked Nov 9 at 12:38
VELFR
9511
9511
1
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago
add a comment |
1
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago
1
1
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53225859%2fhow-to-set-pre-selected-values-in-select2-apex-plugin%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
About sending the value from one page to another may not be necessary. You can access the item on page 1 on page 99 as long as the value of the item is in the session. If do you need to send the value to another page, I think there might be a problem with the URL that is formed. Colon has a meaning in the URL of apex, I think you need to escape the values... community.oracle.com/thread/1064677
– romeuBraga
Nov 9 at 15:48
@romeuBraga No, afaik, that's not the problem. I'm already escaping colons with backslashes. The value transition works. The problem is that Select2 doesn't draw values as interactive list items in the form.
– VELFR
17 hours ago
Are you trying to do this? >>> apex.oracle.com/pls/apex/f?p=145797:32:0::::P32_NEW:1:4 <<< Please copy all the url between >>> URL <<< In this case, i'm setting the pre-selected values to 1 and 4, you can change to values between 1..4
– romeuBraga
11 hours ago