Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can i override back clicks in split view navigation on handsets?

    In your examples of the splitview, you have tree -> listgrid -> details. On handsets you go "down" into the hiearchy then use the Navigation button to go back up.

    What we want is to check if the user has edited something in the detail pane, and pop up a dialog saying "record has changed, are you sure you want to go back?" if the user clicks the back button without having saved.

    I looked at the SplitPane, and you can add a NavigationClickHandler. However, i cannot see how you would postpone or cancel the NavigationClickEvent. What i would like is to "hold on" to the event while we show a dialog to the end user, if he/she clicks yes, we go through with the event, if no, we stay on the detail pane.

    Is this possible?

    #2
    The event should be cancellable, we’ll add that. However, showListPane() continues the action and showDetailPane() reverses it.

    Comment


      #3
      Great stuff! What is the best way for me to check when it has appeared in the beta?

      Comment


        #4
        The event being cancelable? We'll update this thread when the change has been made.

        Comment


          #5
          Now that's just faaaaantastic. Cheers

          Comment


            #6
            We've made a change to SGWT 12.0+, available in today's nightly builds, to support canceling the NavigationClickEvent. This capability is enabled by default for SGWT 12.1+, but for SGWT 12.0 you'll need to set notifyAfterNavigationClick false in your app code to enable cancellation.

            (Why the extra step? Allowing cancellation requires running the NavigationClickHandler before navigation, and that could be a problem for some users if their handler depends on the target pane being drawn with proper widget sizing, overflow, etc., since that's only guaranteed after navigation.)

            Comment


              #7
              Now that was quick! Great work.

              Comment

              Working...
              X