Your Privacy
We use cookies to give you a better experience in BlueWorx
You can learn more about what kind of cookies we use, why, and how from our Privacy Policy. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings in our cookie banner to change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. For more details, check out our Privacy Policy link below.
Strictly Necessary Cookies
These cookies are necessary for the website to function and cannot be switched off in our systems, but do not store any person information. They are usually set in response to your actions that triggers a request for services, such as setting your privacy preferences, logging in or filling forms. You can change your browser settings to alert you about these cookies, but some parts of the Website may not work.
View Cookies
Issue
With UI5 1.71 some search fields do not render correctly. They are missing the background colour, the border, and the delete icon.
The image below shows the issue, with a hard to see "Type of Filter..." area under the tab bar. The following image shows the search field when it is rendered correctly.
The image below shows the search bar rendered correctly.
The same search bar with UI5 1.108 and Horizon theme (as delivered with Neptune DXP22) is shown in the image below. The Horizon theme set's editable fields with a grey background in it's light theme.
The screenshots show the issue with UI5 1.71, a UI5 1.71 screen without the issue, and the issue having been resolved with UI5 1.108 and the Horizon Theme.
Resolution
There are some posts on Neptune forums highlighting this issue, noting that it can be resolved by issuing a JavaScript command to re-display (rerender) the search field. Performing that step produces the correct search field as shown in the second UI5 1.71 image. Performing this on every search field, in every app, with the correct timing (after the right navigation event) is code intensive and would be obsolete on migration to DXP22 with UI5 1.108 and the Horizon theme.
Interestingly the display issue couldn't be resolved with style changes as the base content is different when in is displayed incorrectly.
To resolve, we propose a Neptune DXP Launchpad Enhancement Point. The Enhancement is created in the Neptune Cockpit and then assigned to your Desktop Launchpad(s) and your Mobile Client(s) using UI5 1.71. The Enhancement would be removed on upgrade to DXP22 with UI5 1.108 and the Horizon theme. Depending on your environment the Enhancement could be made directly in your production environment, although for a Mobile Client and app re-build is required as the Enhancement is baked into the static code used to make the mobile application.
In the Enhancement, at the After Startup spot, a new Search Field control is created which performs a double render. The new Search Field control then replaces the standard sap.m.SearchField control so that all applications launched from an enhanced Launchpad will use the double render Search Field.
Create the Launchpad Enhancement
console.log("After Startup"); if (typeof sap.m.SearchField.prototype.getZInvalidate !== "function" && typeof sap.ui.core.Configuration.getTheme !== "function") { sap.m.SearchField.extend("DoubleRenderSearchField", { metadata: { properties: { zInvalidate: { type: "boolean", defaultValue: true } } }, renderer: function(oRm, oControl) { var value; sap.m.SearchFieldRenderer.render(oRm, oControl); value = oControl.getZInvalidate(); oControl.setZInvalidate(!value); if (value) { setTimeout(function() { oControl.invalidate(); }, 0); } } }); sap.m.SearchField = DoubleRenderSearchField; }Add the Enhancement to a LaunchPad / Mobile Client
The next step is to add the Enhancement to a Launchpad or Mobile Client. If you are doing this in your production environment you'll want to create a new test launchpad. Remember that this enhancement will act on all apps launched from the enhanced Launchpad so check all apps that use the sap.m.SearchField control.
1 Votes
0 Comments
Login or Sign up to post a comment