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

[ydn-javascript] YUI TreeView Problem

Expand Messages
  • YUIfan
    Hi, I am generating nodes for my tree view dynamically from a JSON string. JSON string has folder names and file names. My problem is for file names the tree
    Message 1 of 2 , Sep 2, 2009
    • 0 Attachment
      Hi,

      I am generating nodes for my tree view dynamically from a JSON string.
      JSON string has folder names and file names. My problem is for file names
      the tree view should show word icons and for folder names it should show
      only folder icons. I am able to show folder icons but not the word icons.
      What I am trying to achieve is if the tree sees any .doc in the JSON string
      then it should display word icon else folder icon. I also have right click
      on each node. That should also work in every condition. Any help is
      appreciated.

      Raj
      --
      View this message in context: http://www.nabble.com/YUI-TreeView-Problem-tp25248611p25248611.html
      Sent from the ydn-javascript mailing list archive at Nabble.com.
    • Satyam
      Terminal nodes have a different className assigned as those which do have children, see: http://developer.yahoo.com/yui/treeview/#style otherwise, one of the
      Message 2 of 2 , Sep 2, 2009
      • 0 Attachment
        Terminal nodes have a different className assigned as those which do
        have children, see:

        http://developer.yahoo.com/yui/treeview/#style

        otherwise, one of the properties of a Node is className:

        http://developer.yahoo.com/yui/docs/YAHOO.widget.Node.html#property_className

        Either way, you can change the icons used to represent each kind of
        node, as done in the several examples that go with the user guide, such as:

        http://developer.yahoo.com/yui/examples/treeview/customicons.html

        Satyam

        YUIfan escribió:
        > Hi,
        >
        > I am generating nodes for my tree view dynamically from a JSON string.
        > JSON string has folder names and file names. My problem is for file names
        > the tree view should show word icons and for folder names it should show
        > only folder icons. I am able to show folder icons but not the word icons.
        > What I am trying to achieve is if the tree sees any .doc in the JSON string
        > then it should display word icon else folder icon. I also have right click
        > on each node. That should also work in every condition. Any help is
        > appreciated.
        >
        > Raj
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/01/09 20:03:00
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.