This is a migrated thread and some comments may be shown as answers.

View's data-show only firing once - within SplitView Pane

0 Answers 72 Views
SplitView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 13 Jun 2013, 02:46 PM
Hello,

I'm unsure why but the side Pane within a SplitView, containing a view, is only calling it's data-show function once. It is not being called upon navigation to the view a second time. I've stripped the following code down to keep it simple.
<div data-role="splitview" id="events-split-view">
  <div data-role="pane">
    <div data-role="view" data-show="testDataShow">
      Side Pane
    </div>
  </div>
 
  <div data-role="pane" data-layout="main-default">
    <div data-role="view">
      Main Pane
    </div>
        
    <div data-role="layout" data-id="main-default">
      <div data-role="header">
        <div data-role="navbar">
          <a data-role="button" href="#contact-details-view" data-align="right" data-target="_top">Go back</a>
        </div>
      </div>
    </div>
  </div>
</div>
 
<script>                      
    function testDataShow() {
        alert("View's data-show called");
    }
</script>
Solution
The data-show needs to reside on the data-role="splitview" element rather than the view itself.


No answers yet. Maybe you can help?

Tags
SplitView
Asked by
David
Top achievements
Rank 1
Share this question
or