You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Zha Minjie <ma...@msn.com> on 2007/01/11 09:09:06 UTC

Some issues using TreeView in Tapestry4

Hi all:
  I am using TreeView component in Tapestry4, but I encounter the following 
issue:
1. The root node is displayed, but I can expand or collapse the nodes only 
when I click at the node , and it won't work if I click at the name of the 
element.
2. I want to change the icons of Node,  but it just doesn't work.
Here is my Home.page and Home.html:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<page-specification class="tree.Home">
    <asset name="closeNodeImage" path="/img/TreeClosed.gif"/>
    <asset name="openNodeImage" path="/img/TreeOpen.gif"/>
    
    <component id="treeView" type="contrib:TreeView">
        <binding name="treeModel" value="treeModel"/>
    </component>
    <component id="treeDataView" type="contrib:TreeDataView">
    	<binding name="treeView" value="components.treeView"/>
    </component>
    <component id="treeNodeView" type="contrib:TreeNodeView">
    	<binding name="treeDataView" value="components.treeDataView"/>
        <!--<binding name="showNodeImages" value="true"/>-->
        <binding name="closeNodeImage" value="asset:closeNodeImage"/>
        <binding name="openNodeImage" value="asset:openNodeImage"/>
    </component>
</page-specification>
-------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Home.html</title>

  </head>
  
  <body>
    <span jwcid="@Insert" value="Hello World">hello</span>
    <span jwcid="treeView">
    	<span jwcid="treeDataView">
    		<span jwcid="treeNodeView"/>
    	</span>
    </span>
  </body>
</html>

Home.page and Home.html are in WebRoot directory. TreeClosed.gif and 
TreeOpen.gif are in WebRoot/img.
Is there anything I missed?
Thanks.

-------------
白云偶尔遮住蓝天,但蓝天永远在白云之上。

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Some issues using TreeView in Tapestry4

Posted by Zha Minjie <ma...@msn.com>.
  Thanks a lot. I have suffered a lot using it. My original goal is to 
implements some AJAX-like function using it, but I think I should turn to 
Tacos now. Tacos is really very cool.
-------------
����ż����ס���죬��������Զ�ڰ���֮�ϡ�




>From: "Renat Zubairov" <re...@gmail.com>
>Reply-To: "Tapestry users" <us...@tapestry.apache.org>
>To: "Tapestry users" <us...@tapestry.apache.org>
>Subject: Re: Some issues using TreeView in Tapestry4
>Date: Thu, 11 Jan 2007 12:36:59 +0300
>
>Hello,
>
>I have a working project with TreeView inside. As I understood
>TreeView component is close to be deprecated.
>I also tried to change icons on the tree, unfortunately without
>success, therefore I've just changed the source code of the
>treenodeview components to include the icons I have. I've hacked it 
>a
>bit, with some refactoring and the staff, if you are interested I 
>can
>send result to you.
>
>Renat
>
>On 11/01/07, Zha Minjie <ma...@msn.com> wrote:
>>Hi all:
>>   I am using TreeView component in Tapestry4, but I encounter the 
>>following
>>issue:
>>1. The root node is displayed, but I can expand or collapse the 
>>nodes only
>>when I click at the node , and it won't work if I click at the name 
>>of the
>>element.
>>2. I want to change the icons of Node,  but it just doesn't work.
>>Here is my Home.page and Home.html:
>><?xml version="1.0" encoding="UTF-8"?>
>><!DOCTYPE page-specification PUBLIC
>>"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
>>"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
>><page-specification class="tree.Home">
>>     <asset name="closeNodeImage" path="/img/TreeClosed.gif"/>
>>     <asset name="openNodeImage" path="/img/TreeOpen.gif"/>
>>
>>     <component id="treeView" type="contrib:TreeView">
>>         <binding name="treeModel" value="treeModel"/>
>>     </component>
>>     <component id="treeDataView" type="contrib:TreeDataView">
>>         <binding name="treeView" value="components.treeView"/>
>>     </component>
>>     <component id="treeNodeView" type="contrib:TreeNodeView">
>>         <binding name="treeDataView" 
>>value="components.treeDataView"/>
>>         <!--<binding name="showNodeImages" value="true"/>-->
>>         <binding name="closeNodeImage" 
>>value="asset:closeNodeImage"/>
>>         <binding name="openNodeImage" 
>>value="asset:openNodeImage"/>
>>     </component>
>></page-specification>
>>-------------------------------------------------
>><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>><html>
>>   <head>
>>     <title>Home.html</title>
>>
>>   </head>
>>
>>   <body>
>>     <span jwcid="@Insert" value="Hello World">hello</span>
>>     <span jwcid="treeView">
>>         <span jwcid="treeDataView">
>>                 <span jwcid="treeNodeView"/>
>>         </span>
>>     </span>
>>   </body>
>></html>
>>
>>Home.page and Home.html are in WebRoot directory. TreeClosed.gif 
>>and
>>TreeOpen.gif are in WebRoot/img.
>>Is there anything I missed?
>>Thanks.
>>
>>-------------
>>白云偶尔遮住蓝天,但蓝天永远在白云之上�&#8364;�
>>
>>_________________________________________________________________
>>与联机的朋友进行交流,请使用 MSN Messenger:  
>>http://messenger.msn.com/cn
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>--
>Best regards,
>Renat Zubairov

_________________________________________________________________
������� MSN Explorer:   http://explorer.msn.com/lccn/  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Some issues using TreeView in Tapestry4

Posted by Renat Zubairov <re...@gmail.com>.
Hello,

I have a working project with TreeView inside. As I understood
TreeView component is close to be deprecated.
I also tried to change icons on the tree, unfortunately without
success, therefore I've just changed the source code of the
treenodeview components to include the icons I have. I've hacked it a
bit, with some refactoring and the staff, if you are interested I can
send result to you.

Renat

On 11/01/07, Zha Minjie <ma...@msn.com> wrote:
> Hi all:
>   I am using TreeView component in Tapestry4, but I encounter the following
> issue:
> 1. The root node is displayed, but I can expand or collapse the nodes only
> when I click at the node , and it won't work if I click at the name of the
> element.
> 2. I want to change the icons of Node,  but it just doesn't work.
> Here is my Home.page and Home.html:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE page-specification PUBLIC
> "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> <page-specification class="tree.Home">
>     <asset name="closeNodeImage" path="/img/TreeClosed.gif"/>
>     <asset name="openNodeImage" path="/img/TreeOpen.gif"/>
>
>     <component id="treeView" type="contrib:TreeView">
>         <binding name="treeModel" value="treeModel"/>
>     </component>
>     <component id="treeDataView" type="contrib:TreeDataView">
>         <binding name="treeView" value="components.treeView"/>
>     </component>
>     <component id="treeNodeView" type="contrib:TreeNodeView">
>         <binding name="treeDataView" value="components.treeDataView"/>
>         <!--<binding name="showNodeImages" value="true"/>-->
>         <binding name="closeNodeImage" value="asset:closeNodeImage"/>
>         <binding name="openNodeImage" value="asset:openNodeImage"/>
>     </component>
> </page-specification>
> -------------------------------------------------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
>   <head>
>     <title>Home.html</title>
>
>   </head>
>
>   <body>
>     <span jwcid="@Insert" value="Hello World">hello</span>
>     <span jwcid="treeView">
>         <span jwcid="treeDataView">
>                 <span jwcid="treeNodeView"/>
>         </span>
>     </span>
>   </body>
> </html>
>
> Home.page and Home.html are in WebRoot directory. TreeClosed.gif and
> TreeOpen.gif are in WebRoot/img.
> Is there anything I missed?
> Thanks.
>
> -------------
> 白云偶尔遮住蓝天,但蓝天永远在白云之上。
>
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,
Renat Zubairov