How to use the ABAP namespace /ABC/ in the custom SAPUI5 application? - namespaces

I am new to the SAPUi5 things. I am developing a custom Fiori application using using SAP Web IDE. I Manually deploy the application to the system using report /UI5/UI5_REPOSITORY_LOAD.
Initially I used the project name in the Web IDE with name 'ZAPP' and gave the same name while deploying the app to ABAP system. Everything worked fine.
Now, I have a requirement where I need to use the namespace in the project name e.g. '/ABC/APP'. How do I achieve this?
PS: I have tried deploying the ZAPP and replaced all the occurrences of 'ZAPP' with '/ABC/APP', but it gives me a following error:
Uncaught Error: The provided argument '/ABC/APP' may not start with a slash
at toUrl (ui5loader-dbg.js:1994:10)
at r.toUrl (ui5loader-dbg.js:1979:11)
at e._applyManifest (ComponentMetadata-dbg.js:173:13)
at e.getManifestObject (ComponentMetadata-dbg.js:315:5)
at e.init (ComponentMetadata-dbg.js:192:4)
at p._initCompositeSupport (Component-dbg.js:626:4)
at ManagedObject-dbg.js:534:11
at f.constructor (ManagedObject-dbg.js:558:4)
at f.constructor (Component-dbg.js:293:17)
at f.constructor (UIComponent-dbg.js:81:14)
Any help in this regard would be really appreated :-)

Related

Something like IConfigurationRoot.GetDebugView but for .Net Framework?

Im trying to get a definition of our AppSettings and ConnectionStrings.
I would like to be able to "fetch" the following:
Key (Name of setting)
Value (The value of the setting)
Provider/builder (From which provider the setting were "picked from", since we use configuraiton builders, such as the UserSecrets and Environment config builders).
The problem is that the application that "requires" this is using ASP.net 4.8.
If this would have been ASP.net core 3+, I could simply use IConfigurationRoot.GetDebugView, or well.. I could simply have a look at the source code of that method and recreate what I need.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationrootextensions.getdebugview?view=dotnet-plat-ext-6.0
https://andrewlock.net/debugging-configuration-values-in-aspnetcore/
But I cant find anything simulair in .Net Framework.
I have tried to find a way to eaither get all Config Builders and then use the keys from ConfigurationManager.AppSettings.AllKeys and ConfigurationManager.ConnectionStrings.AllKeys
and then for each ConfigBuilder call their GetValue-methods which takes a key.. this could work, but Im still unable to get all my configured Configuration Builders. Any ideas?

Library class doesn't know of ConfigureWebHostDefaults extension method

I'm building a suite of REST micro-services using .Net Core 3.0 Preview 6. All these services will have the same start up logic. So, I'm trying to place all the code in a .Net Standard library.
The goal is to have the IHostBuilder:CreateHostBuilder method, as well as the Startup:Configure and Startup:ConfigureServices class and methods in the library. The library will also contain error handling logic, customized http response messages, etc.
However, I can't seem to find the correct package that contains the ConfigureWebHostDefaults method. I tried adding the Microsoft.AspNetCore package 2.2.0, but that didn't resolve the issue.
I added the Microsoft.Extensions.Hosting (3.0.0-preview-6) package, that also doesn't resolve the issue.
Is what I'm attempting even possible?
Thanks
-marc
I resolved it, not the best way, but it works. I decided to make the library targeted specifically for .NET Core 3.0. So, I changed the targetframework in the project file. That change automatically resolved my other issue.
Import the Microsoft.AspNetCore package, and use WebHost.CreateDefaultBuilder() instead. According to the code it is built from, both CreateDefaultBuilder() and ConfigureWebHostDefaults() call the same internal method: ConfigureWebDefaults().
The only downside of this is that the returned host will be an IWebHost instead of an IHost.

Can the ConfigurationAPI in Liferay DXP be used for Plugin sdk portlet?

I have followed given 2 tutorials to use COnfigurationAPI in a Liferay dxp plugins SDK portlet built using Ant/Ivy.
COnfiguration API 1
COnfiguration API 2.
Below is the configuration class used:
package com.preferences.interfaces;
import com.liferay.portal.configuration.metatype.annotations.ExtendedObjectClassDefinition;
import aQute.bnd.annotation.metatype.Meta;
#ExtendedObjectClassDefinition(
category = "preferences",
scope = ExtendedObjectClassDefinition.Scope.GROUP
)
#Meta.OCD(
id = "com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration",
name = "UnsupportedBrowser.group.service.configuration.name"
)
public interface UnsupportedBrowserGroupServiceConfiguration {
#Meta.AD(deflt = "", required = false)
public String displayStyle();
#Meta.AD(deflt = "0", required = false)
public long displayStyleGroupId(long defaultDisplayStyleGroupId);
}
Post following the steps,I am getting the below error:
ERROR [CM Configuration Updater (ManagedService Update: pid=[com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration])][org_apache_felix_configadmin:97] [org.osgi.service.cm.ManagedService, id=7082, bundle=297//com.liferay.portal.configuration.settings-2.0.15.jar?lpkgPath=C:\dev\Liferay\osgi\marketplace\Liferay Foundation.lpkg]: Unexpected problem updating configuration com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration {org.osgi.service.cm.ConfigurationAdmin}={service.vendor=Apache Software Foundation, service.pid=org.apache.felix.cm.ConfigurationAdmin, service.description=Configuration Admin Service Specification 1.2 Implementation, service.id=56, service.bundleid=643, service.scope=bundle}
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
So,does this process need a osgi module as mandatory or can we do it using plusings sdk portlet built using ant as well?
Without disecting the error message Caused by: java.lang.IllegalArgumentException: wrong number of arguments:
The way you build your plugin (Ant, Maven, Gradle, manually) doesn't make a difference, as long as you build a plugin that will be understood by the runtime. aQute.bnd.annotation.metatype.Meta points firmly into the OSGi world, and makes it almost certain that you'll need an OSGi module. You can build this with Ant, of course. Even in Ant you can embed tools like bnd, or you can write the proper Manifest.mf to include in your module manually (just kidding - you don't want to do it manually, but it would work).
Recommendation: Instead of moving everything over: Try to reproduce this with a minimal example in gradle or better Liferay Workspace (which is gradle based), just to get all the automatic wiring in. Check if it makes a difference and compare the generated output from your Ant build process with the workspace output. Pay specific attention to the Manifest.
In order to build the proper Manifest, you want to use bnd - if the Manifest turns out to be your issue: Find a way to embrace bnd - if that's by saying goodby to Ant, or by tweaking your build script remains your decision.

How to navigate between pages in windows universal app using C++/CX

I am new to Windows universal app development. As per my knowledge Windows universal app can be made by using C++/CX , C# or JavaScript. But Microsoft force to do development by using C++/CX because it uses power of winRT much better than others. So i tried the development using C++/CX for Visual Studio 2015.
I come to a topic of Navigation. To perform navigation in app there is one API
this->Frame->Navigate(TypeName(MySecondPage::typeid)). This API gives me a exception at runtime.
This is the detail scenario what i did.
1. I create project by named NavigationSample using C++/CX.
Then i added new Basic Page of xaml for my Second view/ui and named it as MySecondPage.xaml
Now on first page i.e. MainPage.xaml i added One button.
On event of this button , lets say button_Click as event handler i wrote
this->Frame->Navigate(TypeName(MySecondPage::typeid))
Here is the detailed code:
void NavigationSample::MainPage::button_Click(**Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)**
{
this->Frame->Navigate(TypeName(MySecondPage::typeid));
}
This compile and build fine. But gives exception at runtime. (Same scenario works very fine with C#)
So guys please help me how to resolve this issue?
Thanks
Here's a clue:
m_ptrSettingsPage->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this]() {
m_ptrSettingsPage->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(AnnuitiesPage::typeid));
}));
Best wait for C++/wimRT

Sonar Unit tests report parameter - sonar.junit.reportPath vs sonar.java.junit.reportPath

I found that my Sonar instance 5.1 or 5.1.1 (with latest sonar-runner 2.x) stopped showing part of the Unit test info (Unit test widget) on the project's dashboard.
The properties I had were (in Gradle's sonarRunner > sonarProperties section):
property "sonar.junit.reportsPath", "build/test-results/UT"
property "sonar.surefire.reportsPath", "build/test-results/UT"
To fix it, I had to include the following properties as well:
property "sonar.java.junit.reportsPath", "build/test-results/UT"
property "sonar.java.surefire.reportsPath", "build/test-results/UT"
Just FYI: All my Unit tests reports go under build/test-results/UT folder, all Integration Tests result files go unedr build/test-results/IT folder and etc.
I'm wondering if this is due to Gradle version that I'm using (2.3) or is it due to a later version of SonarQube (4.5+) as I have both SQ 5.1 and 5.1.1 instance.
I know SonarQube team started Multi language support since SonarQube version 4.12
Since SonarQube 4.2, it is possible to run an analysis on a multi-language project.
Now, it raises a question. For Getting the same Unit test info for Groovy based projects, do I need to use:
property "sonar.groovy.junit.reportsPath", "build/test-results/UT"
property "sonar.groovy.surefire.reportsPath", "build/test-results/UT"
something like that if my project has Groovy code instead of java?
Searching "**sonar.java.junit.reportPath"** with using double quotes shows No results found in Google and it forces me to try and see google results if I can run the search again without using " double quotes (for this property).
Doing the same in SonarQube site "search box" shows:
No results found for sonar.java.junit.reportPath. Please try one of the following suggestions:
Though in Gradle, inside
sonarRunner task {
.. inside ..
sonarProperties {
... section ... where I define various sonar props..
}
...
}
I can define both sonar.junit.reportPath, sonar.java.junit.reportPath and similarly, sonar.surefire.reporPath and sonar.java.surefire.reportPath and while running sonarRunner task in Gradle, it doesn't error out. Thus it makes me believe that the property variables are valid.
There are also issues with running sonarRunner or stand alone sonar-runner command for a mixed Java and Groovy based project (i.e. source code in Java but tests in Groovy). Setting sonar.language=java,grvy didn't help. I posted this question on stackoverflow but so far I have no perfect result/answer on how to get a full fledged sonar dashboard up and running for a Groovy projects like I get for a Java project.
Groovy project - Sonar - Publish project and Unit + Integration Test code coverage data
PS: I have tried various values for setting sonar.. variables (as far a sonar source, tests, etc, etc properties are concerned, which they have mentioned on their site's docs section)
The only valid property to use as of now is sonar.junit.reportsPath which will tell the java sonarqube plugin where to import your result of unit tests.
For groovy, this is work in progress, see : http://jira.sonarsource.com/browse/SONARGROOV-2
All the other properties you mentioned do not exist and are not taken into account.