You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nicolas Maisonneuve <n....@hotpop.com> on 2003/11/10 18:43:56 UTC

[WOODY] hierarchical representation of a multivaluefield

hy,
i have to represent a hierachical tree in a form 
|
|-A
  |-A1
  |-A2
     |-A21
|- B
..
we can choose several values (A, A1,A21)
so it's a multivalue field
but how represent this with the woody framework
the html result would be like that :
<ul>
  <li><input type="checkbox" name="tree" value="A">A</input>
  <ul>
    <li><input..>A1</input></li>
    <li><input..>A2
    <ul>
      <li><input..>A21</li>
    </ul>
    </li>
  </ul>
  </li>
</ul>

thank in advance

nicolas maisonneuve

Re: [WOODY] hierarchical representation of a multivaluefield

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2003-11-10 at 18:43, Nicolas Maisonneuve wrote:
> hy,
> i have to represent a hierachical tree in a form 
> |
> |-A
>   |-A1
>   |-A2
>      |-A21
> |- B
> ..
> we can choose several values (A, A1,A21)
> so it's a multivalue field

but it is has a hierarchical list so it's not a multivalue field :-)

> but how represent this with the woody framework
> the html result would be like that :
> <ul>
>   <li><input type="checkbox" name="tree" value="A">A</input>
>   <ul>
>     <li><input..>A1</input></li>
>     <li><input..>A2
>     <ul>
>       <li><input..>A21</li>
>     </ul>
>     </li>
>   </ul>
>   </li>
> </ul>
>  
> thank in advance

Some thoughts:

* if the list of items in the tree is fixed, then use a set of
booleanfields

* it is possible to make a selection-list implementation that produces
whathever XML you want, thus also hierarchical data, though this might
be considered breaking the selection-list contract.

* if information on the hierarchy can be derived from the values or
labels in the selection-list, you could produce the hierarchical HTML
with XSLT (though it's not very simple).

* maybe this is a job for a yet-to-be-created tree widget (i.e. a
tree-variant of the repeater widget)

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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