on 12-14-2016 2:15 PM
Dear SCN-Community,
is it possible to parse the BOOKMARK parameter from the URL? I´m using the Bookmark.FragmentBookmark.shareBookmark(url); function to generate an OpenDocument link for the applikation/bookmark. The generated link is something like
http://bo_server:8080/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=AcAwvfZyHA5AhoqU...
As you can see there is a &BOOKMARK parameter. Is there a function to fetch the value of this parameter to load for example the bookmark name?
Kind regards
André
I have found a solution. I´m replacing the default bookmark parameter and changed it to the custom X_BOOK parameter. Within the on_startup script I can parse the parameter and do my custom stuff.
/* Share bookmark */
var sel_bookmark = LISTBOX_CREATED_BOOKMARKS.getSelectedValue();
var url = Bookmark.PortableFragmentBookmark.getBookmarkUrl(sel_bookmark);
/*Define custom url and set X_BOOK parameter */
Bookmark.FragmentBookmark.shareBookmark(Convert.replaceAll(url, "&BOOKMARK", "&X_BOOK"));
/*Check if X_BOOK paramter != INITIAL*/
if(X_BOOK != "INITIAL") {
var bookmarks = Bookmark.PortableFragmentBookmark.getAllBookmarkInfos(g_bookmark_group);
bookmarks.forEach(function(element, index)
{
if (element.id == X_BOOK) {
TEXT_HEADER_TITLE.setText(element.title);
Bookmark.PortableFragmentBookmark.loadBookmark(X_BOOK);
}
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have found a solution. I´m replacing the default bookmark parameter and changed it to the custom X_BOOK parameter. Within the on_startup script I can parse the parameter and do my custom stuff.
/* Share bookmark */
var sel_bookmark = LISTBOX_CREATED_BOOKMARKS.getSelectedValue();
var url = Bookmark.PortableFragmentBookmark.getBookmarkUrl(sel_bookmark);
/*Define custom url and set X_BOOK parameter */
Bookmark.FragmentBookmark.shareBookmark(Convert.replaceAll(url, "&BOOKMARK", "&X_BOOK"));
/*Check if X_BOOK paramter != INITIAL*/
if(X_BOOK != "INITIAL") {
var bookmarks = Bookmark.PortableFragmentBookmark.getAllBookmarkInfos(g_bookmark_group);
bookmarks.forEach(function(element, index)
{
if (element.id == X_BOOK) {
TEXT_HEADER_TITLE.setText(element.title);
Bookmark.PortableFragmentBookmark.loadBookmark(X_BOOK);
}
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.