cancel
Showing results for 
Search instead for 
Did you mean: 

Add a Persaonas button dynamically

bwills
Contributor
0 Kudos

Hello,

Does anyone know if it is possible to add Personas buttons to a screen dynamically via scripting? Something like session.utils.button.add() or something like that? I want to provide some dynamic functionality to my users. I know I can add all the buttons I want and then hide and show them as necessary.

If not, perhaps the SAP Screen Personas team can look at this type of functionality for future releases (i.e. adding various objects dynamically such as buttons, labels, combo boxes, text fields, etc).

Cheers,

Brian

Accepted Solutions (1)

Accepted Solutions (1)

Ritz
Active Contributor
0 Kudos

bwills,

The only possible and working solution i know is to create button and hide /unhide based upon screen logic.

For a user it will work same way even if its added by virtue of adding it through "session.utils.button.add()" or adding on screen and using on screen event.

Thanks

RD

bwills
Contributor

HI Ritesh,

That is what I thought too. I have created some logic to show and hide buttons. I appreciate your input!

Perhaps peter.spielvogel can add this one to future releases?

Thanks,

Brian

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

As Ritesh suggested, you can achieve the effect you are looking for by scripting, either by individual hiding / unhiding of controls or if you need to do this with many objects, then via viewports for better performance.

Personas is not intended to create objects on the screen dynamically, so I don't foresee that the suggested feature would be added.

Ritz
Active Contributor
0 Kudos

Hi Tamas Hoznek,

could you please share what is the option you mention as below, any link or example may help how to use viewports.

if you need to do this with many objects, then via viewports for better performance.

Thanks

RD

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

ritesh.dube, to learn about viewports, you can refer to the following resources:

Unit 4: Building Wizards with Viewports | Building Mobile Applications (sap.com)
https://www.youtube.com/watch?v=zK2mACslF7Q

One reason to use this technique is that making dynamic changes via script to many controls will have a performance penalty, compared to taking advantage of viewports instead.

Answers (0)