ICEfaces
  1. ICEfaces
  2. ICE-7763

Bridge addition of rvn parameter on reload does not handle Client-side parameters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P03
    • Fix Version/s: EE-1.8.2.GA_P04
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      n/a

      Description

      On a <reload> sent from the server, the Bridge appends rvn={view number} to the URL. This, however, isn't taking into account possible Client side parameters (window.location.hash).

      Suggested fix:

      application.js

      commandDispatcher.register('reload', function(element) {
                      logger.info('Reloading');
                      var url = window.location.href;
                      sendDisposeViews = Function.NOOP;
                      dispose();
                      if (url.contains('rvn=')) {
                          window.location.reload();
                      } else {
                          var view = element.getAttribute('view');
                          if (view == '') {
                              window.location.reload();
                          } else {
                              var queryPrefix = url.contains('?') ? '&' : '?';
                              var hash = window.location.hash ? window.location.hash : "";
                              if( hash.length > 0 ){
                                  url = url.substr(0,url.length-hash.length);
                              }
                              window.location.href = url + queryPrefix + 'rvn=' + view + hash;
                          }
                      }
                  });

        Activity

        Hide
        Mircea Toma added a comment -

        Preserve client side set URL fragment after page reload.

        Show
        Mircea Toma added a comment - Preserve client side set URL fragment after page reload.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: