on ‎2021 Mar 19 2:37 PM
Request clarification before answering.
I solved it by adding this to my Component.js:
$('body').on('click', 'a', (e) => e.target.target = '_blank');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The annotation 'datefieldwithurl' doesnt have an inbuilt property to force a new browser page. There are two ways you can achieve this.
1. If using annotations, return the 'url' like this-> |javascript:void( window.open('| && |{ url }| && |') )|
adding the javascript function to the final url will force the browser to open a new page.
2. If not using annotation, add an 'onclick' or 'onpress' event and then use 'sap.m.URLHelper.redirect(url, true)' in the handler
Thanks,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your inputs, Rahul.
I finally used annotations but attached link operation to that field.
Hello Rahul, @rahullohia
I have a list card in overview page, where in i have some quicklinks for the apps. I want to open the app in new tab upon clicking the link. I tried the code with the annotation , however it didn't work. This is how my annotation looks like:
Gopal,
Please add attachPress to your field ID. This will make your field clickable. You can find this ID in Elements tab in Developer Tools.
Attach a function from where you can launch the URL in a separate window: yourField.attachPress(this.yourNewFunction).
I added the above in the onInit method of the Extension Controller.
Hope this helps.
Javier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Javier,
Good to know that you found a solution.
I kindly request you to provide a feedback to Fiori guideline with details of your use case so they consider the same in future.
Regards,
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Javier,
DataFieldWithUrl as per the UI Vocabulary doesn't offer this capability. That is also aligned with the Fiori design principles for navigation. You can take a look at the design principal here. The introduction section itself describe the following
Navigation in SAP Fiori follows standard navigation paradigms of various web applications. When a user navigates to a new screen, the user’s system default navigation is in place. Depending on individual browser settings and functionality, new screens can also be opened in a new tab or window by using a long tap or right-click (using a mouse)
Hope this answers why do you see this annotation capability. I would strongly recommend you to keep your application aligned to the Fiori design guideline so that end users have a consistent user experience through out.
Regards,
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.