Skip to Content
0

Please tell me how to create a menu for the tree component using bookmarks

Mar 22, 2017 at 03:09 AM

142

avatar image

Hello. I am making an analysis application in DesignStudio 1.6. I am creating a menu by assigning a bookmark to the tree component. Then, when the user clicks on the menu, the contents of the bookmark are displayed. However, fragment bookmarks are user and application specific. Therefore, it is necessary to make as many bookmarks as the user. Portable Fragment Bookmarks can not be displayed without dragging and dropping. How can I assign a bookmark to a menu before the user creates a bookmark?

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

2 Answers

Mustafa Bensan Mar 22, 2017 at 03:59 AM
0

Hi Kousuke,

My comments and questions are as follows:

1) Can you clarify what you mean by "I am creating a menu by assigning a bookmark to the tree component"? Do you mean you are retrieving the Bookmark Folder Model with the getBookmarkFoldersTreeModel(includeBookmarksAsLeaves) method and then assigning this model to the Tree component using the setModel() method?

2) You cannot assign a bookmark before it is actually created. You will receive a Bookmark ID when you save a bookmark via scripting, after which you can manipulate that bookmark as desired;

3) If you want to consume Portable Fragment Bookmarks from a different application than the ones they were produced in then yes, you can only do this via the combination of the Fragment Gallery and Split Cell Container via drag and drop. However, you can always load Portable Fragment Bookmarks into the producer application without the need for the drag and drop approach.

Rather than focusing on just the "bookmark menu" can you provide some more context around the actual business scenario you are trying to implement, perhaps with some screenshots as well, so we can provide further guidance?

Regards,

Mustafa.

Share
10 |10000 characters needed characters left characters exceeded
kousuke sugiyama Mar 22, 2017 at 08:45 AM
0

Hello Bensan

I appreciate your comment.

1) You are right. I use getBookmarkFoldersTreeModel () and setModel ().

2) I understand.

3) I also know. Portable Fragment Bookmarks can be loaded by an application that saved bookmarks. When loading with different applications it is Drag & Drop.

The reason I want to make bookmarks earlier than the user makes. Because portable fragment bookmarks that users should see are decided. If I can not make a bookmark, my users have to drag and drop.

I tried it. When I saved fragment bookmarks, I was able to load from the different applications into the same container. Also, I was able to load even different accounts. I am not dragging and dropping. However, I need to know BookMarkID. I used the loadBookmark of Fragmentbookmark. I thought that fragment bookmarks are application and user-specific, but they seem to behave differently. Is this usage problematic?

Regards,

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

Hi Kousuke,

Some more questions for clarification:

1) What do you mean by "I was able to load from the different applications into the same container"? Do you mean that if the container names in all of the producer applications are the same then you were able to load into another app as long as the container name was the same as the other apps' container names?

2) Fragment Bookmarks are indeed application and user-specific. So what do you mean when you say "they seem to behave differently"?

3) When you say "The reason I want to make bookmarks earlier than the user makes. Because portable fragment bookmarks that users should see are decided.", what is the criteria/logic for determining which portable fragment bookmarks a user should see?

Regards,

Mustafa.

0

Hi Bensan

Thank you for replying.

1) That's right. I made a fragment bookmark and saved it. And I prepared and loaded the same container name in different applications. Then I got loaded to different applications. I need to know the BookmarkID before.

2) I thought that fragment bookmarks can not be loaded from other applications if it is user and application specific. But as I was able to load, I thought that the fragment component behaved differently.

3) It is the information the company has decided to see for the user. For example, sales, profits. If the user Drag & Drop portable fragment bookmark, the user may not see it.

Regards,

0

Hi Kousuke,

Please see my comments below:

1) That's right. I made a fragment bookmark and saved it. And I prepared and loaded the same container name in different applications. Then I got loaded to different applications. I need to know the BookmarkID before.

I assume here you mean Portable Fragment Bookmark and not just Fragment Bookmark? That's a very useful revelation that Portable Fragment Bookmarks can be loaded in different applications as long as the container name is the same. Regarding "I need to know the BookmarkID before", can't you retrieve the bookmark ID using Bookmark.PortableFragmentBookmark.getAllBookmarkInfos()?

2) I thought that fragment bookmarks can not be loaded from other applications if it is user and application specific. But as I was able to load, I thought that the fragment component behaved differently.

Again, I assume that here you mean Portable Fragment Bookmark and not just Fragment Bookmark? Because Fragment Bookmarks cannot be loaded across different applications, only Portable Fragment Bookmarks can.

3) It is the information the company has decided to see for the user. For example, sales, profits. If the user Drag & Drop portable fragment bookmark, the user may not see it.

Okay, so as I understand it, you want to determine whether or not the Portable Fragment Bookmark will actually contain data and if not, do not present it to the user as an option for loading. But in this case, how do you intend to "tag" the Portable Fragment Bookmark so you can identify whether it should be loaded for the particular user?

Regards,

Mustafa.

0

Hello Bensan

Sorry for the late reply today.

I think you know the template called Online Composition.

The template Drag & Drop portable fragment and save it as a fragment bookmark.

I saved bookmarks with User 2. I can not get User2 BookMarkInfo by login User1 and using the following function. Bookmark.FragmentBookmark.getAllBookmarkInfos ();

But I knew User2's bookmark ID.

Since User2 bookmarks are not displayed, I made Link User2_sample01.

Bookmark.FragmentBookmark.loadBookmark ("User2_sample01_BookmarkID");
Then I could display the bookmark of User 2.

I could load bookmarks even if the user is different.

This capture is the same application, but it could be done with a different application.

Fragments Bookmark are user and application specific. However, if I know the bookmark ID, I can load it.

I want to know how to use it correctly.

3)Users watch the same chart everyday. I enter many data every day.
That is, Charts change little by little every day.
So users share the same bookmark.
Simply clicking the tree menu, the user wants to see sales at each factory.

Regards,

0

Hi Kousuke,

Thanks for the further details. Your scenario is clearer now. The fact that you can load another user's portable bookmark if you know the Bookmark ID is probably similar conceptually to how Fragment Bookmarks can still be shared with other users via the Bookmark URL. However, since you are asking about correct usage, in your scenario you should be using only Portable Fragment Bookmarks and not Fragment Bookmarks.

As you have pointed out, Bookmark.FragmentBookmark.getAllBookmarkInfos() will only allow you to retrieve a list of bookmarks for the current user. This is why you should be using Bookmark.PortableFragmentBookmark.getAllBookMarkInfos() instead.

As for using the tree menu, you will be able to see all bookmarks within folders that the user has access to. However, you cannot explicitly control which bookmarks are visible under each folder node. Design Studio will display all bookmarks that the user has access to, assuming you have chosen to include bookmarks as leaves in the tree model.

When the user selects an bookmark from the tree menu you can then load that bookmark. From you comments earlier, my understanding is that you only want to display bookmarks in the tree menu for which the user is likely to see data. However, this level of control is not possible with the tree menu.

If you can provide further details of how you would like the tree menu selection to work I can try to make suggestions accordingly.

Regards,

Mustafa.

0

Hi Bensan,

I was able to load fragment bookmarks when users are different. That's not all. I was able to load bookmarks into different applications as long as they have the same container name.

I tried the same thing with Portable Fragment Bookmark. However, it was not possible with portable fragment bookmarks. The reason is that APPID is different. A message was displayed on the screen.

As far as I've tried, portable fragment bookmarks can not be loaded by a different application unless the user uses Drag & Drop.

However, fragment bookmarks can be loaded without Drag & Drop even for different applications.If users are different and applications are different, it is correct to use Portable Fragment Bookmarks, right? Using fragment bookmarks is wrong, right?

Now using fragment bookmarks can realize what I expect but I'm worried about future API modifications.

I would like to load bookmarks without using Drag & Drop. Users are different and applications are different.

I actually loaded fragment bookmarks with different applications, so I thought how to use it correctly, but it seems to be wrong.

I will think about displaying bookmarks in Tree after this problem.

Regards,

0