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

1 posts, 1 answers
  1. Answer
    David
    David avatar
    3 posts
    Member since:
    Feb 2011

    Posted 13 Jun 2013 Link to this post

    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.


Back to Top