Skip to Content

SAP Design Studio - Apply saved values AFTER bookmark load

Hell dear community,

I'm trying to find a way to apply 3 saved text values to 3 different Buttons AFTER I have load a bookmark.

EXAMPLE:

I have 3 text boxes (BEFORE bookmark load):

BUTTON_1 = "Bla"

BUTTON_2 = "Blub"

BUTTON_3 = "Bleb"

Now I want to load Bookmark 1 by clicking the BUTTON_1. But after the loading of the bookmark, the texts of BUTTON_2 and BUTTON_3 are empty (of course).

I want to reach this scenario:

Before the load of the bookmark, I need to cache the text of BUTTON_2 and BUTTON_3 somewhere.

And after the load of the Bookmark, I apply the cached values to the buttons again.

But unfortunately it doesn't work with this code I used :

var bookmarks = Bookmark.getAllBookmarks();

var button6 = BUTTON_6.getText();
var button8 = BUTTON_8.getText();
var button11 = BUTTON_11.getText();


var bookmarkId = DROPDOWN_2.getSelectedValue();

Bookmark.loadBookmark(bookmarkId);

bookmarks.forEach (function (element, index)
{
DROPDOWN_2.addItem(element.name, element.text);
});

BUTTON_6.setText(button6);
BUTTON_8.setText(button8);
BUTTON_11.setText(button11);

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 29, 2017 at 10:46 PM

    HI Vu,

    The issue here is that you are using a Standard bookmark, which will overwrite the state of the entire application. I suggest you use Fragment Bookmarks to selectively save and load the texts that you need.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded