myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek" <gerhard.petra...@gmail.com>
Subject Re: [Trinidad] tr:navigationTree or tr:tree nodes opened and closed afeter click on link or navigationItem
Date Thu, 13 Dec 2007 11:51:21 GMT
hello tomek,

the approach i've in mind is similar to your second one.

if i remember correctly, the challenge is:
within the action listener you don't have the "context" of your command
component (within the tree component).

that's the reason why you have to add hidden information (to supply
information about the position of each command component within the tree).
you can use this information to open the target node... (as i said - it's
unaesthetic handwork)

however, maybe there will be better suggestions for your specific
requirement within the next few days.
(as i mentioned - the problem i solved is not the same - it's just related)

regards,
gerhard



2007/12/12, Tomek GoĊ‚embiewski <tgolembiewski@gmail.com>:
>
> Hello Gerhard
>
> I've spent some time on that issue and in my opinion there are to ways to
> achieve that basic tree functionality in Trinidad.
>
> 1. set on every container node onclick property with this:
>     _adftreeMainLayout_DrawView_TopView2_menuComponent.treeState.action('show','"+id+"',this);return
> false; (witch is exact onClick function on open node icon)
>    where _adftreeMainLayout_DrawView_TopView2_menuComponent depands of
> course on apps, and id is id of link node.
>
> problems with this approach:
>  a) container nodes with this onClick hardly can do anything else then
> opening node, fte nodes in navigation tree only opens and do not set focus
> from menu model with breadcrumbs component
>  b) id of item nodes are generated in some enigmatic way to me. In
> know there is a way to get them from code but now i only can hardcode those id in menuItem
> I mean those ids: MainLayout:DrawView:TopView2:menuComponent:0:link,
> MainLayout:DrawView:TopView2:menuComponent:1:link,
> MainLayout:DrawView:TopView2:menuComponent:2:link etc etc.
>  c) implementing a closing menu item with the same js its difficult, I
> have to save some where in js array state of each node maybe with is quite
> stupid cos tree knows what is its state on java side.
>
> 2 approach is to use action listener and build RowKeySet connected to
> disclosedRowKeys property add every time user click container
> node add new RowKey entry and reload tree via ppr
>
>
> I implemented
> 1 solution 'cos I cant find how to build properly RowKeySet Object from scratch.
> I'm not very happy with this solution.
>
> If You solved those issue somehow I'll appreciate any help on that.
>
> best regards Tomek
>
>
> On 12/12/07, Gerhard Petracek <gerhard.petracek@gmail.com> wrote:
> >
> > hello tomek,
> >
> > at the moment i'm not aware of an out-of-the-box functionality, which
> > meets your requirement.
> > however, i already implemented something similar. it's a lot of
> > unaesthetic handwork.
> > if there is no other suggestion and you really need this functionality,
> > i'll look into your specific requirement.
> >
> > regards,
> > gerhard
> >
> >
> >
> > 2007/12/12, Tomek GoĊ‚embiewski < tgolembiewski@gmail.com>:
> > >
> > > Is it possible to open a node in tree with click on link f.t.e.
> > > navigationItem link and not only on plus and minus sign in tree? The same
> > > for navigation tree.
> > > How to achieve that? Maybe someone could post an example code?
> > >
> > > regards
> > > Tomek
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces
Mime
View raw message