Loading ...
Sorry, an error occurred while loading the content.

Re: Methods to Save/Persist TreeView Object Across Pages/Frames?

Expand Messages
  • momiller121
    One idea... How about just building state on the client and running your client side within a frameset a la gmail... Share your treeview state off variables
    Message 1 of 2 , Apr 10, 2006
    • 0 Attachment
      One idea... How about just building state on the client and running
      your client side within a frameset a la gmail... Share your treeview
      state off variables declared in a page you don't see that persists for
      the session

      Cheers,

      Mark

      --- In ydn-javascript@yahoogroups.com, "Chun" <chunpan.geo@...> wrote:
      >
      > I'm currently using Yahoo TreeView to build up a dynamically loaded
      > directory tree. I have DWR AJAX calls to retrieve children of each
      > node, and it works all fine.
      >
      > However, just like most other in-page dynamic elements, the content
      > and state of the tree will not survive a page refresh or back/forward
      > buttons. I'm thinking of persisting the TreeView object in HttpSession
      > via an AJAX call to the server and rebuild the TreeView based on the
      > persisted content later on when the page is revisited.
      >
      > Here is my problem. I can't find any known TreeView methods in the API
      > that can either export the TreeView object into a Serializable format
      > (such as XML) or reconstruct the object back from such XML string.
      >
      > I've also tried an alternative with DWR. I tried to pass the TreeView
      > object as a parameter into a mapped DWR method to persist it as
      > java.lang.Object into HttpSession. The problem is that DWR could not
      > convert between TreeView object and java Object. Again, if TreeView
      > can be easily exported as XML, DWR will have no problem converting it
      > between javascript and Java Strings.
      >
      > Any suggestions or alternatives? Thanks in advance!
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.