One way to "navigate to a viewpanel" is programmatically.

Assuming you have a viewpanel containing views declared:
   <div ex:role="viewPanel" id="vp">
     <div ex:role="view" ##exhibit.getComponent("vp")._switchView(0);
      > ... </div>
     <div ex:role="view" ##exhibit.getComponent("vp")._switchView(1)
     > ... </div>
...
  </div>

You can programmatically switch to the  i-th viewpanel  (0-based)  with
exhibit.getComponent("vp")._switchView(i)

Or alternately, my utility function, switchView("vp", i) switches to the
i-th declared viewpanel, returning true,
or returns false if already showing. When it returns false, it also means it
hasn't destroyed/recreated the contents
of viewpanels in the process of switching, due to the way viewpanels are
implemented).

/****************************************************************************
 * switch viewpanels if not already showing, returning true. if already
 * showing return false.
 ****************************************************************************/
function switchView(viewpanel_name, idx_in_viewpanel) {
  var viewpanel = exhibit.getComponent(viewpanel_name);
  if (viewpanel) {
    if (viewpanel._viewIndex != idx_in_viewpanel) {
      viewpanel._switchView(idx_in_viewpanel);
      return true;
    }
    else {
      return false;
    }
  }
  else {
    alert("switchView('" + viewpanel_name + "'," + idx_in_viewpanel + "):
viewpanel not found - '" +  viewpanel_name + "'.");
  }
}

Niels
http://nielsmayer.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to