Displaying content of instances

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

Displaying content of instances

Stephanie Hall (TT)

Hi all,

 

I am hoping you can help me with the implementation of a form design my client wants to use.   It is a bit complex so please bear with me:

Right now we have an instance like the following:

 

<instance id=”config”>

<configuration>

                <project>

                                <files>

                                                <myfile>file1</myfile>

<myfile>file2</myfile>

<myfile/>

<myfile>file4</myfile>

 

<myfile/>

                                                </files>

                                </project>

                                <project>

                                …

                </configuration>

</instance>

 

Currently the “myfile” nodes under project/files are listed in rows in a xforms:repeat (as xforms:input).   With the press of a button, my client wants to be able to display all of the <myfiles> of a project in one big xforms:textarea.  So using the above instance:

 

file1

file2

 

file4

 

My client also wants to be able to, upon a click of a button, put the content BACK into the rows (with the updated information) from the textarea. 

 

So my questions are:

1.       How do I add new <myfile> nodes to the <files> node for this project from the textarea without creating a million temporary instances?  When my client types in “file5” in the textarea, they want it to end up in the rows once they click the button to go back.

2.       How do I display the <myfile> nodes in a textarea and keep them formatted properly?  If I just do “<textarea ref=”project/files”>” then I get a big mess of “file1file2file4”.

 

I don’t have a sandbox form I could put up because this is still just determining the feasibility of the design.  I should also mention I am using Orbeon in a separate java deployment scheme.

 

Thank you,

Stephanie

 

 



--
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: Displaying content of instances

Hank Ratzesberger-2
<base href="x-msg://659/">Hi Stephanie,

Sometimes I think this list might have better success with my recommendations 
on brain surgery, but OK., if I can just mention the principle...

You can have two controls in two different xforms:case elements, and a trigger 
control in each that makes the other case active. 

The table could be an output or a datatable:


if it is a table,then you could use xslt to create the html output:


For the textarea, the "proper" way to do this would be a custom xbl component.  XBL has 
the specs to handle the intermediate data -- the instance data transformed into text with 
line breaks.  You likely can do the same with a global instance and bind elements that 
use the calculate attribute and, again, the xslt to re-format from text to xml.

HTH,
Hank



On Sep 15, 2010, at 1:12 PM, Stephanie Hall (TT) wrote:

Hi all,
 
I am hoping you can help me with the implementation of a form design my client wants to use.   It is a bit complex so please bear with me:
Right now we have an instance like the following:
 
<instance id=”config”>
<configuration>
                <project>
                                <files>
                                                <myfile>file1</myfile>
<myfile>file2</myfile>
<myfile/>
<myfile>file4</myfile>
 
<myfile/>
                                                </files>
                                </project>
                                <project>
                                …
                </configuration>
</instance>
 
Currently the “myfile” nodes under project/files are listed in rows in a xforms:repeat (as xforms:input).   With the press of a button, my client wants to be able to display all of the <myfiles> of a project in one big xforms:textarea.  So using the above instance:
 
file1
file2
 
file4
 
My client also wants to be able to, upon a click of a button, put the content BACK into the rows (with the updated information) from the textarea. 
 
So my questions are:
1.       How do I add new <myfile> nodes to the <files> node for this project from the textarea without creating a million temporary instances?  When my client types in “file5” in the textarea, they want it to end up in the rows once they click the button to go back.
2.       How do I display the <myfile> nodes in a textarea and keep them formatted properly?  If I just do “<textarea ref=”project/files”>” then I get a big mess of “file1file2file4”.
 
I don’t have a sandbox form I could put up because this is still just determining the feasibility of the design.  I should also mention I am using Orbeon in a separate java deployment scheme.
 
Thank you,
Stephanie
 
 

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

Hank Ratzesberger
NEES@UCSB
Earth Research Institute
University of California, Santa Barbara
805-893-8042








--
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: Re: Displaying content of instances

Stephanie Hall (TT)
<base href="x-msg://659/">

Hi Hank,

 

Thanks so much for your suggestions!  I think the XBL might work out to be what we need… 

 

Thanks!

Stephanie

 

From: Hank Ratzesberger [mailto:[hidden email]]
Sent: Thursday, September 16, 2010 10:05 AM
To: [hidden email]
Subject: [ops-users] Re: Displaying content of instances

 

Hi Stephanie,

 

Sometimes I think this list might have better success with my recommendations 

on brain surgery, but OK., if I can just mention the principle...

 

You can have two controls in two different xforms:case elements, and a trigger 

control in each that makes the other case active. 

 

The table could be an output or a datatable:

 

 

if it is a table,then you could use xslt to create the html output:

 

 

For the textarea, the "proper" way to do this would be a custom xbl component.  XBL has 

the specs to handle the intermediate data -- the instance data transformed into text with 

line breaks.  You likely can do the same with a global instance and bind elements that 

use the calculate attribute and, again, the xslt to re-format from text to xml.

 

HTH,

Hank

 

 

 

On Sep 15, 2010, at 1:12 PM, Stephanie Hall (TT) wrote:



Hi all,

 

I am hoping you can help me with the implementation of a form design my client wants to use.   It is a bit complex so please bear with me:

Right now we have an instance like the following:

 

<instance id=”config”>

<configuration>

                <project>

                                <files>

                                                <myfile>file1</myfile>

<myfile>file2</myfile>

<myfile/>

<myfile>file4</myfile>

 

<myfile/>

                                                </files>

                                </project>

                                <project>

                                …

                </configuration>

</instance>

 

Currently the “myfile” nodes under project/files are listed in rows in a xforms:repeat (as xforms:input).   With the press of a button, my client wants to be able to display all of the <myfiles> of a project in one big xforms:textarea.  So using the above instance:

 

file1

file2

 

file4

 

My client also wants to be able to, upon a click of a button, put the content BACK into the rows (with the updated information) from the textarea. 

 

So my questions are:

1.       How do I add new <myfile> nodes to the <files> node for this project from the textarea without creating a million temporary instances?  When my client types in “file5” in the textarea, they want it to end up in the rows once they click the button to go back.

2.       How do I display the <myfile> nodes in a textarea and keep them formatted properly?  If I just do “<textarea ref=”project/files”>” then I get a big mess of “file1file2file4”.

 

I don’t have a sandbox form I could put up because this is still just determining the feasibility of the design.  I should also mention I am using Orbeon in a separate java deployment scheme.

 

Thank you,

Stephanie

 

 


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

 

Hank Ratzesberger

NEES@UCSB

Earth Research Institute

University of California, Santa Barbara

805-893-8042

 

 

 

 

 



--
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