You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rob Johnston <rj...@juniper.net> on 2002/11/18 17:42:16 UTC
XMLForms: storing and displaying tabular data
Hello,
I am trying to do something very specific using XMLForms and have been
coming up dry on ideas on how to do it. Basically, I want to have a
screen which will have a table where selected "items" are displayed, as
well as a item-specific version number:
,--------------------------------------------.
| | Name | Timestamp | Version |
`--------------------------------------------'
| o | foo1 | 2002-... | 100 |
| o | foo2 | 2002-... | 150 |
| o | foo3 | 2002-... | 200 |
...
the o's are radio buttons. So the user clicks on a radio button (let's
say 'foo2' then clicks on a button below that says "Change Version". We
then get forwarded to a screen such as:
,---------------------------------------.
| | Version | Timestamp | Comment |
`---------------------------------------'
| o | 125 | 2002... | ... |
| o | 150 | 2002... | ... |
| o | 175 | 2002... | ... |
the user then selects '175' by clickign the radio and then 'next', then
the following would be displayed:
,--------------------------------------------.
| | Name | Timestamp | Version |
`--------------------------------------------'
| o | foo1 | 2002-... | 100 |
| o | foo2 | 2002-... | 175 |
| o | foo3 | 2002-... | 200 |
... My problem is tying this all together. Since this is all built
dynamically, I've been trying to use xf:repeat's as well as DOM trees to
store this info, but unfortunately I need to have the version for each
item in the table available later on in the pipeline (for processing).
To even set up the tables, I've made a new selectUItype called
"radioTable" that takes the following form:
<xf:selectOne ... selectUIType='radioTable'>
<xf:header>
<xf:column>Name</xf:column>
...
</xf:header>
<xf:item>
<xf:column>foo1</xf:column>
...
<xf:value>foo1</xf:value>
</xf:item>
...
</xf:selectOne>
Unfortunately, this only lets me store one value per row (when I need to
store multiple values per row). Has anyone else used XMLForms with
tables in this way? Or done it a 'better' way so as to be able to store
multiple values for each row in a DOM tree or UserBean otherwise?
any help would be appreciated.
thanks,
rob
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>