Sean:

The big reason is I have a third-party method that returns a list of
*any number* of transactions, it could 4 or 30:

Transaction 1
Transaction 2 
Transaction 3 
Transaction 4

Not knowing the number or the number of transactions always changes is
the challenge.

The other change is each Transaction has *any number* of child
transactions.

Transaction 1
|_ Child Transaction 1
        |_ Child Transaction 1
Transaction 2
|_ Child Transaction 2
Transaction 3
|_ Child Transaction 3
        |_ Child Transaction 3
                |_ Child Transaction 3
Transaction 4
|_ Child Transaction 4


Thus, I need to dynamically create the list of transactions and when I
click on a transaction I need to figure out how to run an event that
gets the child transaction. When I click on the child transaction, I
need to get it's child as well...

That's why a lack of documentation had me pulling my hair out at first.

I am slowly figuring out a solution...

Thanks,

--Todd


 


-----Original Message-----
From: Sean Schofield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 07, 2006 6:20 PM
To: MyFaces Discussion
Subject: Re: How does DefaultTreeModel and HtmlTree relate?

Just out of curiosity, why are you creating an HtmlTree in java code?
Normally you would just use the JSP tags and backing beans or extend one
of the classes.  Creating it directly seems strange but I'm sure you
have your reasons.

Sean

On 6/7/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> Ok, you can post it here before.
> but wiki has also *notification* mails, when sb. addes content to it.
>
> Sounds good to me. Looking forward to see your work.
>
> -Matthias
>
> On 6/7/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
> > Matthias: Already ahead of you on that.
> >
> > I'm documenting as I develop and learn all about the HtmlTree.
> >
> > I really didn't mean to complain, (Sorry, I guess I did...) - it's 
> > just important that information on how to use *ALL* of MyFaces is
available.
> >
> > Not just "Hello World" crap.
> >
> > My $.02
> >
> > Anyways, I'll submit my documentation here first before I post it 
> > too the WIKI.
> >
> > Thanks,
> >
> > --Todd
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

> > Of Matthias Wessendorf
> > Sent: Wednesday, June 07, 2006 4:53 PM
> > To: MyFaces Discussion
> > Subject: Re: How does DefaultTreeModel and HtmlTree relate?
> >
> > Todd-
> >
> > cool that you figured out how things are working.
> > since you complain about lack of documentation, I'd like to ask you 
> > to help out in this area. Can you go ahead an create some 
> > documentation in our wiki ?
> >
> > Thanks,
> > Matthias
> >
> > On 6/7/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Ok, I think this would work:
> > >
> > > HtmlTree tree = (HtmlTree)
> > > application.createComponent(HtmlTree.COMPONENT_TYPE);
> > >
> > >
> > tree.setRendererType("org.apache.myfaces.custom.tree.renderkit.html.
> > Html
> > TreeRenderer");
> > >         tree.setId("tree");
> > >         ValueBinding vb =
> > > application.createValueBinding("#{tbrowser.treeModel}");
> > >         tree.setValueBinding("value", vb);
> > >
> > >         tree.setVar("treeItem");
> > >         tree.setStyleClass("tree");
> > >         tree.setNodeClass("treenode");
> > >         tree.setRowClasses("a, b");
> > >         tree.setColumnClasses("col1, col12");
> > >         tree.setSelectedNodeClass("treenodeSelected");
> > >
> > >
> > > And my getter is still valid.
> > >
> > >
> > > public DefaultTreeModel getTreeModel() {
> > >         return treeModel;
> > > }
> > >
> > >
> > > Thanks,
> > >
> > > --Todd
> > >
> > >  ________________________________
> > >  From: Todd Patrick
> > > Sent: Wednesday, June 07, 2006 4:38 PM
> > > To: 'MyFaces Discussion'
> > > Subject: How does DefaultTreeModel and HtmlTree relate?
> > >
> > >
> > >
> > > I've created a HtmlTree in Java code:
> > >
> > > HtmlTree tree = (HtmlTree)
> > > application.createComponent(HtmlTree.COMPONENT_TYPE);
> > >
> > >
> > tree.setRendererType("org.apache.myfaces.custom.tree.renderkit.html.
> > Html
> > TreeRenderer");
> > >         tree.setId("tree");
> > >         tree.setVar("treeItem");
> > >         tree.setStyleClass("tree");
> > >         tree.setNodeClass("treenode");
> > >         tree.setRowClasses("a, b");
> > >         tree.setColumnClasses("col1, col12");
> > >         tree.setSelectedNodeClass("treenodeSelected");
> > >
> > > How do I apply the DefaultTreeModel that I am returning from a
getter?
> > >
> > > public DefaultTreeModel getTreeModel() {
> > >         return treeModel;
> > > }
> > >
> > > I know that the getter does return a valid DefaultTreeModel
object.
> > >
> > > How does DefaultTreeModel and HtmlTree relate?
> > >
> > > Thanks,
> > >
> > > --Todd
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > Aechterhoek 18
> > 48282 Emsdetten
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> Aechterhoek 18
> 48282 Emsdetten
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>

Reply via email to