You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dev at weitling <de...@weitling.net> on 2006/09/26 19:46:14 UTC

Hints needed for tree widget

Hi y'all,

I'm stuck with creating a tree widget. One problem: I want to display
some xml (I got out of a database) as tree. How to do it? I could write
a Java class, of course, but isn't there a standard way from the nice
guys from Cocoon?
And: Did I get it right, that here is no binding at the moment?

Thanks and greetings,
Florian

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


Re: Hints needed for tree widget

Posted by Fred Vos <fr...@fredvos.org>.
Hello Florian,

On Tue, Sep 26, 2006 at 07:46:14PM +0200, Dev at weitling wrote:
> Hi y'all,
> 
> I'm stuck with creating a tree widget. One problem: I want to display
> some xml (I got out of a database) as tree. How to do it? I could write
> a Java class, of course, but isn't there a standard way from the nice
> guys from Cocoon?

We've had this problem before at work. For a pilot project I managed to create
a tree widget that can be initialized with an XML document from an
URI. Unfortunately this widget uses an extra jar (xom) to parse the xml
content and cannot use 'cocoon:...'  references, only 'file:///...' or
'http://...'. I'm not proud of the methods used to produce the tree. But the
thing works and since it's only a pilot, I did not want to spend too much time
on it. I've tried to make the widget more cocoon-like, so it could parse sax
events et cetera, but it was very difficult for me to understand the cforms
stuff. Furthermore the tree widget code is not set up like other
widgets. Sylvain Wallez did create a beautiful thing with the tree widget. I
can understand why it is difficult to make it behave more like other widgets,
like the selection list for example.

> And: Did I get it right, that here is no binding at the moment?

No, there's no binding.

If you still want to try this tree widget that reads from an XML document,
send me an e-mail and I'll send you everything you need.

Fred

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