You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Tomzi <Th...@gmx.at> on 2007/07/19 14:32:34 UTC
[tree2] expand folder by clickling on folder name
I'd like to have to open a folder not only by clicking on +/- but also when I
click on the folders name - Is there a way to accomplish that with tree2?
--
View this message in context: http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11687822
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [tree2] expand folder by clickling on folder name
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
I don't use JS approach, so can't help you. You should look look in
.js scripts how +/- work.
On 20/07/07, Tomzi <Th...@gmx.at> wrote:
>
> Tank you very much! But I'm looking for a javascript approch, since my tree
> is fairly big (300 nodes) And I don't want to have the whole tree rebuild.
> Is there a way to do this using javascript, without having to contact the
> server. Since +/- seems not to contact the server, but open it using
> javascript.
>
>
>
> Michał 'Gandalf' Stawicki wrote:
> >
> > <f:facet name="objectProperties">
> >
> > <t:commandLink
> > styleClass="properties"
> > actionListener="#{t.setNodeSelected}">
> > <t:outputText
> > value="#{node.description}"
> > style="#{t.nodeSelected ? 'font-weight: bold; color: #FF3366' :
> > ''}" />
> > <t:updateActionListener
> > property="#{reservationsManager.selectedNode}"
> > value="#{node}"/>
> > <f:param name="docNum" value="#{node.identifier}"/>
> > </t:commandLink>
> > </t:panelGrid>
> > </f:facet>
> >
> > In the setSelectedNode(TreeNode node) method, for ex.:
> >
> > String id = treeBinding.getNodeId();
> > String [] path = treeBinding.getPathInformation(id);
> > treeBinding.expandPath(path);
> >
> >
> >
> > On 19/07/07, Tomzi <Th...@gmx.at> wrote:
> >>
> >> I'd like to have to open a folder not only by clicking on +/- but also
> >> when I
> >> click on the folders name - Is there a way to accomplish that with tree2?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11687822
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Michał Stawicki
> >
> > stawicki@gmail.com
> > http://stawicki.jasliska.pl
> >
> >
>
> --
> View this message in context: http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11703840
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
--
Michał Stawicki
stawicki@gmail.com
http://stawicki.jasliska.pl
Re: [tree2] expand folder by clickling on folder name
Posted by Tomzi <Th...@gmx.at>.
Tank you very much! But I'm looking for a javascript approch, since my tree
is fairly big (300 nodes) And I don't want to have the whole tree rebuild.
Is there a way to do this using javascript, without having to contact the
server. Since +/- seems not to contact the server, but open it using
javascript.
Michał 'Gandalf' Stawicki wrote:
>
> <f:facet name="objectProperties">
>
> <t:commandLink
> styleClass="properties"
> actionListener="#{t.setNodeSelected}">
> <t:outputText
> value="#{node.description}"
> style="#{t.nodeSelected ? 'font-weight: bold; color: #FF3366' :
> ''}" />
> <t:updateActionListener
> property="#{reservationsManager.selectedNode}"
> value="#{node}"/>
> <f:param name="docNum" value="#{node.identifier}"/>
> </t:commandLink>
> </t:panelGrid>
> </f:facet>
>
> In the setSelectedNode(TreeNode node) method, for ex.:
>
> String id = treeBinding.getNodeId();
> String [] path = treeBinding.getPathInformation(id);
> treeBinding.expandPath(path);
>
>
>
> On 19/07/07, Tomzi <Th...@gmx.at> wrote:
>>
>> I'd like to have to open a folder not only by clicking on +/- but also
>> when I
>> click on the folders name - Is there a way to accomplish that with tree2?
>> --
>> View this message in context:
>> http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11687822
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Michał Stawicki
>
> stawicki@gmail.com
> http://stawicki.jasliska.pl
>
>
--
View this message in context: http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11703840
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [tree2] expand folder by clickling on folder name
Posted by Tomzi <Th...@gmx.at>.
Is there also a way to do this using javascript, without having to contact
the server. Since +/- seems not to contact the server, but open it using
javascript
Michał 'Gandalf' Stawicki wrote:
>
> <f:facet name="objectProperties">
>
> <t:commandLink
> styleClass="properties"
> actionListener="#{t.setNodeSelected}">
> <t:outputText
> value="#{node.description}"
> style="#{t.nodeSelected ? 'font-weight: bold; color: #FF3366' :
> ''}" />
> <t:updateActionListener
> property="#{reservationsManager.selectedNode}"
> value="#{node}"/>
> <f:param name="docNum" value="#{node.identifier}"/>
> </t:commandLink>
> </t:panelGrid>
> </f:facet>
>
> In the setSelectedNode(TreeNode node) method, for ex.:
>
> String id = treeBinding.getNodeId();
> String [] path = treeBinding.getPathInformation(id);
> treeBinding.expandPath(path);
>
>
>
> On 19/07/07, Tomzi <Th...@gmx.at> wrote:
>>
>> I'd like to have to open a folder not only by clicking on +/- but also
>> when I
>> click on the folders name - Is there a way to accomplish that with tree2?
>> --
>> View this message in context:
>> http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11687822
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Michał Stawicki
>
> stawicki@gmail.com
> http://stawicki.jasliska.pl
>
>
--
View this message in context: http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11703840
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [tree2] expand folder by clickling on folder name
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
<f:facet name="objectProperties">
<t:commandLink
styleClass="properties"
actionListener="#{t.setNodeSelected}">
<t:outputText
value="#{node.description}"
style="#{t.nodeSelected ? 'font-weight: bold; color: #FF3366' : ''}" />
<t:updateActionListener
property="#{reservationsManager.selectedNode}"
value="#{node}"/>
<f:param name="docNum" value="#{node.identifier}"/>
</t:commandLink>
</t:panelGrid>
</f:facet>
In the setSelectedNode(TreeNode node) method, for ex.:
String id = treeBinding.getNodeId();
String [] path = treeBinding.getPathInformation(id);
treeBinding.expandPath(path);
On 19/07/07, Tomzi <Th...@gmx.at> wrote:
>
> I'd like to have to open a folder not only by clicking on +/- but also when I
> click on the folders name - Is there a way to accomplish that with tree2?
> --
> View this message in context: http://www.nabble.com/-tree2--expand-folder-by-clickling-on-folder-name-tf4110244.html#a11687822
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
--
Michał Stawicki
stawicki@gmail.com
http://stawicki.jasliska.pl