You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lars Geldner <ge...@gmx.net> on 2006/10/24 21:15:25 UTC

CForms: tree widget sample

Dear Cocoon users and developers,

in a pilot project I want to write a CForms tree widget to visualize a hierarchical structure stored in a database. I've studied the CForms tutorial at Apache's Cocoon site but the information was very "basic".
Is there any best practice guide/samples how to write a (Java-) Tree Model based on a database for a tree widget?

Thanks in advance!

Regards,

Lars Geldner
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CForms: tree widget sample

Posted by Fred Vos <fr...@fredvos.org>.
On Tue, Oct 24, 2006 at 09:15:25PM +0200, Lars Geldner wrote:
> Dear Cocoon users and developers,
> 
> in a pilot project I want to write a CForms tree widget to visualize a hierarchical structure stored in a database. I've studied the CForms tutorial at Apache's Cocoon site but the information was very "basic".
> Is there any best practice guide/samples how to write a (Java-) Tree Model based on a database for a tree widget?
> 
> Thanks in advance!
> 
> Regards,
> 
> Lars Geldner

Hello Lars (and Tino),

Making a Tree model based on the samples is not easy. For a pilot project we
started about a year ago at work, we needed a tree model based on an XML
document. I managed to create a working 'thing', but that reads an XML document
using an URI, like "file:///path/to/document.xml" or
"http://my.domain.org/my/document.xml". It cannot use SAX events, so it cannot
use "cocoon:", it uses an extra library (xom) and uses code from the
samples. People asked me to submit my code, but I think it's not a good idea
to use it, unless you don't have a choice.

I'm not an experienced Cocoon developer. The CForms stuff is really difficult
to comprehend and I think the tree widget is the most complicated of all
widgets. You'll see that the code of the tree widget still has an
experimental/demo status.

If we had a tree widget that could be initialized with a static piece of XML
in the form definition or with an 'external' XML document or using javascript,
that would suffice everyone's needs. See the selection list widget. I tried to
find out how to change the code for this, but one needs a lot of time to do
that, and a tutor. If someone wants to introduce me or others to the CForms
code, I'd like to build this, in cooperation with others. Next years hackaton?
Anyone?

For your tree widget, based on a database, you can use my code as a sample and
I can help you getting this tree model working, but I still think the solution
in the previous paragraph is the way to go. If you want my code, send me an
e-mail and I'll help you until it works.

Fred

-- 
|E  R
| D  F
|
|fred at fredvos dot org
|5235 DG 52 NL +31 73 6411833

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CForms: tree widget sample

Posted by Tino Breddin <s9...@inf.tu-dresden.de>.
Hi Lars,

i was looking for a similar solution, but didn't find anything, too. I
would appreciate some help by more experienced users on this topic.

Thanks,
Tino

> Dear Cocoon users and developers,
>
> in a pilot project I want to write a CForms tree widget to visualize a
> hierarchical structure stored in a database. I've studied the CForms
> tutorial at Apache's Cocoon site but the information was very "basic".
> Is there any best practice guide/samples how to write a (Java-) Tree Model
> based on a database for a tree widget?
>
> Thanks in advance!
>
> Regards,
>
> Lars Geldner
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org