Results 1 to 8 of 8

Thread: [SOLVED] Deep Linking to New Tab Application

  1. #1
    Join Date
    Feb 2010
    Location
    WNY
    Posts
    12
    Rep Power
    5

    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?

  2. #2
    Join Date
    Jun 2010
    Posts
    5
    Rep Power
    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

  3. #3
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    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";

  4. #4
    Join Date
    Jun 2010
    Posts
    5
    Rep Power
    5

    Default

    Dear tdesorbaix

    Thank you soooooo much for the prompt reply!

    Really appreciate it

  5. #5
    Join Date
    Feb 2010
    Location
    WNY
    Posts
    12
    Rep Power
    5

    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

  6. #6
    Join Date
    Feb 2010
    Location
    WNY
    Posts
    12
    Rep Power
    5

    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

  7. #7
    Join Date
    Jun 2010
    Posts
    5
    Rep Power
    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

  8. #8
    Join Date
    Feb 2010
    Location
    WNY
    Posts
    12
    Rep Power
    5

    Smile Soooo Welcome!

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

Similar Threads

  1. Replies: 8
    Last Post: 03-29-2011, 08:11 PM
  2. Tab key redux
    By a12344123 in forum Users
    Replies: 6
    Last Post: 05-01-2010, 11:39 AM
  3. [SOLVED] Controlling tab positions
    By cmac in forum Developers
    Replies: 3
    Last Post: 02-25-2010, 09:58 AM
  4. Replies: 0
    Last Post: 12-07-2009, 05:08 PM
  5. [SOLVED] Deep linking?
    By benton in forum Administrators
    Replies: 1
    Last Post: 08-14-2007, 09:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •