on 2024 Feb 20 3:54 PM
Hi, I would like to add an icon to a RAP action label however I'm unable to find any documentation about this so I'm not sure if it's possible at all.
I'm implementing a Fiori App with RAP and CDS, in S4/HANA on premise 2022 (not using UI5). My goal is to add an icon to an action's label, for example a custom action defined in the Behavior Definition "copyTravel".
Would there be any annotation or text that would make this possible in the metadata extension?
Example:
@UI: { lineItem: [ { position: 10 },
{ type: #FOR_ACTION,
dataAction: 'copyTravel',
label: 'Copy Travel <ICON>' } ] }
OR
@UI: { lineItem: [ { position: 10 },
{ type: #FOR_ACTION,
dataAction: 'copyTravel',
label: 'Copy Travel',
imageURL: <ICON> } ] }
One additional question, is it possible in the on-premise release 2022 to change the standard create/update/delete action labels? (without creating new actions)
Thanks for your help
Request clarification before answering.
Hi,
In general, using clear labels should be preferred over icons since icons are prone to issues with incorrect interpretation (not all cultures have the same icon for an action!). Fiori elements OData V4 allows for icon support but only for inline buttons and only really standard icons should be used! You could check the V4 specific section "Rendering Buttons with Icon Instead of Text" in page for more information.
For the second part of the question, you should check the texts allowed for override in page. I see, for example, that we offer T_OP_OBJECT_PAGE_CREATE / T_OP_OBJECT_PAGE_SAVE for the standard Create/Save buttons in the object page footer.
Best Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for replying Sandeep. So if I understand correctly there is no way to add the icon via Fiori Elements annotations. Regarding the icon being prone to incorrect interpretation, that is a good point but I am converting an existing WebDynpro app which uses icons so I'm trying to replicate the buttons as much as possible.
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.