myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Dickey" <bDic...@youngliving.com>
Subject Re: <x:tree> folder.gif
Date Thu, 17 Mar 2005 22:04:11 GMT
This should work (for the old tree table comp, which may be replaced
soon - see archived "tree2" messages):

*In JSP:
<x:tree ...>
....
<x:iconProvider type="backing.TreeBean"/>
</x:tree>


*In backing bean:

import org.apache.myfaces.custom.tree.IconProvider;

public class TreeBean implements IconProvider {
....
//interface IconProvider (path to node icon)
public String getIconUrl(Object arg0, int arg1, boolean arg2) {
    return "images/tree/node.gif";
}
}

-Bryan

>>> aaronbartell@gmail.com 03/16/05 10:29PM >>>
Version: 1.0.8

I am making use of the <x:tree> component but am having trouble getting

the folder.gif icon to show up in my app, though it shows up fine in 
myfaces-examples.  I am not seeing where I can specify a particular 
image for this.  The rest of the icon's show up just fine.  Another 
fella has this same problem in the forums, but nobody has replied to
him 
yet.

Thoughts?  Thanks in advance,
Aaron Bartell

Here is my code:
        <x:tree id="tree"                
                value="#{MainCtl.treeModel}"
                var="treeItem"
                styleClass="tree"
                nodeClass="treenode"
                headerClass="treeHeader"
                footerClass="treeFooter"
                rowClasses="a, b"
                columnClasses="col1, col2"
                selectedNodeClass="treenodeSelected"
                expandRoot="true"                       
                iconChildFirst="/images/tree/line_first.gif"\
                iconChildMiddle="/images/tree/line_middle.gif"
                iconChildLast="/images/tree/line_last.gif"

                iconLine="/images/tree/line.gif"
                iconNoline="/images/tree/noline.gif"
               
                iconNodeClose="/images/tree/node_close.gif"    
                          
                iconNodeCloseFirst="/images/tree/node_close_first.gif"
                iconNodeCloseLast="/images/tree/node_close_last.gif"
               
iconNodeCloseMiddle="/images/tree/node_close_middle.gif"
               
                iconNodeOpen="/images/tree/node_open.gif"              

                iconNodeOpenFirst="/images/tree/node_open_first.gif"
                iconNodeOpenLast="/images/tree/node_open_last.gif"
                iconNodeOpenMiddle="/images/tree/node_open_middle.gif"
                >
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Header 1" />
                </f:facet>
                   <h:outputText value="#{treeItem.isoCode}" />
            </h:column>
            <x:treeColumn>
                <f:facet name="header">
                    <h:outputText value="Header 2" />
                </f:facet>
                <h:outputText value="#{treeItem.name}" />
            </x:treeColumn>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Header 3" />
                </f:facet>
                <h:outputText value="#{treeItem.description}" />
            </h:column>
            <f:facet name="footer">
                <h:outputText value="Footer" />
            </f:facet>
         </x:tree>

Mime
View raw message