Topic
3 replies Latest Post - ‏2013-04-05T20:01:12Z by bemorris
SystemAdmin
SystemAdmin
445 Posts
ACCEPTED ANSWER

Pinned topic Loading Default Feature

‏2013-04-05T16:31:22Z |
I have created a layout with a feature that has been set as the default feature for my desktop. When I login to my desktop, it does not show my feature panel. Instead it shows a blank, white panel. If I click on the launch icon for my feature then it displays the feature panel. It seems that the feature panel loadContent is not being called for the default feature on login.

Any ideas on what might be causing it and if there is something I need to do to get this to open.

Thank you.
Updated on 2013-04-05T20:01:12Z at 2013-04-05T20:01:12Z by bemorris
  • SystemAdmin
    SystemAdmin
    445 Posts
    ACCEPTED ANSWER

    Re: Loading Default Feature

    ‏2013-04-05T16:46:46Z  in response to SystemAdmin
    Three possible choices:

    1) So you have your own layout and is not using Navigator's default layout correct? If that's true, you need to automatically select the feature on login. You can peek into the NavigatorMainLayout and look at the onLogin() event connection there on how it's connecting and selecting the default feature.

    On a side note, that function is using a private method and has been corrected for a future release.
    this.launchBarContainer._selectContentPane(button, this.defaultFeatureId, null);

    2) The other option is to reuse NavigatorMainLayout and just plainly add your new feature to it. Access ICN's administration and just set your new feature as the default feature.

    3) The last option is just to set the preLoad variable of the default feature to true and make it load immediately.
  • SystemAdmin
    SystemAdmin
    445 Posts
    ACCEPTED ANSWER

    Re: Loading Default Feature

    ‏2013-04-05T19:50:28Z  in response to SystemAdmin
    Thank you for the information.

    I looked at the NavigatorMainLayout onLogin logic. I added the following to my Layout's postCreate method
    
    dojo.connect(ecm.model.desktop, 
    "onLogin", dojo.hitch(this, function() 
    { 
    
    if (this.defaultFeatureId) 
    { var button = this.launchBarContainer._getButtonByID(this.defaultFeatureId); this.launchBarContainer._selectContentPane(button, this.defaultFeatureId, 
    
    null); 
    } 
    }));
    


    I also added the following to my setFeatures
    
    this.defaultFeatureId = defaultFeature;
    


    This allowed the feature to be selected on login, however, the feature's loadContent was still not called. I have to click the icon for it to be called. Is there something else that I might be missing?

    Thank you.
    • bemorris
      bemorris
      134 Posts
      ACCEPTED ANSWER

      Re: Loading Default Feature

      ‏2013-04-05T20:01:12Z  in response to SystemAdmin
      If you're plan is to create a feature, there is no reason to create your own layout. Just use Content Navigator's (ICN) default layout and add your custom feature via the desktop configuration. If you only add one feature to the desktop, the feature bar on the left will not be shown and your feature pane will be the only thing the user sees.