openui5 | OpenUI5 lets you build enterprise
kandi X-RAY | openui5 Summary
kandi X-RAY | openui5 Summary
OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of openui5
openui5 Key Features
openui5 Examples and Code Snippets
Community Discussions
Trending Discussions on openui5
QUESTION
Given an ES Module dictionaryAPI.mjs
:
ANSWER
Answered 2021-Oct-17 at 07:50UI5 uses by default UMD import syntax (sap.ui.define
, sap.ui.require
). To make it understand other module types you have to 'trick' it into thinking that the module is UMD.
This can be accomplished by using the ui5 cli.
You have to build a proper folder structure (package.json, ui5.yaml, webapp folder) and in the ui5.yaml file you can define project shims for the corresponding ES modules.
A cheap and hacky alternative would be to include the ES modules trough
QUESTION
To ensure sap.ui.core.UIComponent
to be created fully asynchronously, we need to implement the IAsyncContentCreation
interface:
ANSWER
Answered 2021-Oct-27 at 21:24I've tried to check the content of
library
in DevTools, but I get aReferenceError
exception.
Most probably, you've encountered the V8's debugger limitation, where the unused closure variables (here: library
) are not evaluated by the V8 during the debugger session, and thus not accessible from the devtool console. See Why does Chrome debugger think closed local variable is undefined? and also the V8 issues #3491
and #2710
.
The above limitation applies only to V8's debugger. When the code is executed at runtime, library.IAsyncContentCreation
will be resolved to the string "sap.ui.core.IAsyncContentCreation"
as expected so you won't get the ReferenceError
.
Exploring the SAP apps samples, [...] interface name is replaced with code.
It's unclear why the sample author decided to require the core library in the first place. Those interfaces
in UI5 Objects await string literals. And UI5 interfaces are simple marker interfaces (aka. tagging interfaces). They don't specify any behavior in code. Adding the interface name (string literal) simply tells how the class implementing the interface is supposed to behave. So adding the string literal is sufficient.
QUESTION
As far as I know, UI5 determines the wanted localization based on browser's HTTP header accept-language
with respect of supportedLocales
and fallbackLocale
values of the manifest.json
app descriptor.
In my case, however, initially user sees an authorization dialog in English and after authorization I would like set an app localization based on a user config, loaded upon successful authorization.
Based on Language switch in SAPUI5, I've tried to apply:
...ANSWER
Answered 2021-Sep-18 at 06:06I'm not sure if this can be done without a reload.
For modern browsers, you can use this code to change the URL:
QUESTION
Edit:
Bug report Bug Report on github
Situation:
I am writing an app with the ObjectPageLayout.
In the header content I have a sap.m.Select and a sap.m.MultiComboBox with a reset button each.
I want to have them in the header, since they filter all Diagramms and Tabels of the diffrent tabs.
I set my css class as it is discribed in the Workthrough.
When the style is set to compact mode due to the device type everything is fine.
Problem:
When the css class is cozy the select still has the compact style.
The MultiComboBox and buttons and everything else take the cozy style.
--> it looks really bad
Does anyone have an idea, why the select doesn't have the cozy style aswell?
I even tryed hard setting the css style in the XML, but it doesn't work. If I change the css class of the MultiComboBox or the buttons it works, but I dont want to always have everything on compact just because the select cannot go on cozy...
To replicate the problem you can just create a new project (UI5 Version 1.71) in the webide and replace the view with mine:
...ANSWER
Answered 2021-Sep-17 at 06:36To fix the width of the Select
you can add the aggregation layoutData
QUESTION
UI5 bootstrapper has two parameters, which are responsible for the way UI5 loads the libs:
data-sap-ui-async
data-sap-ui-xx-nosync
In a case of data-sap-ui-async="true"
everything is clear:
The most important setting is
data-sap-ui-async="true"
. This enables the runtime to load all the modules and preload files for all declared libraries asynchronously, if an asynchronous API is used. Settingasync=true
leverages the browser's capabilities to execute multiple requests in parallel, without blocking the UI thread.
I know that data-sap-ui-xx-nosync="warn"
allows identifying synchronously loaded libs.
But what are the benefits of using data-sap-ui-xx-nosync="true"
?
ANSWER
Answered 2021-Aug-06 at 14:26As described in Configuration Options and URL Parameters, data-sap-ui-xx-nosync="true"
thorws a new Error
instead of a simple log.
When set to
warn
, any use of synchronous XHRs will be reported with a warning in the console. When set totrue
, such calls will cause an error.
What happens with the Error
depends on the caller and the application code. In some cases, such errors can break the app. See this plunk for example. With true
, the custom JS file cannot be loaded.
What are the benefits of using
data-sap-ui-xx-nosync="true"
?
Since true
throws an actual error instance, you might want to react to such events with e.g. window.addEventListener("error", fn)
. Might be useful for regression tests.
QUESTION
According to the Use Stable IDs article, it is recommended to use stable IDs for the UI5 elements. At the same time, I've reviewed multiple samples of sap.tnt.NavigationListItem
implementation and I've paid attention that in case of sap.tnt.NavigationListItem
no id
is used but key
, e.g.:
ANSWER
Answered 2021-Jul-07 at 11:04Based on your comments, I made a small example.
- If your items are hard-coded definitely go for the
key
in the XML definition. - If your items come over a model. You can do the same as everywhere else. Use the data to trigger the right action.
Use the ID
if you need to identify the UI element e.g. buttons in a test or if you add User Assistance Help.
QUESTION
I'm trying to create a base controller that has common methods and common onInit
logic.
Using the extend
method adds the methods from the base controller to the child controller, but the lifecycle methods get overwritten completely.
- I tried using the
override.onInit
approach shown on this documentation page but it did not work. - I also tried with
sap.ui.component
like this but I couldn't get it to work at all.
I'm not sure if it should work with the AMD syntax.
As far as I understood, the extension feature should replace common methods that have been overridden, but it should execute the lifecycle methods from both the base and extension controller on this respective order.
So my question are the following:
- Is this behavior possible to achieve? If so, what am I doing wrong?
- Is there a better way to implement it?
Example code:
Parent controller
...ANSWER
Answered 2021-Jun-13 at 10:38I didn't know there is an override mechanise in UI5 and it looks over-engineered... My guess is you are on an older version without proper support.
Anyhow, js-inheritance works out of the box. You need to call "super".
QUESTION
I have a master and a detail view. In the master view, you can switch between pages. Everything works fine. However, when you change from Projects to Contact / Impress (or vice versa), the icons of the three first feed list items are not updated, although the property correctly changes. I am sure that this worked with an earlier version. What am I doing wrong?
Code of the page:
...ANSWER
Answered 2021-Jun-08 at 13:19Thanks for letting us know. I just created a bunch of issues related to the sap.m.FeedListItem
on GitHub ([1], [2], [3]).
Since most of the mentioned bugs are caused by the commit 454a41c
, which came with UI5 v1.88, remaining at one of the lower versions supported by OpenUI5 or SAPUI5 could be a temporary solution until the fixes are available.
Update: the fixes are now merged with the master branch and will be available in the upcoming UI5 version 1.92 and patch releases for older versions.
QUESTION
I have a SAPUI5 application and want to open a link if I click on a button.
I get the value of the specific link from an OData call and a normal control is working fine with the remote data path.
ANSWER
Answered 2021-Apr-04 at 11:46QUESTION
I'm new in SAP OpenUI5, I need an Explanation or tutorial that shows session management like user login and user log out in a standalone OpenUi5, but I cannot find any. If somebody knows, please share. Thank you
...ANSWER
Answered 2021-Mar-19 at 14:28Session handling, authorization handling, or encryption are not part of OpenUI5 and need to be handled by the server-side.
Unfortunately, there is no easy way to complement OpenUI5 with a matching opensource backend for secure Odata V2, which significantly limits OpenUI5's wider usage. There is hope it will change with the OpenUI5's Odata V4 adoptions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install openui5
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page