Skip to Content
0

Design Studio Portable Fragment Bookmarking Issue

Jan 18, 2017 at 05:50 PM

1.5k

avatar image

I'm using Design Studio 1.6 SP04 with BusinessObjects 4.1 SP06. My goal is to make a bookmark appear in an HTML iframe. I have been trying to do this by pointing the HTML iframe source to the bookmark URL. I am not working with the BI Launchpad.

As a test, I created a blank analysis application, and added a data source, a chart (CHART_1), a listbox(LISTBOX_1), a panel around the chart and listbox (PANEL_1), and a button outside the panel (BUTTON_1). The button has the following script in its On Click field:

 Bookmark.PortableFragmentBookmark.saveBookmark("ONLINE_COMP",PANEL_1);

My understanding is that this script should create a new bookmark that contains the panel, the listbox, and the chart, but not the button since it lies outside the panel. If I visit the bookmark URL (e.g.

http://localhost:<PORT>/aad/zen?APPLICATION=<APPLICATION_NAME>&BOOKMARK=<BOOKMARK_ID>), I see all the components on the screen rather than just what's in the panel. This is despite the fact that the properties file for the bookmark doesn't contain the button component in this example. However, if I open the bookmark using the Online Composition template, it loads just the panel and its contents. What am I missing here? What is the Online Composition template doing above and beyond just loading the bookmark? Does it have something to do with how the Fragment Gallery handles the bookmarks?

Thanks,

Krishna

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Mustafa Bensan Jan 19, 2017 at 07:55 AM
0

Hi Krishna,

My comments and questions are as follows:

1) You mention "I am not working with the BI Launchpad". So which platform are you deploying your application to, NetWeaver, HANA?

2) I think the behaviour you are experiencing is the standard functionality by design. When you launch a bookmark URL, it still launches and renders the entire application but applies the saved portable fragment bookmark properties to the corresponding components inside the panel. You will notice that the bookmark URL references both the application name and the bookmark ID.

3) When you say "if I open the bookmark using the Online Composition template, it loads just the panel and its contents", I assume you mean you are referring to the screenshot example where "the bookmark appears correctly once dragged and dropped into the compose area". What is happening here is that you are dragging the portable fragment bookmark ("smart object") from the Fragment Gallery to the Split Cell Container in the compose area. In this case, the answer to your question "Does it have something to do with how the Fragment Gallery handles the bookmarks?" is yes. The Fragment Gallery and Split Cell Container are integrated to allow only the saved "fragments" to appear in the Split Cell Container rather than all components in the host application. Indeed, this is the whole purpose of the online composition mechanism. You cannot replicate it by attempting to load the bookmark URL into an iFrame. The bookmark URL will always load the entire application, not just the components that were saved as part of the bookmark.

Perhaps if you could elaborate more about what use case you are trying to implement with the iFrame and bookmark, we can provide other suggestions.

Regards,

Mustafa.

Show 9 Share
10 |10000 characters needed characters left characters exceeded

Hi Mustafa,

The reason I'm using iFrames is to integrate my Design Studio Dashboard with Drupal. Specifically, I want to expose the charts in my dashboard to third-party applications. One way to do this, I thought, was to have a bookmark render in an iFrame to expose it via an OpenDoc or other application link. You're saying that pointing the iFrame's source directly to the bookmark URL won't work, so I have a few questions.

  1. Is there a way to replicate the Fragment Gallery/Split Cell Container functionality that only renders what was selected in the bookmark (without just using those components as shown in the template)? The scenario here is the user has finished composing a dashboard using the Online Composition application, then wants to expose each tile to Drupal. The tiles are already bookmarked, so I just want a way to get them rendered properly in an iFrame without any extras.
  2. If not, am I on the right track by using bookmarks, or is there another Design Studio feature I could be using to get what I want?

Thanks,

Krishna

0

Kai - I'm wondering if using OpenDoc would work for you? Since you want to use it outside the BI suite. I know this is used for other third party applications - see the official help here: SAP OpenDoc Help here: https://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_opendocument_en.pdf

0

Unfortunately, OpenDoc wouldn't work for this purpose with our current setup. Is there a way I can leverage existing Design Studio code that makes the split cell container and fragment gallery work together to load bookmarks properly? Any Design Studio functions in particular that I could use to take advantage of that functionality?

Thanks,

Krishna

0

Hi Krishna,

You could take the following approach:

1) Create your own Online Composition application containing only the bare minimum functionality to allow the user to define their own charts;

2) Wrap the chart in a panel component and provide a mechanism for the user to save the panel as a portable fragment bookmark;

3) Provide a mechanism where the user can display the BookMarkID of the portable fragment bookmark they have saved;

4) To expose the bookmark in an iFrame, instead of linking it to the bookmark URL, link it to the OpenDoc URL of your Online Composition application and add a parameter, say X_BOOKMARKID, to pass the bookmark ID of the portable fragment you want to expose, as a parameter to your application. Build your Online Composition application such that it runs in two "modes": composition mode or display mode. In the "On Startup" script, check the value of the X_BOOKMARKID. If it is null, trigger composition mode, otherwise trigger display mode. In display mode, your application should hide all components outside of the bookmark panel by setting the visibility property to false or moving them off-screen by manipulating the margin properties accordingly. It should then use the following script method to load the bookmark:

Bookmark.PortableFragmentBookmark.loadBookmark(X_BOOKMARKID);

You can refer to the following blog post to understand how to setup URL parameters: Passing parameters as part of URL in SAP BO Design Studio 1.5

Regards,

Mustafa.

0

I think this is what I'm looking for. Thanks, Mustafa!

Krishna

1

Very good. Let me know how it works out for you.

0

It works great, thanks.

1

Thanks for the confirmation. I assume you resolved the BIP URL issue you previously mentioned?

0
Show more comments
Tammy Powlas
Jan 18, 2017 at 06:35 PM
0

Reading this SAP blog https://blogs.sap.com/2015/11/30/so-what-exactly-is-a-design-studio-bookmark-and-how-would-i-or-the-business-use-one/ it sounds like what you really want is a Fragment bookmark and not a portable fragment bookmark. Have you tried that?

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Yes, I've tried Fragment bookmarks too. Same issue; components outside of the container component that I selected using the saveBookmark function are being shown when I load the bookmark using the bookmark URL in my browser.

0

Could you share screen shots of how you are placing things - outline panel, design canvas, etc?

0

Above is a screenshot of the design space with chart axes redacted. On startup, the listbox will populate with bookmark IDs and bookmark URLs tied to the "ONLINE_COMP" group ID. Clicking the button creates a bookmark. Refreshing the application should show a new bookmark ID and URL added to the bottom of the list.

The screenshot above shows the result of running the application, clicking the button, then refreshing the page. "a02..." is the latest bookmark ID, and its URL is right beneath it.

The screenshot above is what I get when I visit the bookmark URL. The button was not in the panel selected by saveBookmark, so why is it here?

Finally, in the Online Composition template application, the bookmark appears correctly once dragged and dropped into the compose area. Why did it work here and not when visiting the URL?
0

I'm struggling at the moment with my sandbox connections to try to recreate; I hope the community can help. I will keep trying.

0

Thanks for trying, I appreciate it. If it helps, here's the script I have for the application on startup:

var all = Bookmark.PortableFragmentBookmark.getAllBookmarkInfos("ONLINE_COMP");
all.forEach(function(element, index){
LISTBOX_1.addItem(element.id,""+element.id);
LISTBOX_1.addItem(Bookmark.PortableFragmentBookmark.getBookmarkUrl(element.id),""+Bookmark.PortableFragmentBookmark.getBookmarkUrl(element.id));
});

It finds all the bookmarks with the group ID "ONLINE_COMP," then adds bookmark IDs and their corresponding URLs to the listbox. The bookmark URL I visited in the third screenshot from the top came from this list. As for troubles recreating, what trouble have you run into? Does the button not show up when you visit the URL it generates for you?

0

No, it is connecting to my own data sources - nothing you can do. Thank you for sharing your code.

0