cancel
Showing results for 
Search instead for 
Did you mean: 

bsp-extension for (context) menu?

Martin-S
Employee
Employee
0 Kudos

Hi,

how can I display a context menu when the user clicks

- right somewhere on the page, or

- left on an icon, link, ...

I didn't find a bsp-extension for that. But I think this would be a nice feature to provide a set of actions for the user to choose from dependend on the object he clicks on.

Because a menu item will often occur several times on a page, it 's not very efficient to define it whereever it is used. Instead there should be some definition part and a possibility to reference the menu at the object/link/icon/... where it should appear.

Regards, Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Hallo Martin,

First the bad news, so that I can be sure you did read it!

(*) The new PHTMLB library *only* works in DESIGN2003 mode

(*) It is *only* actively supported from SP30 onwards. (Although already available in SP29, which should be shipping now.)

So if you should have a development system at SP29 level, you can look at BSP application SBSPEXT_PHTMLB for some ideas.

The exact coding you would be interested in, would be about as follow:

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<%@extension name="xhtmlb" prefix="xhtmlb" %>

<%@extension name="phtmlb" prefix="phtmlb" %>

<htmlb:content design="DESIGN2003" >

  <htmlb:page title="Test of " >

    <htmlb:form>

      <phtmlb:popupMenu id="myPopupMenu" >

        <phtmlb:popupMenuItem menuItemId = "m1"

                              text = "Item 1" />

        <phtmlb:popupMenuItem menuItemId = "m2"

                              text = "Item 2"

                              canCheck = "TRUE"

                              checked = "TRUE" />

        <phtmlb:popupMenuItem menuItemId = "m3"

                              text = "Item 3" />

      </phtmlb:popupMenu>

      <phtmlb:popupTrigger isInteractive = "true"

                           popupMenuId = "myPopupMenu" >

        <htmlb:textView text="show popup menu" />

      </phtmlb:popupTrigger>

    </htmlb:form>

  </htmlb:page>

</htmlb:content>

regards, brian