You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by newbie newbie <co...@gmail.com> on 2013/07/10 06:06:43 UTC

How to use Checkbox with Tree

Hi,
I am trying to implement a tree. I want users to be able to select leaf
nodes by clicking on checkbox at each leaf nodes. But it is currently not
working with the checkbox. The tree cannot expand.

Here is my tml code fragment

<t:zone t:id="treeZone" id="treeZone">
     <t:tree t:id="Tree" t:model="treeModel" t:node="treeNode" >
          <p:label>
                <t:if test="treeNode.leaf">
                        <input t:id="leafNode" t:type="checkbox"
value="leaf" />
                        ${treeNode.label}

                    <p:else>
                         ${treeNode.label}
                    </p:else>
                </t:if>
           </p:label>
       </t:tree>
</t:zone>

If I take away <input t:id="leafNode" t:type="checkbox" value="leaf" />,
then the tree can expand. But I need the checkbox. Any help would be
appreciated. Thanks.

Re: How to use Checkbox with Tree

Posted by Lance Java <la...@googlemail.com>.
I think you might be getting an exception. Do you have a @Property on your
page named "leaf"

<input t:id="leafNode" t:type="checkbox" value="leaf" />

Try looking at the network traffic using the developer tools in your
browser. There's possibly an error response? It should be reported in your
error logs too.