Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-25-2010, 08:49 AM
Junior Member
 
Posts: 9
Default [SOLVED] Deep Linking to New Tab Application

just like you can deep link to the calendar view by adding "?app=Calendar",

can you deep link to ones own made tab application like "?app=myTabApp"

I just want users to have the opportunity to go straight to our own made app.
Do I need to register something somewhere - does this feature even exist in zimbra?
Reply With Quote
  #2 (permalink)  
Old 06-01-2010, 02:21 AM
Junior Member
 
Posts: 5
Default

I am also searching for info on this. Any one can assist?

By the way, may I ask is there a deep link for the Address Book and Preferences? I tried app=Address and app=Preferences but it doesn't work
Reply With Quote
  #3 (permalink)  
Old 06-02-2010, 01:43 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

the deep links for the Address Book and Preferences are :
"?app=contacts"
"?app=options"

If you look in the code of the app (files Zm...App.js, example : ZmContactsApp.js), it seems the param value is linked to :
Code:
ZmApp.QS_ARG[ZmApp.CONTACTS] = "contacts";
Reply With Quote
  #4 (permalink)  
Old 06-02-2010, 02:08 AM
Junior Member
 
Posts: 5
Default

Dear tdesorbaix

Thank you soooooo much for the prompt reply!

Really appreciate it
Reply With Quote
  #5 (permalink)  
Old 06-03-2010, 06:08 AM
Junior Member
 
Posts: 9
Default Deeplink solved for Self made Tab Apps

A fellow colleague of mine figured it out, but keep in mind we wrote our tab app based on another forum entry to control the tabs viewable location (order) so our params may be a bit different than yours.
The link to explain how to order your tabs is found here

Based on the info above - I kept the same information to associate between the two issues. All this takes place in the init function of your tab application:
Code:
var label = "Simple Tab App";
var image = "zimbraIcon";
var tooltip = "A simple app in a new tab";
var index = 2;
	
var params = {
	text:label,
	image:image,
	tooltip:tooltip,
	index:index
	};
	
AjxDispatcher.require("ZimletApp");

var appName = [this.name, Dwt.getNextId()].join("_");
var controller = appCtxt.getAppController();

// up until now we are just setting the variables that will be called in the deeplink code
// I am skipping the xtras that can be found in the above link

if ((AjxStringUtil.parseQueryString() !== null) && (AjxStringUtil.parseQueryString() !== undefined))
{
    var query_string = AjxStringUtil.parseQueryString();
    if (query_string.app.toLowerCase() == 'deeplink_name')
    {
        controller.activateApp(appName, false, null, null, params);
     }
}
I believe thats right, and where "deeplink_name" is shown, you can technically put any name there you choose that you want to add to the URL.

So for example if I left it as it is, the URL call would be...
Code:
www.myzimbra.com?app=deeplink_name
...and it should load your tab app instead of others.

Ok there you go! Let me know how this works for you. Real busy here so be patient on reply.

Thanks!
cmac
Reply With Quote
  #6 (permalink)  
Old 06-04-2010, 12:13 PM
Junior Member
 
Posts: 9
Default Switching to your App without reloading

A situation came up where we want to offer a dialog box to see if the user was sure about leaving our app without saving. Since this code is directly related to the above solution, I figure I'd add this neat note.

Basically, if the user decides to stay on the tab and clean up changes, then all we do is call our controller and call the same activateApp function but instead of all the params and stuff, we just send two arguments which would be the tab app name and a boolean of false. With false set, the tab will not load everything back up but instead just "Switch" to our tab.

Code:
var controller = appCtxt.getAppController();
controller.activateApp(appName, false);
Hope this helps
Reply With Quote
  #7 (permalink)  
Old 06-08-2010, 06:59 PM
Junior Member
 
Posts: 5
Default

Dear cmac

Thank you sooooOOOOOOoooo much for replying and my sincere apologies for the delay in updating you on this ---- YES finally got it to work! Thank you so so much

Greatly appreciate your kindness

Thanks once again,
Liz
Reply With Quote
  #8 (permalink)  
Old 06-09-2010, 06:00 AM
Junior Member
 
Posts: 9
Smile Soooo Welcome!

Always glad to hear my problem ended up helping someone else out. Glad its working for you! Cheers!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.