Hi,
> In theory, edit your custom component.xml and change the submenu
defaultView attribute in view:
>
> <view
> id="submenu"
> label="SubMenu"
> className="SubMenuView"
> appUrl="/dashboard/submenu"
> bootParam=""
> defaultView="welcome"
> style="submenuview"/>
>
> In practice, this didn't work for me. Hippos?
Just tested this and your right, this is broken in the trunk, don't know
since which release.
I've just written a fix and will commit it right away in HippoCMS trunk
and Branch-6.05.xx.
And just to make sure, I've added it as a patch to this mail.
Regards,
Arthur Bogaart
[EMAIL PROTECTED] - www.onehippo.com
-------------------------------------------------------------
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646
-------------------------------------------------------------
> Andrew.
> --
> Sourcesense: Making sense of Open Source
> Tel: +44 (0)870 741 6658 Fax: +44 (0)700 598 1135
> Web: http://www.sourcesense.com/
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
Index:
C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hippo/perspectives.js
===================================================================
---
C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hippo/perspectives.js
(revision 10823)
+++
C:/projects/hippo-cms-trunk/editor/src/site/workbench/resources/js/hippo/perspectives.js
(working copy)
@@ -243,14 +243,47 @@
Cfx.Class.New(DashboardPerspective, Perspective);
if( Cfx.Class.IsInitializing( DashboardPerspective)) {
// Initialize class methods
+ DashboardPerspective.Method(onLoad);
return;
}
}
// Setup instance data.
this.InitInstance();
+ this.firstHitHandled = false;
// Return instance.
return this;
+
+ function onLoad() {
+
+ this.baseClass.onLoad.apply(this); //super call
+
+ if(this.firstHitHandled)
+ return;
+
+ var defaultStartupView = 'welcome';
+ var subMenu = this.vm.getViewById('submenu');
+ var id = subMenu.config.defaultView != null ? subMenu.config.defaultView :
defaultStartupView;
+ var lastActive = 'welcome';
+
+ if(id == lastActive)
+ return;
+
+ var myV = this.vm.getViewById(id);
+ if(myV != null && isInstanceOf(myV, 'LazyView') && !myV.isActivatable()) {
+ myV.setActivatable(); //refactor
+ }
+
+ var dom = this.container.getDOM();
+ if (dom.getById(lastActive)) {
+ dom.getById(lastActive).style.display = 'none';
+ }
+ if (dom.getById(id)) {
+ dom.getById(id).style.display = 'block';
+ }
+ subMenu.setLastActive(id);
+ this.firstHitHandled = true;
+ }
}
function DocumentPerspective() {
********************************************
Hippocms-dev: Hippo CMS development public mailinglist