Skip to Content

Tags for UI elements / How to create a dynmic menu

Hi everybody

We currently do a lot with WD and are building a huge framework. this means that we mostly using dynamic programming for the ui but also for contexts an so on.

Known from other architectures (e.g. java swing, android sdk) every ui element supports an attribute "tag" with a generic type (normally type object). Here you can store additional information for each ui element. WD for ABAP has no such additional attribute, we can use for own purposes.

I'd like to define some popup menu for trays at runtime, but i just want to have one menu action. in this menu action handler i'd like to have a switch/case statement for the corresponding functions. At this point the only information i have is the ID, but what i need is something like a functioncode, i'd like to store anywhere in the action item using such a "tag". I cannot use the ID for my switch/case because the id is generated at runtime an i cannot use the functioncode as ID, because the functioncode can be used in severel menus and the id would not be unique.

Since im used to work with such tags (escpecially for action handler), i get restricted a lot when working with WD and dynamic ui generation.

How do you handle that?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2010 at 02:01 PM

    Dear Fab,

    I may not be 100% accurate with the solution, but each method or action handler has a default parameter called "WDEVENT". From this parameter you can get the details of the actions being performed during the runtime, as you said, the Function Code could be the NAME attribute of WDEVENT parameter.

    Please check the same, else, if you get to know the answer please do suggest me the same.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.