Treeview to show complex data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Treeview to show complex data

Myxlyxl
Hello everybody,

What i try to achieve:

I have some relative complex data as xml, a small excerpt (real data is much more nested):

<?xml version="1.0" encoding="UTF-8"?>
<Tree>
<Agenten>
    <Agent Event="true" ID="AGENT601362799">
      <Bezeichner/>
      <Nachname>Mueller</Nachname>
      <Vorname>Thomas</Vorname>
      <Benutzername>mec</Benutzername>
      <Passwort>password</Passwort>
      <Sperrung>false</Sperrung>
      <Nachwahl>456</Nachwahl>
      <ANI/>
      <Permanentanmeldung>false</Permanentanmeldung>
      <TestDropDown/>
      <Zielrufnummer>0987654321</Zielrufnummer>
    </Agent>
    <Agent Event="true" ID="AGENT1202725572">
      <Bezeichner/>
      <Nachname>Dampf</Nachname>
      <Vorname>Hans</Vorname>
      <Benutzername>kli</Benutzername>
      <Passwort>password</Passwort>
      <Sperrung>false</Sperrung>
      <Nachwahl>123</Nachwahl>
      <ANI/>
      <Permanentanmeldung>false</Permanentanmeldung>
      <TestDropDown/>
      <DropTest2/>
      <Zielrufnummer>123456789</Zielrufnummer>
    </Agent>
  </Agenten>
</Tree>

Furthermore i have a schema-file with some meta-data for this xml.

I want to use a <xforms:select1> with appearance="xxforms:tree" to show the data in the xml. If you click on a node, the details of this node should appear.

The tree for the above example should look something like this:

Tree
      - Agenten
                - Thomas Mueller(AGENT601362799)
                - Hans Dampf(AGENT1202725572)

If one clicks e.g. on the node "Thomas Mueller" on the right of the tree the details (input-boxes, dropdown, or checkboxes...) for this entry should appear. Here e.g.

A Checkbox for "Event"
A Input-box for "Bezeichner" and so on...


The metadata in the schema specifies what will be a node and what will be details and which widget will be used to show each entry in the details.

A Java (Spring)-backend is used for the application.

My plan (if this is possible):

1) Create for each detail-entry a xforms-file with the correct xforms-widgets (This will be a xslt-Transformation, input = schema, output = xforms). This will be done only once in a separate step.

2) Triggered from the xforms-submit-done-event I have to create  (somehow, dont know how yet) an new instance, filled with data appropriate for the tree (Input for this creation will be the xml with the data and the schema-file which specifies what is node and detail, what should be used as the node-names (in the example the elements "Vorname" and "Nachname" of the node-element is used) and so on).

3) If the node is clicked somehow the correct previous created xforms-file must be loaded, bind to the correct data and shown.

Things which should be possible: Delete, Create new nodes. Save the changes done back to the xml-data file.

My question is, if this is possible? Perhaps somebody has some good ideas which could help to implement this.

Thanks in advance

Michael

Reply | Threaded
Open this post in threaded view
|

Re: Treeview to show complex data

Einar Moos
Michael,

if understand correctly, take a look at http://www.orbeon.com/ops/xforms-sandbox/sample/tree

and visit other examples in the sandbox; they are very helpful.

Cheers

-- einar

On Thu, Jun 18, 2009 at 5:29 PM, Myxlyxl <[hidden email]> wrote:

Hello everybody,

What i try to achieve:

I have some relative complex data as xml, a small excerpt (real data is much
more nested):

<?xml version="1.0" encoding="UTF-8"?>
<Tree>
<Agenten>
   <Agent Event="true" ID="AGENT601362799">
     <Bezeichner/>
     <Nachname>Mueller</Nachname>
     <Vorname>Thomas</Vorname>
     <Benutzername>mec</Benutzername>
     <Passwort>password</Passwort>
     <Sperrung>false</Sperrung>
     <Nachwahl>456</Nachwahl>
     <ANI/>
     <Permanentanmeldung>false</Permanentanmeldung>
     <TestDropDown/>
     <Zielrufnummer>0987654321</Zielrufnummer>
   </Agent>
   <Agent Event="true" ID="AGENT1202725572">
     <Bezeichner/>
     <Nachname>Dampf</Nachname>
     <Vorname>Hans</Vorname>
     <Benutzername>kli</Benutzername>
     <Passwort>password</Passwort>
     <Sperrung>false</Sperrung>
     <Nachwahl>123</Nachwahl>
     <ANI/>
     <Permanentanmeldung>false</Permanentanmeldung>
     <TestDropDown/>
     <DropTest2/>
     <Zielrufnummer>123456789</Zielrufnummer>
   </Agent>
 </Agenten>
</Tree>

Furthermore i have a schema-file with some meta-data for this xml.

I want to use a <xforms:select1> with appearance="xxforms:tree" to show the
data in the xml. If you click on a node, the details of this node should
appear.

The tree for the above example should look something like this:

Tree
     - Agenten
               - Thomas Mueller(AGENT601362799)
               - Hans Dampf(AGENT1202725572)

If one clicks e.g. on the node "Thomas Mueller" on the right of the tree the
details (input-boxes, dropdown, or checkboxes...) for this entry should
appear. Here e.g.

A Checkbox for "Event"
A Input-box for "Bezeichner" and so on...


The metadata in the schema specifies what will be a node and what will be
details and which widget will be used to show each entry in the details.

A Java (Spring)-backend is used for the application.

My plan (if this is possible):

1) Create for each detail-entry a xforms-file with the correct
xforms-widgets (This will be a xslt-Transformation, input = schema, output =
xforms). This will be done only once in a separate step.

2) Triggered from the xforms-submit-done-event I have to create  (somehow,
dont know how yet) an new instance, filled with data appropriate for the
tree (Input for this creation will be the xml with the data and the
schema-file which specifies what is node and detail, what should be used as
the node-names (in the example the elements "Vorname" and "Nachname" of the
node-element is used) and so on).

3) If the node is clicked somehow the correct previous created xforms-file
must be loaded, bind to the correct data and shown.

Things which should be possible: Delete, Create new nodes. Save the changes
done back to the xml-data file.

My question is, if this is possible? Perhaps somebody has some good ideas
which could help to implement this.

Thanks in advance

Michael


--
View this message in context: http://www.nabble.com/Treeview-to-show-complex-data-tp24095092p24095092.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Treeview to show complex data

Myxlyxl
Thanks,

I took a look at the samples and got started.

I wonder if there is a way to get somehow the the collapse/expand event from the tree if someone clicks on the "plus". I need this to adapt the height of the iframe where the xforms is embedded, as the tree could be very large. Perhaps there is some workaround for this or perhaps there is the possibility to edit the javascript-file for the treeview in order to pass down these events to xforms without too much efford ?
Furthermore i cant find a possibility to collapse all nodes with code...

Some ideas?

Thanks a lot
Michael

parisiana wrote
Michael,

if understand correctly, take a look at
http://www.orbeon.com/ops/xforms-sandbox/sample/tree

and visit other examples in the sandbox; they are very helpful.

Cheers

-- einar

On Thu, Jun 18, 2009 at 5:29 PM, Myxlyxl <maat@mms-dresden.de> wrote:

>
> Hello everybody,
>
> What i try to achieve:
>
> I have some relative complex data as xml, a small excerpt (real data is
> much
> more nested):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Tree>
> <Agenten>
>    <Agent Event="true" ID="AGENT601362799">
>      <Bezeichner/>
>      <Nachname>Mueller</Nachname>
>      <Vorname>Thomas</Vorname>
>      <Benutzername>mec</Benutzername>
>      <Passwort>password</Passwort>
>      <Sperrung>false</Sperrung>
>      <Nachwahl>456</Nachwahl>
>      <ANI/>
>      <Permanentanmeldung>false</Permanentanmeldung>
>      <TestDropDown/>
>      <Zielrufnummer>0987654321</Zielrufnummer>
>    </Agent>
>    <Agent Event="true" ID="AGENT1202725572">
>      <Bezeichner/>
>      <Nachname>Dampf</Nachname>
>      <Vorname>Hans</Vorname>
>      <Benutzername>kli</Benutzername>
>      <Passwort>password</Passwort>
>      <Sperrung>false</Sperrung>
>      <Nachwahl>123</Nachwahl>
>      <ANI/>
>      <Permanentanmeldung>false</Permanentanmeldung>
>      <TestDropDown/>
>      <DropTest2/>
>      <Zielrufnummer>123456789</Zielrufnummer>
>    </Agent>
>  </Agenten>
> </Tree>
>
> Furthermore i have a schema-file with some meta-data for this xml.
>
> I want to use a <xforms:select1> with appearance="xxforms:tree" to show the
> data in the xml. If you click on a node, the details of this node should
> appear.
>
> The tree for the above example should look something like this:
>
> Tree
>      - Agenten
>                - Thomas Mueller(AGENT601362799)
>                - Hans Dampf(AGENT1202725572)
>
> If one clicks e.g. on the node "Thomas Mueller" on the right of the tree
> the
> details (input-boxes, dropdown, or checkboxes...) for this entry should
> appear. Here e.g.
>
> A Checkbox for "Event"
> A Input-box for "Bezeichner" and so on...
>
>
> The metadata in the schema specifies what will be a node and what will be
> details and which widget will be used to show each entry in the details.
>
> A Java (Spring)-backend is used for the application.
>
> My plan (if this is possible):
>
> 1) Create for each detail-entry a xforms-file with the correct
> xforms-widgets (This will be a xslt-Transformation, input = schema, output
> =
> xforms). This will be done only once in a separate step.
>
> 2) Triggered from the xforms-submit-done-event I have to create  (somehow,
> dont know how yet) an new instance, filled with data appropriate for the
> tree (Input for this creation will be the xml with the data and the
> schema-file which specifies what is node and detail, what should be used as
> the node-names (in the example the elements "Vorname" and "Nachname" of the
> node-element is used) and so on).
>
> 3) If the node is clicked somehow the correct previous created xforms-file
> must be loaded, bind to the correct data and shown.
>
> Things which should be possible: Delete, Create new nodes. Save the changes
> done back to the xml-data file.
>
> My question is, if this is possible? Perhaps somebody has some good ideas
> which could help to implement this.
>
> Thanks in advance
>
> Michael
>
>
> --
> View this message in context:
> http://www.nabble.com/Treeview-to-show-complex-data-tp24095092p24095092.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org mailing
> list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Treeview to show complex data

Alessandro Vernet
Administrator
Michael,

Myxlyxl wrote
I wonder if there is a way to get somehow the the collapse/expand event from the tree if someone clicks on the "plus". I need this to adapt the height of the iframe where the xforms is embedded, as the tree could be very large. Perhaps there is some workaround for this or perhaps there is the possibility to edit the javascript-file for the treeview in order to pass down these events to xforms without too much efford ?
Furthermore i cant find a possibility to collapse all nodes with code...
Right now you can't control what branches are open. When the tree is first displayed, it will just open branches so the nodes that are selected are visible.

Alex