on 04-12-2010 7:18 PM
Hi there,
I am displaying PDF document names in a Web Dynpro Tree and I would like to have a functionality that the user can start the PDF viewer or delete the document. So I need some kind of button or menu or something like that.
I tried it with the UI Element "menu" which can be used exactly for this kind of problem according to [SAP Documentation|http://help.sap.com/SAPHELP_NW70/helpdata/EN/37/978b411fb4b05fe10000000a1550b0/frameset.htm], but it would not become visible in my WD application.
To open the PDF viewer it would also be very usable to doublecklick on the node. Is there a doubleclick event in WD? I would not want to us ON_ACTION event since one click should not open the viewer.....
I would be glad to try any other suggestions regarding this issue!
Thank you very much!
Christina
Hi Christina,
to your original point...
Check that you had set the ContextMenuId to the menu that you defined for the tree item type. And also (not so obvious) ensure that you set ContextMenuBehaviour to "Provide" for the tree item type.
You should then be able to bring up your menus... but that's still 2 clicks not one!
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
you are right: still 2 clicks Still it would be my favorite solution.
I have to admit that I had not set either the contextmenuID or the behaviour. I changed that now, but the menu still doesn't show up. Since you were talking tree ITEM type: Does it matter if I have an item type or node type? I tried both but it doesn't work.
ContextmenuID means name of the menu, right?
Thanks,
Christina
HI Christina,
Yes the contextMenuId should be the name of the menu.
I'm not sure (away from system at the moment) if it is case sensitive, but ensure that it exactly matches your top level menu name ( you then configure the menu options under this).
I had both the tree item type and the node it came from set as provide context menus.
There was no obvious marker on the node that a menu existed but right clicking on the text of the node caused the menus to show.
I was playing with a 7.01 system...
I also found I didn't have to use a context menu that was defined in the tree - I could just as easily use one defined in the context menu area (actually in might be worth trying to define one here and using it in your tree - perhaps there is some requirement that something must be defined there).
Hope you have luck.
Cheers,
Chris
Hi Chris,
when defining a menu in the context menu area and using it in the tree it works! Thanks a lot!
Maybe one last question: The documentation says, that if a context menu is assigned you see a little triangle on the right lower corner of the tree node, so that the user would know that there is a context menu available. Do you know by any chance if I can configure that anywhere? because it is not shown with me....
Thank you all again for your help!
Regards,
Christina
Hi Christina,
if instead of using a tree you used a hierarchical table, you could have all these functions as buttons/action links, etc in new columns against the various entries - then you could have your one click functionality.
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW: not there is a forum dedicated to ABAP WebDynpro. Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
thanks for your reply!
Yes, you are right, I could add the buttons "delete" and "show" beneath the tree and then the selected tree node could be determined via lead selection. I actually haven't thought of this "simple" way before so thank you!
But originally I wanted something that can be basically done in "one click" and which visually is directly connected to the particular tree node. Since now I would have three buttons beneath the tree: Assign (which is already there), delete and show.
Assign would be the main functionality so it would be good, if it was visually seperated from the other two...
But anyway, as for now, I will do the button way. Any other possibilities?
Cheers,
Christina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi christina,
There is no double click event provided in web dynpros, but as far as your requrement
you can add a button on the view itself and add an event to the button in which you have to write
the the logic that is used to open the form.
go to se80 and open package name SWDP_DEMO, there some example WDP are demonstrated.
Regards and Best wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
26 | |
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.