Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Application navigation and parameters

Hi


I am currently developing a online desktop application using sap.m library and neptune 3.1.


I don't want to divulge much about the app in a public forum as it is commercially sensitive, I can take a meeting to discuss.


The application consists of a central management app with an inbox and allows a user to create, maintain process and track "items".


Each "item" will be a separate neptune application or a separate page in another application.


My questions are:

1. Can I call another application and load a specific page, using something like AppCache.load( "Z_APPLICATION", "PAGE within application");


2. How can I pass parameters between applications

3..Is it possible to get a transition between applications that are invoked using AppCache.


The reason for the other applications is that there will be a number of programmers working on "items" simultaneously.


I would be happy to take/make a call or meeting on this to discuss the app in more detail, or log a ticket and supply screenshots.


Looking forward to your response.


Thanks


Darren





Hi Darren


On the press event or a link you can use the URLHelper from UI5 to link to another Application:


 

jQuery.sap.require("sap.m.URLHelper");

// Link to new page
// Use 2. parameter for new window or not
sap.m.URLHelper.redirect(yourURL, true);

 

Build you URL with the hash navigation if that is used.


Regards

Ole Andre 

Hi Ole Andre


using the url method, how do I call another neptune app ?  is there an App.to method or something that I can use or do I have to use a piece of javascript or jquery ?

Can I get a transition effect on it ?


Ideally I would like to implement an App.to and App.back model between two different neptune applications, is this possible ?


Thanks

HI Ole Andre


URL is the best way to go for me, and fits my requirement perfectly.

I will give the above code suggestion a try .


Many thanks

Hi Darren


Important to separate between AppCache framework and Normal URL navigation.


AppCache 

Only possible to navigate to the next application. Not possible to pass values in the AppCache.Load method. Suggest you use the global Cache and handle the startup by navigating to the right page. 


URL

Use hash navigation to pass data between applications. Implement a handler as for AppCache, to navigate to the right page. We do that in Neptune Explored. Use the hash content as you like and parse it depending on your requirement. Test Neptune Explored documentation, copy the link and start Explored with that link and the app navigates directly to the right page and content.


 

function hashNavigation() {
    setTimeout(function() {
        if (location.hash.substring(1, 4) == 'doc') {
            getOnlinepageDoc(location.hash.substring(1, 99));
        } else {
            getOnlinepageObject(location.hash.substring(1, 99));
        }
    }, 200);
}
window.onhashchange = hashNavigation;
// Trigger on first request
if (location.hash) {
    hashNavigation();
}

 


Regards

Ole Andre 

Thanks Ole Andre


Its a bit disappointing that I can't navigate to a  particular page within an app, as I would like to group applications by Sap functional areas e.g. MM or SD would all be contained in ZUI5_MYSD_APP.


Perhaps I could set a parameter in my calling application and use the init function to route me to that page, not ideal but it might work.  Does the appCache handle '#' like jqueryMobile e.g. /neptune/myApp#Page2.



Hi Darren


The best solution is that the "Item" is a separate Application. Then you can have several developers working on different Applications.


1) Not possible, will only load the entire Applications "<body>" content.

2) You can use several options:

  1. Use Global Cache. Set the cache typeGlobal to true. You need to have the same name of the object in all Applications.
  2. Use hash navigation between applications. Like we do with our Explored solution. Check the URL and how we navigate. A really good way of navigate and pass data between the Applications.
  3. Use KEY value in the URL, and catch the KEY variable from the URL at startup, then use the value to getOnline<Object>(value). 
  4. Use server side cookies, by using our API_PARAMETER_SET/API_PARAMETER_GET
3) Not possible atm to get a transition between AppCache.Load event. Using AppCache framework on Desktop (only check for Web App in the Bundle App) will provide you with a fast way of switching between apps. 


Regards
Ole Andre
Login or Signup to post a comment