on 04-27-2018 2:20 PM
Hi experts,
I'm currently implementing a bookmark solution to an existing dashboard.
Created bookmarks are stored in a listbox. The listbox always needs to have one item selected.
I tried to implement it in a way that in case a new bookmark is created, it should become the selected value in the listbox. However there seems to be no way to achive this as the listbox won't accept a bookmark ID as a value to set the selected value.
Heres what I tried to do:
LB_BOOKMARK is my listbox for bookmarks.
BOOKMARKS is my bookmark component.
The .addItem function for listboxes will accept a bookmark ID as input but doesn't return anything.
The .setSelectedValue function won't accept bookmark IDs and I'm stuck right there.
Do you see any way set a newly created bookmark as the selected one in a list?
Hi everyone,
I've been working on this issue once more and found a solution that might not be best one but still does the trick.
As I'm not able to provide a bookmark id to set the listbox to I use a hidden textarea. The id is passed to the textarea and the the value of the textarea can be passed on as input to set the listbox to.
TA_* = textarea
LB_* = listbox
TA_BOOKMARK_DESCRIPTION.setValue(BOOKMARKS.get(bookID).id);
LB_BOOKMARK.setSelectedValue(TA_BOOKMARK_DESCRIPTION.getValue());
Best regards,
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.