You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "CONNER, BRENDAN (SBCSI)" <bc...@sbc.com> on 2005/06/30 20:08:54 UTC
Clicking on the + in Tree2
Here is something odd that I've noticed working in Tree2. To describe
it, here's a fragment from my JSP:
<x:tree2 id="serverTree" value="#{treeBacker.treeData}"
var="node" varNodeToggler="t" clientSideToggle="false">
<f:facet name="organization">
<h:panelGroup>
<h:commandLink immediate="true"
action="#{t.toggleExpanded}"
actionListener="#{treeBacker.processAction}">
<h:graphicImage
value="/images/reference_organizations.gif" border="0"/>
<f:actionListener
type="com.sbc.eia.aa.test.myfaces.examples.tree2.TreeBacker"/>
</h:commandLink>
<h:outputText value="#{node.name}"
style="font-family: arial; color: blue"/>
</h:panelGroup>
</f:facet>
...
</x:tree2>
When I click on the + icon, it appears that something is happening, but
the tree node doesn't expand. It's only when I click on the
reference_organizations.gif that the tree expands. This is
counter-intuitive to the user, since users are used to clicking on the
plus sign to expand a node. I looked at the generate HTML, and here's a
snippet showing the anchor generated by the Navigation control, followed
by the anchor corresponding to the gif I supply:
<td width="19" height="100%" valign="top"
background="/AaTreeTest1Web/faces/myFacesExtensionResource/tree2.HtmlTre
eRenderer/1113412660000/images/line-trunk.gif">
<a href="#"
onclick="clear_linkDummyForm();document.forms['linkDummyForm'].elements[
'autoScroll'].value=getScrolling();document.forms['linkDummyForm'].eleme
nts['linkDummyForm:_link_hidden_'].value='_id25';document.forms['linkDum
myForm'].elements['serverTree:org.apache.myfaces.tree.NAV_COMMAND'].valu
e='0:0:0:0:1';if(document.forms['linkDummyForm'].onsubmit){document.form
s['linkDummyForm'].onsubmit();}document.forms['linkDummyForm'].submit();
return false;" id="_id25">
<img id="_id24"
src="/AaTreeTest1Web/faces/myFacesExtensionResource/tree2.HtmlTreeRender
er/1113412660000/images/nav-plus-line-middle.gif" border="0" height="18"
width="19"/>
</a>
</td>
<td>
<a href="#"
onclick="clear__5Fid0();document.forms['_id0'].elements['autoScroll'].va
lue=getScrolling();document.forms['_id0'].elements['_id0:_link_hidden_']
.value='_id0:serverTree:0:0:0:0:1:_id7';if(document.forms['_id0'].onsubm
it){document.forms['_id0'].onsubmit();}document.forms['_id0'].submit();r
eturn false;" id="_id0:serverTree:0:0:0:0:1:_id7">
<img id="_id0:serverTree:0:0:0:0:1:_id8"
src="/AaTreeTest1Web/images/reference_organizations.gif" border="0"/>
</a>
<span style="font-family: arial; color:
blue">AES GEM</span>
</td>
Any idea why I have to click on my gif (rather than the plus sign
navigation icon) to get the node to expand?
- Brendan
Re: Clicking on the + in Tree2
Posted by aviking <av...@yahoo.com>.
Someone get the solution of this problem?
Thx
CONNER, BRENDAN (SBCSI) wrote:
>
> Here is something odd that I've noticed working in Tree2. To describe
> it, here's a fragment from my JSP:
>
> <x:tree2 id="serverTree" value="#{treeBacker.treeData}"
> var="node" varNodeToggler="t" clientSideToggle="false">
> <f:facet name="organization">
> <h:panelGroup>
> <h:commandLink immediate="true"
> action="#{t.toggleExpanded}"
>
> actionListener="#{treeBacker.processAction}">
> <h:graphicImage
> value="/images/reference_organizations.gif" border="0"/>
> <f:actionListener
> type="com.sbc.eia.aa.test.myfaces.examples.tree2.TreeBacker"/>
> </h:commandLink>
> <h:outputText value="#{node.name}"
> style="font-family: arial; color: blue"/>
> </h:panelGroup>
> </f:facet>
> ...
> </x:tree2>
>
> When I click on the + icon, it appears that something is happening, but
> the tree node doesn't expand. It's only when I click on the
> reference_organizations.gif that the tree expands. This is
> counter-intuitive to the user, since users are used to clicking on the
> plus sign to expand a node. I looked at the generate HTML, and here's a
> snippet showing the anchor generated by the Navigation control, followed
> by the anchor corresponding to the gif I supply:
>
> <td width="19" height="100%" valign="top"
> background="/AaTreeTest1Web/faces/myFacesExtensionResource/tree2.HtmlTre
> eRenderer/1113412660000/images/line-trunk.gif">
> #
> /AaTreeTest1Web/faces/myFacesExtensionResource/tree2.HtmlTreeRender
er/1113412660000/images/nav-plus-line-middle.gif
>
> </td>
> <td>
> #
> /AaTreeTest1Web/images/reference_organizations.gif
>
> AES GEM
> </td>
>
> Any idea why I have to click on my gif (rather than the plus sign
> navigation icon) to get the node to expand?
>
> - Brendan
>
>
--
View this message in context: http://www.nabble.com/Clicking-on-the-%2B-in-Tree2-tf113440.html#a12777292
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Clicking on the + in Tree2
Posted by Frank Langelage <fr...@lafr.de>.
CONNER, BRENDAN (SBCSI) wrote:
>Any idea why I have to click on my gif (rather than the plus sign
>navigation icon) to get the node to expand?
>
>- Brendan
>
>
>
We had the same problem a few weeks ago.
The x:tree2 was inside an h:form.