views:

71

answers:

2

Hi!

I am wondering.. is tree view/navigation possible to do (and somewhat easily) in XForms given a XML data structure?

If it is possible, where can I find a really excellent example (code and hopefully a working form to view)?

Also, are there any tips you have for implementing this? (I'm new to XForms, and only know the basics so far)

Thanks so much!

:D

A: 

Hi!

Did you have a look at http://en.wikibooks.org/wiki/XForms/Folding_Menus ??

-Alain

Alain Couthures
Thanks! I'll look into this code to see if it is the solution that works best for me.
developer
+1  A: 

I am not sure what you mean exactly by "tree navigation", but if you have a tree-like structure with arbitrary nesting in XML, and want to show it to end-users as a tree, you can if using Orbeon Forms, you can use the appearance="xxforms:tree" on a <xforms:select1> or <xforms:select>. See for instance:

http://wiki.orbeon.com/forms/how-to/icons-tree

This will be rendered as a tree on you web page, e.g.:

Tree screenshot

Alessandro Vernet
I guess I needed to use the word menu? But yes, this seems like what I would like to do. I would need to add events to this though too (to make it act like a menu), right? Also.. I need to be using the Orbeon engine no?
developer
Also, this seems like a really clean solution. But I'm interested to know what you see as the benefits of doing it this way as opposed to the other solution currently provided? The reason I ask is because I can test out the other solution now, but with yours I would have to get the Orbeon engine without testing it out first.. right?
developer
@iHeartGreek, the other solution from Wikibooks is also perfectly valid. It depends on the XForms extension for Firefox, so it won't work if some of your users are not all using Firefox. And on the other side, the solution I proposed depends on you using Orbeon Forms on the server, but it will then work with all the major browsers. So each one has its benefits and drawbacks.
Alessandro Vernet