cancel
Showing results for 
Search instead for 
Did you mean: 

How to show FragmentBookmarks in a Listbox in Design Studio 1.6 SP01?

Former Member
0 Kudos
55

Dear Experts

I have stored FragmentBookmarks in a special Folder used with selected TreeModel. Now i like to show, if a End-User is clicking on a Folder, all stored FragmentBookmarks in a Listbox element. How i can do that? Thanks for you answers and examples.

Kind regards,

Adrian

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Adrian,

To achieve your requirement, in the "On Select" event of your Tree component you would code the following, as an example:

var myFolder = me.getSelectedValue();

var myFragmentBookmarks = Bookmark.FragmentBookmark.getAllBookmarksByFolder(myFolder);

LISTBOX_1.removeAllItems();

myFragmentBookmarks.forEach(function(myBookmark, index) {

  LISTBOX_1.addItem(myBookmark.id, myBookmark.title);

});

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa

Thanks a lot! What is the me. functionality?

Hope hearing soon from you!

Kind regards,

Adrian

MustafaBensan
Active Contributor
0 Kudos

Hi Adrian,

You're welcome.  You can learn more about the "me" functionality in the blog Using me in scripting.

Regards,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

And just to be clearer, "me" is simply a short and generic way to refer to the current component when addressed from a script of that component, instead of hardcoding the actual name of the component.

Answers (0)