Back Button + DWR problem using RSH history framework

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leenadiwan
    New Member
    • Jan 2007
    • 22

    Back Button + DWR problem using RSH history framework

    Hello All,

    We have implemented dynamic data load in an HTML table. The next set of records are loaded using DWR and the HTML table is updated.

    The trouble is when we click any link and go to other page, and then come back using browser's back button, the latest set of data is not shown.

    For this Im trying to use the history framework - RSH. Using this I stored the data retrieved by DWR into on historyStorage object. On back button click, I retrieved this stored data and am trying to again call the callback function with this data.

    Now, when I print this retrieved data, these are valid values, but when I send this to the callback function explicitly, the table getting painted has all <td> with 'undefined' as the value.

    Additional alerts showed that the options.data is coming as 'undefined'. On further debugging, I found that the one global JS array variable that I have used in the cellfuncs[] is 'undefined'. but Im not sure why.
    Can anyone help?

    NOTE: If someone has solved such a problem of back button with DOJO framework also, please share some sample code.
    We have used RSH for suitability evaluation purpose.

    Regards,
    Leena
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Post your code here so that we might be able to figure out the problem.

    Comment

    • leenadiwan
      New Member
      • Jan 2007
      • 22

      #3
      Code:
      //At the start of the JS file-
      var currPosition = new Array();
      
      //Down in the JS file, in the code for DWR, we have the following
      var cellfuncs = [
      	function (data) { return parseData(data,currPosition[0],0);},
      	function (data) { return parseData(data,currPosition[1],1);},
      ...
      ...
              function (data) { return parseData(data,currPosition[10],10);}
      ];
      Note that Im storing the currPosition array like data in the historyStorage object and retrieving it also when the back button is clicked. Both currPosition and data are not null when I retrieve them. But the value of currPosition[0], currPosition[1] etc all come as undefined when I print them again when back button is clicked.

      Comment

      • leenadiwan
        New Member
        • Jan 2007
        • 22

        #4
        Used History Framework - RSH?

        Has anyone used History Framework - RSH?

        I want to know more about its use. It would be helpful if someone could provide link to a detailed documentation.

        Regards,
        Leena

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          I'm not sure if there is detailed documentation. Did you check the release notes?

          You could also check out this article by the author.

          Comment

          Working...