openui5 navigation between components - sapui5

I just want to use a login component, that handle the process for login, signin and recover password. I want to reuse this component in different openui5 applications.
What I cannot understand is how can I change from one component to another. I mean, once I authenticate in my login compomnent, and a controller validate authenticate the user, how can I change to another openui5 component.
I was trying to understand CrossApplicationNavigation in the AppNavSample but I cannot understand it. https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ushell/demoapps/AppNavSample/localMinimalRenderer.html
Any ideas?

Do you mean SAPUI5 rather than OpenUI5? The control (and SDK) you reference is the Unified shell (ushell), which is a component of SAPUI5 only.
This control is the "Launchpad" for the SAP Fiori apps and is built from metadata of associated user roles from the backend SAP system which is why it is only part of SAPUI5 not OpenUI5.
If you do mean you want to use the Launchpad and are developing on a SAP system, you can find the documentation about "Cross-app navigation" here - http://help.sap.com/saphelp_uiaddon10/helpdata/en/09/4d968eb7c442208303427e82da92c9/content.htm?frameset=/en/09/4d968eb7c442208303427e82da92c9/frameset.htm&current_toc=/en/e4/843b8c3d05411c83f58033bac7f072/plain.htm&node_id=187&show_children=true#jump187.
However, your example - a login form, then the main application - suggests this is actually not what you want to do and instead you want to navigate in within specific views of an app. Check out this tutorial in the OpenUI5 documentation on "Navigation and Routing" - https://openui5.hana.ondemand.com/#docs/guide/1b6dcd39a6a74f528b27ddb22f15af0d.html
Further, your example of login + app actually sounds like it might need to be handled outside of UI5 itself on the specific backend/application/web server that you are developing against. UI5 can provide the appropriate frontend though.

Related

Looking for advice & direction from an existing web based MVC EF Login Authorisation; to authorisation for an additional new Maui based project

I have a complete working application that is Web based on AspNetCore.
I used the Identity.EntityFramworkCore to provide all the login and user registration on a central SQL database.
Everything is fine and working great.
But now the quandary starts. I am progressing onto the development of supporting apps for android, ios etc.
I am developing these apps using Microsofts Maui.
My thoughts are to write all the http CRUD API’s in the main ASPCore web application.
Then the Maui apps will call these API CRUD operations.
But my quandary arises with user management.
What the best way forward to have for a common User Authorisation access across all solutions. Bearing in mind the current web based Asp EF solution is there and working?
I’ve researched but can’t decide the best solution going forward: -
Using the existing SQL database & provide Authorisation through API’s on web asp application.
Using Active Directory of Azure.
Transferring everything to 3rd party provider such as “okta, OneLogin, etc”
What’s your thoughts for best practice going forward?
I am currently on the same path. Take a look at
TokenServerAuthenticationStateProvider in MAUI app
Basically I added an API controller (UserController) to my Server app that checks for username and password in SQL database and generates JWT token that I use for MAUI app login and also for authentication on Server APIs.
I use claims in token to pass User variables that I use in MAUI to display or hide some forms or controls. Like Roles but much more flexible.
For me it was the best path as I didn't have to change anything in my working web project.

How to read SAP Cloud Platform User-Provided Variables from a SAPUI5 app?

I was looking for a way to read the User-Provided Variables using JavaScript from a SAPUI5 app.
I've seen examples for node.js and Java, but those don't apply to a SAPUI5 app.
The node.js "version" requires a #sap/xsenv package that unfortunately I don't seem to be able to include in my app.
I'd like to read those variables from a SAPUI5 controller.
Has anyone done that before?
You need to write an action on your backend application.
And this action needs to read environment variables from directly app or via using CF API and must return that to you as response.
You should not read directly anything using CF credentials in a frontend application.

Try to use variants and table personalisation on SAPUI5 SmartTable

I want to use the variants to customise different filter and table variants on a SAP Fiori application, that use SAP Hana Cloud and Java backend.
As a background info:
I'm using a smartTable that is connected to the smartFilter by filterId property. On the table/filter I am able to access directly the data from the metadata by filing the entitySet / entityType property. I am using a real server not a mock server. In the table the properties regarding the personalization and variants are enabled (useTablePersonalisation="true", useVariantManagement="true"). I see that I have to specify the persistencyKey so that variants can display on the UI, but i don't know what value should i complete it with.
I read that smartTable and smartFilter are using SmartVariantManagement(a custom control of VarinatManagement) to accessed directly (without user interaction) SAPUI5 Flexibility Services regarding personalization data and management of the variant. But on SAP Help it says that:
Flexibility services are currently not available in SAP Hana Cloud Platform.
The services run on the ABAP front-end server and NetWeaver 7.31 SP11 or higher
Here is the link: http://help.sap.com/saphelp_hanaplatform/helpdata/en/a8/e55aa2f8bc4127923b20685a6d1621/frameset.htm
It is possible to use the variants and personalization?
How can I do it regardind my application specification?
Does anyone have an example application?
Thank you !
You can use them both at the same time.
For me the useTablePersonalisation="true" is working without any other changes. Rearding the useVariantManagement="true", I use showVariantManagement="true" also, and as you said persistencyKey="SmartFilter_Explored" is also needed to see Variant Management icon.
This is an example: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.comp.sample.smarttable/preview
For me I can not test the variant management functionality when running the app from webide as it is needed an existing user for you. So I can test it only, when running it on launchpad.
PersistencyKey identifies the storage area and saves/retrieves the variants currently used.
This page helps you with persistency key (under Page Variant section):
https://sapui5.hana.ondemand.com/#/topic/06a4c3ac1cf545a7b51864e7f3aa02da
I hope it helped.

Connect existing Drupal page with PhoneGap iOS App

Case:
I have an existing page based on Drupal and going to develop a phoneGap iOS App. That means I just need the information of the existing page and want to fill these data in the new app.
My Question is now, do somebody know weather there is a work around or work flow to do so resp. how can I connect the existing page with another page or in my case phoneGap to get just the data? I'm new with Drupal and phoneGap so maybe you have some pages with information, tutorials or some help how to do this.
Thanks in advance yves
Drupal offers a module called "Services" which will allow you to get data or services from your website. You may need to create your own methods on that module to get the information you want to retrieve.
As for the iOS side, you can retrieve the data via XML-RPC, Rest or whatever communication protocol you choose at the server side, or go all the way with drupal-ios.
https://github.com/workhabitinc/drupal-ios-sdk/
You should start looking for the Services module and play with it. You will have an embedded console on that module to test the methods.
Once you're finish with that, take a look at drupal-ios or go deep with your own implementation via XML-RPC or whatever.

Facebook Application Design Question

Iam coding a dating application for facebook. The application has to have a standalone web application part and a Iframe based part which runs inside facebook canvas.
I want to know good ways to design the application. Iam using zend framework, so here is my idea.
One approach that am planning to use is this -
The application folder to contain 2 controllers, index controller being the entry point of the standalone web application and another controller- FacebookController to be the entry point of the Iframe being run inside facebook canvas. Both of them calling the same view files which get written based on which controller is writing to them.
The second approach is to have one single controller as the entry point and use 2 layout files. One for the standalone web application and one for the facebook canvas app.
The reason for choosing these approaches in that the authentication mechanism of the two applications is different.
To get an idea, have a look at www.areyouinterested.com, Iam planning to do something similar to what they have done.
Please suggest me what would be the best way to go around this.
Your first choice is best.
Two Controllers. Two layouts. Common views.
This gives you flexibility to change around a lot of one or the other without breaking the opposite one.
If you feel ambitions, I would even go with two modules. If your application is structured well enough each module will have common components that are re-usable.