Hello all,

I just applied the patch to my 6.05.02 CMS but it doesn't works so good.
I changed the dafaultView from "welcome" to "todo" and now the 2 views comes out mixed! (in other words i see both views merged in the same messy page)
Bugzilla tells me that:
---
dom.getById is not a function
onLoad()hippoApplication.... (line 899)
show()hippoApplication.... (line 824)
showPerspective("dashboard", undefined)hippoApplication.... (line 710)
showMenu()hippoApplication.... (line 212)
splashScreen(false)hippoFramework.js (line 572)
splashScreenWhenInitialized(7)hippoFramework.js (line 524)
[Break on this error] if (dom.getById(lastActive)) {
---

This is not enough, now i can't switch from a view to another because I got another javascript error:
---
myP has no properties
showView("welcome")dashboard.js (line 99)
onclick(click clientX=0, clientY=0)perspective.html (line 1)
[Break on this error] var lastActive = myP.vm.getViewById('submenu').getLastActive();
---

Hope to be useful.
By MCM.

Arthur Bogaart wrote:
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
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to