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

Re: Treeview - Odd issue

Expand Messages
  • john_bell_sas
    Satyam, Thank you for your time! I ll give it all a shot. -John ... argument ... cache ... handlers. ... 29/08/2008 18:12
    Message 1 of 5 , Aug 30, 2008
    • 0 Attachment
      Satyam,


      Thank you for your time! I'll give it all a shot.


      -John

      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > Well, something is now clear, the issue has nothing to do with
      > TreeView. You mention IE and, indeed, that is quite probably the cause
      > of it all. IE has a very aggressive caching policy, more than the
      > standard requires or other browsers use. If you try this code in any
      > other browser you will probably find it works fine. <meta> headers
      > might be not enough, most server software allows you to set HTTP
      > headers, not HTML headers as you are doing, but those that go before
      > HTML starts. Check in the forums for your server.
      >
      > There is a nasty trick I do not recommend which is add a random
      argument
      > to the argument list of the URL, if it request is slightly different,
      > the cache will be fooled. I don't like it because it fills up the
      cache
      > with pages you are absolutely certain will never be reused, depriving
      > the user of the benefits of caching other pages by saturating it with
      > yours. That is an easy trick and certainly works, but a little more
      > research will certainly offer a better solution, fairer to your users.
      >
      > As for YUI, it is not a good practice to include inline event
      handlers.
      > Read the docs for the event utility and use that.
      >
      > Actually, a better way to do it with the TreeView would be to create
      > plain TextNodes with the label "Account Selection" and such, and set a
      > single listener for labelClickEvent. That event will receive a
      > reference to the node clicked. From the information on that node you
      > can build the URL on the fly.
      >
      > Satyam
      >
      >
      > john_bell_sas wrote:
      > > Sorry - Let me try to clear things up.
      > >
      > > Here is an example of two child nodes with the same parent (node2):
      > >
      > > var node3 = new YAHOO.widget.HTMLNode ('<a href="#self"
      > > onclick="makeRequest("http:/SASStoredProcess/do?_program=SBIP%3A%
      > > 2F%2FFoundation%2FBIP+Tree%2FReportStudio%2FShared%2FReports%
      > > 2FStoredProcesses%2FBunge+Manage+Cntrl+Tables%28StoredProcess%
      > > 29&_action=strip&_debug=&cntrl_table_nm=acct_select ");return
      > > doSubmit()">Account Selection </a>',node2 ,false,true);
      > >
      > > var node4 = new YAHOO.widget.HTMLNode ('<a href="#self"
      > > onclick="makeRequest("http:/SASStoredProcess/do?_program=SBIP%3A%
      > > 2F%2FFoundation%2FBIP+Tree%2FReportStudio%2FShared%2FReports%
      > > 2FStoredProcesses%2FBunge+Manage+Cntrl+Tables%28StoredProcess%
      > > 29&_action=strip&_debug=&cntrl_table_nm=bgm_ind ");return
      > > doSubmit()">Business Units to Industries </a>',node2 ,false,true);
      > >
      > > The first time the user expands the tree and clicks on node3 -
      > > everything works perfectly. If the user clicks on node4, things also
      > > work nicely. However, if the user then clicks on node3, the html
      > > from node4 is what is shown. In fact, node4 continues to be shown
      > > (regardless of what node the user clicks under node2) UNLESS the user
      > > expands another tree and selects a different node.
      > >
      > >
      > > I think there is some type of caching going on. If the user waits
      > > long enough - then node3 will show up after the user selects it. I
      > > do have these statements in the header:
      > >
      > > <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
      > > <META HTTP-EQUIV="Expires" CONTENT="-1">
      > >
      > > I can't figure out it it's the Treeview object or Internet Explorer
      > > causing issues. I'm just curious if anyone has seen this behavior.
      > >
      > >
      > > Thanks,
      > >
      > > John
      > >
      > >
      > >
      > >
      > > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
      > >
      > >> I've been trying to understand what you mean, but couldn't. What
      > >>
      > > you
      > >
      > >> mean when you say 'render' and 'submit', aren't all branches
      > >>
      > > rendered
      > >
      > >> from the start? Submit to what? HTML forms submit, TreeView
      > >>
      > > trees, as
      > >
      > >> far as I know, don't.
      > >>
      > >> Satyam
      > >>
      > >>
      > >> john_bell_sas wrote:
      > >>
      > >>> Hello,
      > >>>
      > >>> Thanks again for all your hard work! It's great stuff.
      > >>>
      > >>>
      > >>> I'm curious if anyone has come across a similar issue -
      > >>>
      > >>> I'm using the treeview with html nodes. Everything works great
      > >>>
      > > the
      > >
      > >>> first time I select the node. However, if I select a new node
      > >>>
      > > and then
      > >
      > >>> go back and select my previously select node it will not render
      > >>>
      > > the
      > >
      > >>> previous node. The tree still submits the new node that I had
      > >>> selected. I've tried collapsing the nodes, but it seems that I
      > >>>
      > > can
      > >
      > >>> only select the node once - unless I refresh the entire page.
      > >>>
      > >>> Has anyone seen something similar?
      > >>>
      > >>>
      > >>> Thanks,
      > >>>
      > >>> John
      > >>>
      > >>>
      > >>> ------------------------------------
      > >>>
      > >>> Yahoo! Groups Links
      > >>>
      > >>>
      > >>>
      > >>> ------------------------------------------------------------------
      > >>>
      > > ------
      > >
      > >>> No virus found in this incoming message.
      > >>> Checked by AVG - http://www.avg.com
      > >>> Version: 8.0.169 / Virus Database: 270.6.13/1642 - Release Date:
      > >>>
      > > 29/08/2008 18:12
      > >
      > >>>
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      ------------------------------------------------------------------------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - http://www.avg.com
      > > Version: 8.0.169 / Virus Database: 270.6.13/1642 - Release Date:
      29/08/2008 18:12
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.