Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      general

      Description

        Hello, I would like to know the status of Back button functionality in ICEFaces. What i exactly mean is some kind of history between the ajax calls like RSH, or hash approach. The final goal is to have let's say PanelStack component and when we switch several times the visible panel when the user hits back he must see the previous panel.
      Thanks.

        Issue Links

          Activity

          Alexander Petrov created issue -
          Hide
          Alexander Petrov added a comment -

          I would like to add that the approach described by this article http://www.onjava.com/pub/a/onjava/2005/10/26/ajax-handling-bookmarks-and-back-button.html

          works with ICEFaces in Internet explorer 7.0. But when i tryed to use it with mozilla it couldn't find the submit javascript of the form. If requested I can give source code to test.

          Show
          Alexander Petrov added a comment - I would like to add that the approach described by this article http://www.onjava.com/pub/a/onjava/2005/10/26/ajax-handling-bookmarks-and-back-button.html works with ICEFaces in Internet explorer 7.0. But when i tryed to use it with mozilla it couldn't find the submit javascript of the form. If requested I can give source code to test.
          Hide
          Damien Chambe added a comment -

          I used rsh ( http://code.google.com/p/reallysimplehistory/ )
          and it works in firefox, but not in IE7

          in <HEAD> :

          <script type="text/javascript" src="../javascript/json2005.js"></script>
          <script type="text/javascript" src="../javascript/rsh.compressed.js"></script>
          <script type="text/javascript">
          window.dhtmlHistory.create({
          toJSON: function(o)

          { return JSON.stringify(o);}

          , fromJSON: function(s)

          { return JSON.parse(s);}


          });
          var historyChange = function(newLocation, historyData)

          { document.getElementById("headerForm:historyHiddenData").value = newLocation; iceSubmitPartial(document.getElementById("headerForm"),document.getElementById("headerForm:HistoryBtn"),MouseEvent.CLICK); }


          historyActionListener = function (location, action)

          { dhtmlHistory.add(location, action); }

          window.onload = function()

          { dhtmlHistory.initialize(); dhtmlHistory.addListener(historyChange); }

          ;
          </script>

          hidden components in the page :

          <!-- hidden browser navigation -->
          <ice:commandButton id="HistoryBtn" value="" action="HISTORY" visible="false"/>
          <ice:inputHidden id="historyHiddenData" value="" />

          I have JSf a navigation handler :

          public void handleNavigation(FacesContext facesContext, String actionMethod, String actionName) {

          HtmlInputHidden input = ((HtmlInputHidden) facesContext.getViewRoot().findComponent(
          "headerForm:historyHiddenData"));
          if (input != null) {
          String value = input.getValue().toString();
          String viewId = value;
          if ((value != null) && (value != ""))

          { UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, viewId); facesContext.setViewRoot(root); }

          }

          I save the history only when I click on a menuitem :
          MenuItem menuItem = new MenuItem();

          String navUrl = getNavigationUrl(action);
          if (navUrl != null)
          menuItem.setOnclick("historyActionListener('" + navUrl + "' , '"
          + action + "')");

          function getNavigationUrl returns the navigation url associated with this outcome.

          Ok in Firefox 3, but no javascript errors in IE7 and it doesn't works.

          Show
          Damien Chambe added a comment - I used rsh ( http://code.google.com/p/reallysimplehistory/ ) and it works in firefox, but not in IE7 in <HEAD> : <script type="text/javascript" src="../javascript/json2005.js"></script> <script type="text/javascript" src="../javascript/rsh.compressed.js"></script> <script type="text/javascript"> window.dhtmlHistory.create({ toJSON: function(o) { return JSON.stringify(o);} , fromJSON: function(s) { return JSON.parse(s);} }); var historyChange = function(newLocation, historyData) { document.getElementById("headerForm:historyHiddenData").value = newLocation; iceSubmitPartial(document.getElementById("headerForm"),document.getElementById("headerForm:HistoryBtn"),MouseEvent.CLICK); } historyActionListener = function (location, action) { dhtmlHistory.add(location, action); } window.onload = function() { dhtmlHistory.initialize(); dhtmlHistory.addListener(historyChange); } ; </script> hidden components in the page : <!-- hidden browser navigation --> <ice:commandButton id="HistoryBtn" value="" action="HISTORY" visible="false"/> <ice:inputHidden id="historyHiddenData" value="" /> I have JSf a navigation handler : public void handleNavigation(FacesContext facesContext, String actionMethod, String actionName) { HtmlInputHidden input = ((HtmlInputHidden) facesContext.getViewRoot().findComponent( "headerForm:historyHiddenData")); if (input != null) { String value = input.getValue().toString(); String viewId = value; if ((value != null) && (value != "")) { UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, viewId); facesContext.setViewRoot(root); } } I save the history only when I click on a menuitem : MenuItem menuItem = new MenuItem(); String navUrl = getNavigationUrl(action); if (navUrl != null) menuItem.setOnclick("historyActionListener('" + navUrl + "' , '" + action + "')"); function getNavigationUrl returns the navigation url associated with this outcome. Ok in Firefox 3, but no javascript errors in IE7 and it doesn't works.
          Hide
          Damien Chambe added a comment -

          Ok, works with IE7 too... (don't forget to include blank.html in the right place)

          Show
          Damien Chambe added a comment - Ok, works with IE7 too... (don't forget to include blank.html in the right place)
          Hide
          Ramamoorthy Periasamy added a comment -

          I am using PanelTabSet, I am not able to achive this. I am getting below error..

          Caused by: java.io.FileNotFoundException: Facelet Not Found: jndi:/localhost/IceFaceProject/1.jspx

          Could you attach the sample file. so that I can understand better.

          Show
          Ramamoorthy Periasamy added a comment - I am using PanelTabSet, I am not able to achive this. I am getting below error.. Caused by: java.io.FileNotFoundException: Facelet Not Found: jndi:/localhost/IceFaceProject/1.jspx Could you attach the sample file. so that I can understand better.
          Hide
          Ajay Sriramoju added a comment -

          Hi, Can you please tell the procedure for handling the browser back button functionality using icefaces. When I click on the browser back button, it navigates to the first page, instead of the previous page. Can you please attach a working example if possible.

          Show
          Ajay Sriramoju added a comment - Hi, Can you please tell the procedure for handling the browser back button functionality using icefaces. When I click on the browser back button, it navigates to the first page, instead of the previous page. Can you please attach a working example if possible.
          Hide
          Damien Chambe added a comment -

          Please see ICE-4794 for a general discussion of the back problem.
          My solution works only if you track each page validation to put it in the browser navigation history via RSH.

          Show
          Damien Chambe added a comment - Please see ICE-4794 for a general discussion of the back problem. My solution works only if you track each page validation to put it in the browser navigation history via RSH.
          Damien Chambe made changes -
          Field Original Value New Value
          Link This issue depends on ICE-4794 [ ICE-4794 ]
          Hide
          Ajay Sriramoju added a comment -

          Hi, Can any one post the complete working solution to test the back button functionality with icefaces.

          Show
          Ajay Sriramoju added a comment - Hi, Can any one post the complete working solution to test the back button functionality with icefaces.
          Hide
          Ajay Sriramoju added a comment -

          Can any one provide the status of the Browser back button functionality in Icefaces? Please provide if there is any working solution.

          Show
          Ajay Sriramoju added a comment - Can any one provide the status of the Browser back button functionality in Icefaces? Please provide if there is any working solution.

            People

            • Assignee:
              Unassigned
              Reporter:
              Alexander Petrov
            • Votes:
              22 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: