on 01-04-2015 2:19 PM
Hi Experts,
What is the recommended way (Best practice) for navigation between views in Desktop SAPUI5 application?
Samples code and references will be appreciated.
Thanks in advance.
Hi Yoel
Routing is one of the method.
https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/core/samples/routing/index.html#
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dennis
As I know 'routing' is the recommended method for MOBILE SAPUI5 application. I'm looking for the correct way to implement navigation between views on SAPUI5 DESKTOP application.
I didn't understand how the link that you attached demonstrates navigation between views (in the same page and not by Tabs).
Thanks in advance for your inputs.
Routing is also the preferred method for desktop applications (there should be no difference between mobile and desktop since the preferred rendering method for UI5 applications is to be responsive anyway)
It should make no difference if the navigation is triggered outside the view (in tabs) or inside the various views (using navigation buttons, links, etc)
Yeah, have a look the Application Best Practices - Step 3 at https://sapui5.hana.ondemand.com/sdk/#docs/guide/688f36bd758e4ce2b4e682eef4dc794e.html
Here is another example based on sap.m library Routing Example Page
Check the source code as well as launch the developer tool in chrome browser(F12), you will observe different views (App.view.xml, Master.view.xml, Detail.view.xml etc) getting loaded. Same can be verified for desktop based application which Dennis shared.
Regards,
Chandra
Yoel,
as you have seen from everyone here, Routing is the preferred method on sapui5. Just to add to what others said... Routing is also used in other web technologies and frameworks, therefore, using Routing would be your best option and also if you are interested in other frameworks, it would be helpful to learn it and apply it in other areas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Yoel, check this out:
http://scn.sap.com/community/developer-center/front-end/blog/2014/05/04/sapui5-with-advanced-routing
hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
No doubt Routing is best way fro navigation ; here i am giving you the second Option of Navigation as you required.
Using UriParam to navigate from one view to another .
How to use :
Lets take example In view 1 you have Text field say "TF-Txt1", now we need to set the value which you are entering in the screen , using
TF-Txt1.setValue(jQuery.sap.getUriParameters().get("myUriParam"));
Once you set this you can use in Next view(View2) , if you need to get this value in other text field then :
oTF-Txt2 = new sap.ui.commons.TextField({
id : 'Text2',
tooltip : 'Text2',
editable : true,
value : jQuery.sap.getUriParameters().get("myUriParam"),
});
Thanks
Romit Raina.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.