Xforms instance loading with no events?

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

Xforms instance loading with no events?

MaryRuth Lawrence

Hi,

 

I have to dynamically load data on a page (constructed using Orbeon XForms) with no events happening on the page. For example, the user could be working on a different application, but then the browser page (constructed with Orbeon XForms) should keep updating itself even if the user is not currently working on this page. I’m doing this using Ajax script on the Xhtml/XForm which polls a servlet periodically to get the data into the form (the data would be an xml). Now that I have the data as an xml inside the form, how do I propagate this new xml data to the XForms instances of this page so that it shows up on the screen?

 

Thanks,

MaryRuth

 



--
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: Xforms instance loading with no events?

Erik Bruchez
Administrator
MaryRuth,

It may be easier to do things this way:

* Your polling code dispatches events to the XForms model using the
   dispatchEvent() function:

   http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-events

* The XForms page is then able to check the data by calling your
   servlet, and to store the data directly into an instance.

-Erik

MaryRuth Lawrence wrote:

> Hi,
>
>  
>
> I have to dynamically load data on a page (constructed using Orbeon
> XForms) with no events happening on the page. For example, the user
> could be working on a different application, but then the browser page
> (constructed with Orbeon XForms) should keep updating itself even if the
> user is not currently working on this page. I’m doing this using Ajax
> script on the Xhtml/XForm which polls a servlet periodically to get the
> data into the form (the data would be an xml). Now that I have the data
> as an xml inside the form, how do I propagate this new xml data to the
> XForms instances of this page so that it shows up on the screen?
>
>  
>
> Thanks,
>
> MaryRuth
>
>  
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Reverse proxy problem

Nikola Radic
Hi

I have a problem running Orbeon behind reverse-proxy (Apache)  which is
identified with the following Ajax error message:
"Error while processing response: undefined".

I tried to find some earlier posts in OPS mail archive, but there is only
one, not quite related to my problem.
Also, I set logging level to debug, in order to trace the problem, but no
detailed message appeared.

Is there any additional setting required for reverse-proxy or the problem
has another nature?

Any help appreciated.

Nikola



--
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: Reverse proxy problem

Alessandro Vernet
Administrator
Nikola,

On 11/1/07, Nikola Radic <[hidden email]> wrote:
> I have a problem running Orbeon behind reverse-proxy (Apache)  which is
> identified with the following Ajax error message:
> "Error while processing response: undefined".

Do you have an exception in the logs? In particular in the ops.log. If
you are using Tomcat, you should find this file in your Tomcat logs
directory. In doubt see config/log4j.xml in the Orbeon Forms resources
directory.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Re: Reverse proxy problem

Nikola Radic
Hi Alex,

Here are the logs. OK one is created when I access OPS, withouth proxy. The
BAD one is with proxy.

The debug level is set for org.orbeon.oxf.xforms.processor.XFormsServer
class.

I've forgoten to mention that I'm using Tomcat 5.5.23 and Apache 2.2.

The problem appears, when I click on any form component (e.g. radio-button).

nr

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, November 02, 2007 5:54 AM
Subject: Re: [ops-users] Reverse proxy problem


> Nikola,
>
> On 11/1/07, Nikola Radic <[hidden email]> wrote:
> > I have a problem running Orbeon behind reverse-proxy (Apache)  which is
> > identified with the following Ajax error message:
> > "Error while processing response: undefined".
>
> Do you have an exception in the logs? In particular in the ops.log. If
> you are using Tomcat, you should find this file in your Tomcat logs
> directory. In doubt see config/log4j.xml in the Orbeon Forms resources
> directory.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.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

logs.zip (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reverse proxy problem

Alessandro Vernet
Administrator
Nikola,

On 11/2/07, Nikola Radic <[hidden email]> wrote:
> Here are the logs. OK one is created when I access OPS, withouth proxy. The
> BAD one is with proxy.
>
> The debug level is set for org.orbeon.oxf.xforms.processor.XFormsServer
> class.
>
> I've forgoten to mention that I'm using Tomcat 5.5.23 and Apache 2.2.

Thanks for the logs. I expected to see in the logs some lines like the
following when you are interacting with the UI. But I didn't see any.
Does this come before/after what you sent me? This should be around
the DEBUG entries that detail what happens when an Ajax request is
processed.

2007-11-02 12:29:46,496 INFO  ProcessorService null - /xforms-server -
Received request
...
2007-11-02 12:29:46,526 INFO  ProcessorService null - /xforms-server -
Timing: 30 - Cache hits for cache.main: 23, fault: 1, adds: 0,
expirations: 0, success rate: 95%

> The problem appears, when I click on any form component (e.g. radio-button).

Could you try to insert a tcpmon
(http://ws.apache.org/commons/tcpmon/) between your browser and the
Apache server to see what is the response to the Ajax query that the
client-side code doesn't like? Maybe that response is an HTML page
that contains an error.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Re: Reverse proxy problem

Nikola Radic
Hi Alex,

Good news. I found the cause and solution.

The cause is JS variable "opsXFormsServerBase" which is set in
"XHTMLHeadHandler", using ExternalContext and response.

The variable is correctly set if web server is working alone i.e. accessed
directly. However, when accessed via reverse proxy,
web server sees requests from reverse proxy, without knowing anything about
it.

To overcome this, instead of setting application base directly from
response, I reset "opsXFormsServerBase" in my theme.xsl, as follows:

var opsXFormsServerBase = "http://" + document.location.host + "/CONTEXT/";

This works equaly for applications running with or without reverse proxy.

In my case, since I couldn't change the code, I'll take the context from the
request, but the complete solution should be done in XHTMLHeadHandler class.

Cheers,

nr

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, November 02, 2007 9:34 PM
Subject: Re: [ops-users] Reverse proxy problem


> Nikola,
>
> On 11/2/07, Nikola Radic <[hidden email]> wrote:
> > Here are the logs. OK one is created when I access OPS, withouth proxy.
The

> > BAD one is with proxy.
> >
> > The debug level is set for org.orbeon.oxf.xforms.processor.XFormsServer
> > class.
> >
> > I've forgoten to mention that I'm using Tomcat 5.5.23 and Apache 2.2.
>
> Thanks for the logs. I expected to see in the logs some lines like the
> following when you are interacting with the UI. But I didn't see any.
> Does this come before/after what you sent me? This should be around
> the DEBUG entries that detail what happens when an Ajax request is
> processed.
>
> 2007-11-02 12:29:46,496 INFO  ProcessorService null - /xforms-server -
> Received request
> ...
> 2007-11-02 12:29:46,526 INFO  ProcessorService null - /xforms-server -
> Timing: 30 - Cache hits for cache.main: 23, fault: 1, adds: 0,
> expirations: 0, success rate: 95%
>
> > The problem appears, when I click on any form component (e.g.
radio-button).

>
> Could you try to insert a tcpmon
> (http://ws.apache.org/commons/tcpmon/) between your browser and the
> Apache server to see what is the response to the Ajax query that the
> client-side code doesn't like? Maybe that response is an HTML page
> that contains an error.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.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: Reverse proxy problem

Erik Bruchez
Administrator
Nikola,

Thanks. This bug was fixed back in June:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=307007&group_id=168&atid=350207

We now just let the client figure out the URL, rather than asking the
server.

-Erik

Nikola Radic wrote:

> Hi Alex,
>
> Good news. I found the cause and solution.
>
> The cause is JS variable "opsXFormsServerBase" which is set in
> "XHTMLHeadHandler", using ExternalContext and response.
>
> The variable is correctly set if web server is working alone i.e. accessed
> directly. However, when accessed via reverse proxy,
> web server sees requests from reverse proxy, without knowing anything about
> it.
>
> To overcome this, instead of setting application base directly from
> response, I reset "opsXFormsServerBase" in my theme.xsl, as follows:
>
> var opsXFormsServerBase = "http://" + document.location.host + "/CONTEXT/";
>
> This works equaly for applications running with or without reverse proxy.
>
> In my case, since I couldn't change the code, I'll take the context from the
> request, but the complete solution should be done in XHTMLHeadHandler class.
>
> Cheers,
>
> nr
>
> ----- Original Message -----
> From: "Alessandro Vernet" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, November 02, 2007 9:34 PM
> Subject: Re: [ops-users] Reverse proxy problem
>
>
>> Nikola,
>>
>> On 11/2/07, Nikola Radic <[hidden email]> wrote:
>>> Here are the logs. OK one is created when I access OPS, withouth proxy.
> The
>>> BAD one is with proxy.
>>>
>>> The debug level is set for org.orbeon.oxf.xforms.processor.XFormsServer
>>> class.
>>>
>>> I've forgoten to mention that I'm using Tomcat 5.5.23 and Apache 2.2.
>> Thanks for the logs. I expected to see in the logs some lines like the
>> following when you are interacting with the UI. But I didn't see any.
>> Does this come before/after what you sent me? This should be around
>> the DEBUG entries that detail what happens when an Ajax request is
>> processed.
>>
>> 2007-11-02 12:29:46,496 INFO  ProcessorService null - /xforms-server -
>> Received request
>> ...
>> 2007-11-02 12:29:46,526 INFO  ProcessorService null - /xforms-server -
>> Timing: 30 - Cache hits for cache.main: 23, fault: 1, adds: 0,
>> expirations: 0, success rate: 95%
>>
>>> The problem appears, when I click on any form component (e.g.
> radio-button).
>> Could you try to insert a tcpmon
>> (http://ws.apache.org/commons/tcpmon/) between your browser and the
>> Apache server to see what is the response to the Ajax query that the
>> client-side code doesn't like? Maybe that response is an HTML page
>> that contains an error.
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.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
>>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Dynamic Context for Insert

Mackinnon, Mark A.
In reply to this post by Nikola Radic
Hi, all
 
I'm trying to use XForms to create a template for a certain type of document (e.g., memo, instruction) to guarantee that all such documents contain the same section headings, that required sections are present and in the correct order, etc.  Much of the data is small and of specific typing (e.g., To, From, Subject, Date), but then the main body of the document consists of a number of "textual" sections made up of one or more paragraphs, lists (ordered and un-ordered, potentially nested), and sub-sections.
 
I thought I would created a page that handled input for these generic elements, and have the user click a button on the main page that would jump to that page for each section.  This page needs to perform one or more inserts depending on the number of  paragraphs, lists, etc. the author desires.  I've made simple test cases that accept some basic inputs on the main form, jump to another page, accept some inputs and even inserts on the 2nd page, return to the main page, jump to a 3rd page, make more inputs/inserts, and return to the main page, all the while slowly building a single XML instance.
 
The problem is, I can't seem to use one of these secondary pages to insert into multiple sub-trees of the main XML instance, since I can't control the insertion point dynamically.  If I point to a sub-tree using the ref attribute of my submission element in the main page (and I would plan to have a separate submission element for each section using a given sub-template), I can get one insertion in the proper location, but when I return to the main page, I no longer see the entire XML instance.  If I point to root in the ref attribute, I'd have to duplicate the sub-template page for as many sections as necessary and hard-code the insertion point in each one.
 
Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?
 
Anyway, thanks for any thoughts about how to make this work in any fashion!!
 
Mark MacKinnon


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

winmail.dat (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Context for Insert

Alessandro Vernet
Administrator
Mark,

On Nov 5, 2007 5:09 PM, Mackinnon, Mark A. <[hidden email]> wrote:
> Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?

Yes, like you discovered, there is no <xforms:variable> in XForms or
in Orbeon Forms at this point. Now I don't quite understand the issue
with <xforms:insert context="Context">. You use the context attribute
to set where the data is inserted, so I am not sure what getting the
string "Context" means in this case. Could you create a simple example
that runs in the XForms sandbox and that shows this issues?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Hi, Alex et al.
 
I've attached some files which I hope will provide a simple example of what I'm trying to do.
 
1) blank-doc.xml is a template for the instance I'm trying to get filled-in.  There's some fields to be filled-in in the main document (represented by a single tag <SomeMainData/>) and 3 empty sections (A, B, and C).  The <Context> field at the end is for experimental purposes (as described below).
 
2) page-flow.xml describes 2 pages, one for the main portion of the document, and one for a document section.  Note that the main page points to blank-doc.xml through the default-submission attribute.
 
3) The model in doc-main.xhtml uses xi:include to bring in the instance (in this case, blank-doc.xml).  It also has an <xforms:input> to solicit text for the <SomeMainData/> field, then 3 triggers and associated submission elements to jump to the 2nd page to fill in one of the 3 sections.
 
4) doc-section.xhtml also brings in the instance using xi:include.  It also has a local template instance for the narrative that will be inserted into a section.  There is an <xforms:input> to solicit this narrative, then a trigger with an insert and a setvalue to copy this narrative to the desired main instance section.
 
Note that the context attribute on the insert (line 44, doc-section.xhtml) is ".".  This seems to correspond to the value of the ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things currently stand, any insertions made become children of the DocRoot element.  If I change the ref attribute in doc-main to "/DocRoot/SectionA", I can get the insertion to go where I want, but when I try to return to doc-main to fill-in another section, I can't get back to the DocRoot element.
 
I can leave the ref in the doc-main submission as "/" and hard-code the context attribute in doc-section to "/DocRoot/SectionA" rather than ".".  Now I can get to doc-section, insert at SectionA and return to doc-main with the whole instance accessible, but I'd have to have many section pages with hard-coded context attributes, one for each section (and there a many more than 3).
 
I thought I could "pass the context into" the section page somehow.  At first, I thought I would use setvalue within each of the 3 triggers in doc-main to change the contents of the <Context> tag from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the context attribute in the insert as context="/DocRoot/Context" but, of course, alll I got was the string /DocRoot/Context rather than the string that is the content of that node, and no insertion took place at all.  (Actually, I don't like this technique because, when I finally submit the form, I don't want the <Context> tag hanging around.  If something like this could work, I'd rather the <Context> info was in a separate instance, but I don't know how to pass 2 instances using the xi:include technique.  But first things first).
 
Anyway, that's my problem, and I hope I've described it in enough detail.  Any suggestions would be greatly appreciated.
 
Thanks,
Mark MacKinnon
 

________________________________

From: [hidden email] on behalf of Alessandro Vernet
Sent: Mon 11/5/2007 10:00 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert



Mark,

On Nov 5, 2007 5:09 PM, Mackinnon, Mark A. <[hidden email]> wrote:
> Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?

Yes, like you discovered, there is no <xforms:variable> in XForms or
in Orbeon Forms at this point. Now I don't quite understand the issue
with <xforms:insert context="Context">. You use the context attribute
to set where the data is inserted, so I am not sure what getting the
string "Context" means in this case. Could you create a simple example
that runs in the XForms sandbox and that shows this issues?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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

winmail.dat (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

FW: Dynamic Context for Insert

Mackinnon, Mark A.
Re: [ops-users] Dynamic Context for Insert
Hi, all
 
I sent this last week and haven't seen a response yet - maybe I missed it amongst the ops traffic, or perhaps you all didn't see it?
 
Anyway, here it is again with my apologies to those who are seeing it twice.
 
Mark

From: [hidden email] on behalf of Mackinnon, Mark A.
Sent: Tue 11/6/2007 5:49 PM
To: [hidden email]
Subject: RE: [ops-users] Dynamic Context for Insert

Hi, Alex et al.
 
I've attached some files which I hope will provide a simple example of what I'm trying to do.
 
1) blank-doc.xml is a template for the instance I'm trying to get filled-in.  There's some fields to be filled-in in the main document (represented by a single tag <SomeMainData/>) and 3 empty sections (A, B, and C).  The <Context> field at the end is for experimental purposes (as described below).
 
2) page-flow.xml describes 2 pages, one for the main portion of the document, and one for a document section.  Note that the main page points to blank-doc.xml through the default-submission attribute.
 
3) The model in doc-main.xhtml uses xi:include to bring in the instance (in this case, blank-doc.xml).  It also has an <xforms:input> to solicit text for the <SomeMainData/> field, then 3 triggers and associated submission elements to jump to the 2nd page to fill in one of the 3 sections.
 
4) doc-section.xhtml also brings in the instance using xi:include.  It also has a local template instance for the narrative that will be inserted into a section.  There is an <xforms:input> to solicit this narrative, then a trigger with an insert and a setvalue to copy this narrative to the desired main instance section.
 
Note that the context attribute on the insert (line 44, doc-section.xhtml) is ".".  This seems to correspond to the value of the ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things currently stand, any insertions made become children of the DocRoot element.  If I change the ref attribute in doc-main to "/DocRoot/SectionA", I can get the insertion to go where I want, but when I try to return to doc-main to fill-in another section, I can't get back to the DocRoot element.
 
I can leave the ref in the doc-main submission as "/" and hard-code the context attribute in doc-section to "/DocRoot/SectionA" rather than ".".  Now I can get to doc-section, insert at SectionA and return to doc-main with the whole instance accessible, but I'd have to have many section pages with hard-coded context attributes, one for each section (and there a many more than 3).
 
I thought I could "pass the context into" the section page somehow.  At first, I thought I would use setvalue within each of the 3 triggers in doc-main to change the contents of the <Context> tag from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the context attribute in the insert as context="/DocRoot/Context" but, of course, alll I got was the string /DocRoot/Context rather than the string that is the content of that node, and no insertion took place at all.  (Actually, I don't like this technique because, when I finally submit the form, I don't want the <Context> tag hanging around.  If something like this could work, I'd rather the <Context> info was in a separate instance, but I don't know how to pass 2 instances using the xi:include technique.  But first things first).
 
Anyway, that's my problem, and I hope I've described it in enough detail.  Any suggestions would be greatly appreciated.
 
Thanks,
Mark MacKinnon

 

From: [hidden email] on behalf of Alessandro Vernet
Sent: Mon 11/5/2007 10:00 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert

Mark,

On Nov 5, 2007 5:09 PM, Mackinnon, Mark A. <[hidden email]> wrote:
> Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?

Yes, like you discovered, there is no <xforms:variable> in XForms or
in Orbeon Forms at this point. Now I don't quite understand the issue
with <xforms:insert context="Context">. You use the context attribute
to set where the data is inserted, so I am not sure what getting the
string "Context" means in this case. Could you create a simple example
that runs in the XForms sandbox and that shows this issues?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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

doc-main.xhtml (3K) Download Attachment
doc-section.xhtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Oops - maybe you'd respond if I had attached blank-doc.xml :-)

________________________________

From: [hidden email] on behalf of Mackinnon, Mark A.
Sent: Thu 11/15/2007 6:37 PM
To: [hidden email]
Subject: FW: [ops-users] Dynamic Context for Insert


Hi, all
 
I sent this last week and haven't seen a response yet - maybe I missed it amongst the ops traffic, or perhaps you all didn't see it?
 
Anyway, here it is again with my apologies to those who are seeing it twice.
 
Mark
________________________________

From: [hidden email] on behalf of Mackinnon, Mark A.
Sent: Tue 11/6/2007 5:49 PM
To: [hidden email]
Subject: RE: [ops-users] Dynamic Context for Insert


Hi, Alex et al.
 
I've attached some files which I hope will provide a simple example of what I'm trying to do.
 
1) blank-doc.xml is a template for the instance I'm trying to get filled-in.  There's some fields to be filled-in in the main document (represented by a single tag <SomeMainData/>) and 3 empty sections (A, B, and C).  The <Context> field at the end is for experimental purposes (as described below).
 
2) page-flow.xml describes 2 pages, one for the main portion of the document, and one for a document section.  Note that the main page points to blank-doc.xml through the default-submission attribute.
 
3) The model in doc-main.xhtml uses xi:include to bring in the instance (in this case, blank-doc.xml).  It also has an <xforms:input> to solicit text for the <SomeMainData/> field, then 3 triggers and associated submission elements to jump to the 2nd page to fill in one of the 3 sections.
 
4) doc-section.xhtml also brings in the instance using xi:include.  It also has a local template instance for the narrative that will be inserted into a section.  There is an <xforms:input> to solicit this narrative, then a trigger with an insert and a setvalue to copy this narrative to the desired main instance section.
 
Note that the context attribute on the insert (line 44, doc-section.xhtml) is ".".  This seems to correspond to the value of the ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things currently stand, any insertions made become children of the DocRoot element.  If I change the ref attribute in doc-main to "/DocRoot/SectionA", I can get the insertion to go where I want, but when I try to return to doc-main to fill-in another section, I can't get back to the DocRoot element.
 
I can leave the ref in the doc-main submission as "/" and hard-code the context attribute in doc-section to "/DocRoot/SectionA" rather than ".".  Now I can get to doc-section, insert at SectionA and return to doc-main with the whole instance accessible, but I'd have to have many section pages with hard-coded context attributes, one for each section (and there a many more than 3).
 
I thought I could "pass the context into" the section page somehow.  At first, I thought I would use setvalue within each of the 3 triggers in doc-main to change the contents of the <Context> tag from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the context attribute in the insert as context="/DocRoot/Context" but, of course, alll I got was the string /DocRoot/Context rather than the string that is the content of that node, and no insertion took place at all.  (Actually, I don't like this technique because, when I finally submit the form, I don't want the <Context> tag hanging around.  If something like this could work, I'd rather the <Context> info was in a separate instance, but I don't know how to pass 2 instances using the xi:include technique.  But first things first).
 
Anyway, that's my problem, and I hope I've described it in enough detail.  Any suggestions would be greatly appreciated.
 
Thanks,
Mark MacKinnon

 
________________________________

From: [hidden email] on behalf of Alessandro Vernet
Sent: Mon 11/5/2007 10:00 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert



Mark,

On Nov 5, 2007 5:09 PM, Mackinnon, Mark A. <[hidden email]> wrote:
> Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?

Yes, like you discovered, there is no <xforms:variable> in XForms or
in Orbeon Forms at this point. Now I don't quite understand the issue
with <xforms:insert context="Context">. You use the context attribute
to set where the data is inserted, so I am not sure what getting the
string "Context" means in this case. Could you create a simple example
that runs in the XForms sandbox and that shows this issues?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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

winmail.dat (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Re: [ops-users] Dynamic Context for Insert
OK, I'm not as dumb as I look - it's just that my mail system has been stripping off my .xml files as "potentially dangerous" attachments.  Here are blank-doc.xml and page-flow.xml cleverly disguised by adding .txt at the end.
 
I hope this works.
 
Mark


From: Mackinnon, Mark A.
Sent: Thu 11/15/2007 6:43 PM
To: [hidden email]
Subject: RE: [ops-users] Dynamic Context for Insert

Oops - maybe you'd respond if I had attached blank-doc.xml :-)


From: [hidden email] on behalf of Mackinnon, Mark A.
Sent: Thu 11/15/2007 6:37 PM
To: [hidden email]
Subject: FW: [ops-users] Dynamic Context for Insert

Hi, all
 
I sent this last week and haven't seen a response yet - maybe I missed it amongst the ops traffic, or perhaps you all didn't see it?
 
Anyway, here it is again with my apologies to those who are seeing it twice.
 
Mark

From: [hidden email] on behalf of Mackinnon, Mark A.
Sent: Tue 11/6/2007 5:49 PM
To: [hidden email]
Subject: RE: [ops-users] Dynamic Context for Insert

Hi, Alex et al.
 
I've attached some files which I hope will provide a simple example of what I'm trying to do.
 
1) blank-doc.xml is a template for the instance I'm trying to get filled-in.  There's some fields to be filled-in in the main document (represented by a single tag <SomeMainData/>) and 3 empty sections (A, B, and C).  The <Context> field at the end is for experimental purposes (as described below).
 
2) page-flow.xml describes 2 pages, one for the main portion of the document, and one for a document section.  Note that the main page points to blank-doc.xml through the default-submission attribute.
 
3) The model in doc-main.xhtml uses xi:include to bring in the instance (in this case, blank-doc.xml).  It also has an <xforms:input> to solicit text for the <SomeMainData/> field, then 3 triggers and associated submission elements to jump to the 2nd page to fill in one of the 3 sections.
 
4) doc-section.xhtml also brings in the instance using xi:include.  It also has a local template instance for the narrative that will be inserted into a section.  There is an <xforms:input> to solicit this narrative, then a trigger with an insert and a setvalue to copy this narrative to the desired main instance section.
 
Note that the context attribute on the insert (line 44, doc-section.xhtml) is ".".  This seems to correspond to the value of the ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things currently stand, any insertions made become children of the DocRoot element.  If I change the ref attribute in doc-main to "/DocRoot/SectionA", I can get the insertion to go where I want, but when I try to return to doc-main to fill-in another section, I can't get back to the DocRoot element.
 
I can leave the ref in the doc-main submission as "/" and hard-code the context attribute in doc-section to "/DocRoot/SectionA" rather than ".".  Now I can get to doc-section, insert at SectionA and return to doc-main with the whole instance accessible, but I'd have to have many section pages with hard-coded context attributes, one for each section (and there a many more than 3).
 
I thought I could "pass the context into" the section page somehow.  At first, I thought I would use setvalue within each of the 3 triggers in doc-main to change the contents of the <Context> tag from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the context attribute in the insert as context="/DocRoot/Context" but, of course, alll I got was the string /DocRoot/Context rather than the string that is the content of that node, and no insertion took place at all.  (Actually, I don't like this technique because, when I finally submit the form, I don't want the <Context> tag hanging around.  If something like this could work, I'd rather the <Context> info was in a separate instance, but I don't know how to pass 2 instances using the xi:include technique.  But first things first).
 
Anyway, that's my problem, and I hope I've described it in enough detail.  Any suggestions would be greatly appreciated.
 
Thanks,
Mark MacKinnon

 

From: [hidden email] on behalf of Alessandro Vernet
Sent: Mon 11/5/2007 10:00 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert

Mark,

On Nov 5, 2007 5:09 PM, Mackinnon, Mark A. <[hidden email]> wrote:
> Is there a way to get a dynamic insertion point into the page (specifically, I think, to be used in the context attribute of the xforms:insert tag)?  I've been attempting to set a value into a Context tag in my instance and pull that value out in the secondary page, but I can't seem to get at the value of the Context tag inside the insert (if I say <xforms:insert context="Context" ... I get the string "Context", not its value which might be "/MainDoc/Section1", "MainDoc/Section2", etc.)  I read some speculation of an xforms:variable in past forums, where I might say <xforms:variable name="current-context" ref="Context"/> and then say <xforms:insert context="$current-context" ... but apparently that has never been implemented?

Yes, like you discovered, there is no <xforms:variable> in XForms or
in Orbeon Forms at this point. Now I don't quite understand the issue
with <xforms:insert context="Context">. You use the context attribute
to set where the data is inserted, so I am not sure what getting the
string "Context" means in this case. Could you create a simple example
that runs in the XForms sandbox and that shows this issues?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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

blank-doc.xml.txt (174 bytes) Download Attachment
page-flow.xml.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Context for Insert

Erik Bruchez
Administrator
Mark,

Is there any way you could send your files as a self-contained zip of  
a directory under RESOURCES/apps, with full instructions as to what  
URL to hit and what else to do if necessary? This would make it easier  
to run your example. Even better, can you show the problem in a single  
XHTML file that can run in the sandbox?

The easiest it is for people to get your app to run, the more likely  
you are to have an answer ;-)

-Erik

>
> Hi, all
>
> I sent this last week and haven't seen a response yet - maybe I  
> missed it amongst the ops traffic, or perhaps you all didn't see it?
>
> Anyway, here it is again with my apologies to those who are seeing  
> it twice.
>
> Mark
> From: [hidden email] on behalf of Mackinnon, Mark A.
> Sent: Tue 11/6/2007 5:49 PM
> To: [hidden email]
> Subject: RE: [ops-users] Dynamic Context for Insert
>
> Hi, Alex et al.
>
> I've attached some files which I hope will provide a simple example  
> of what I'm trying to do.
>
> 1) blank-doc.xml is a template for the instance I'm trying to get  
> filled-in.  There's some fields to be filled-in in the main document  
> (represented by a single tag <SomeMainData/>) and 3 empty sections  
> (A, B, and C).  The <Context> field at the end is for experimental  
> purposes (as described below).
>
> 2) page-flow.xml describes 2 pages, one for the main portion of the  
> document, and one for a document section.  Note that the main page  
> points to blank-doc.xml through the default-submission attribute.
>
> 3) The model in doc-main.xhtml uses xi:include to bring in the  
> instance (in this case, blank-doc.xml).  It also has an  
> <xforms:input> to solicit text for the <SomeMainData/> field, then 3  
> triggers and associated submission elements to jump to the 2nd page  
> to fill in one of the 3 sections.
>
> 4) doc-section.xhtml also brings in the instance using xi:include.  
> It also has a local template instance for the narrative that will be  
> inserted into a section.  There is an <xforms:input> to solicit this  
> narrative, then a trigger with an insert and a setvalue to copy this  
> narrative to the desired main instance section.
>
> Note that the context attribute on the insert (line 44, doc-
> section.xhtml) is ".".  This seems to correspond to the value of the  
> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things  
> currently stand, any insertions made become children of the DocRoot  
> element.  If I change the ref attribute in doc-main to "/DocRoot/
> SectionA", I can get the insertion to go where I want, but when I  
> try to return to doc-main to fill-in another section, I can't get  
> back to the DocRoot element.
>
> I can leave the ref in the doc-main submission as "/" and hard-code  
> the context attribute in doc-section to "/DocRoot/SectionA" rather  
> than ".".  Now I can get to doc-section, insert at SectionA and  
> return to doc-main with the whole instance accessible, but I'd have  
> to have many section pages with hard-coded context attributes, one  
> for each section (and there a many more than 3).
>
> I thought I could "pass the context into" the section page somehow.  
> At first, I thought I would use setvalue within each of the 3  
> triggers in doc-main to change the contents of the <Context> tag  
> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the  
> context attribute in the insert as context="/DocRoot/Context" but,  
> of course, alll I got was the string /DocRoot/Context rather than  
> the string that is the content of that node, and no insertion took  
> place at all.  (Actually, I don't like this technique because, when  
> I finally submit the form, I don't want the <Context> tag hanging  
> around.  If something like this could work, I'd rather the <Context>  
> info was in a separate instance, but I don't know how to pass 2  
> instances using the xi:include technique.  But first things first).
>
> Anyway, that's my problem, and I hope I've described it in enough  
> detail.  Any suggestions would be greatly appreciated.
>
> Thanks,
> Mark MacKinnon
>
>
> From: [hidden email] on behalf of Alessandro Vernet
> Sent: Mon 11/5/2007 10:00 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
> Mark,
>
> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.  
> <[hidden email]> wrote:
> > Is there a way to get a dynamic insertion point into the page  
> (specifically, I think, to be used in the context attribute of the  
> xforms:insert tag)?  I've been attempting to set a value into a  
> Context tag in my instance and pull that value out in the secondary  
> page, but I can't seem to get at the value of the Context tag inside  
> the insert (if I say <xforms:insert context="Context" ... I get the  
> string "Context", not its value which might be "/MainDoc/Section1",  
> "MainDoc/Section2", etc.)  I read some speculation of an  
> xforms:variable in past forums, where I might say <xforms:variable  
> name="current-context" ref="Context"/> and then say <xforms:insert  
> context="$current-context" ... but apparently that has never been  
> implemented?
>
> Yes, like you discovered, there is no <xforms:variable> in XForms or
> in Orbeon Forms at this point. Now I don't quite understand the issue
> with <xforms:insert context="Context">. You use the context attribute
> to set where the data is inserted, so I am not sure what getting the
> string "Context" means in this case. Could you create a simple example
> that runs in the XForms sandbox and that shows this issues?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.com/
>
> <blank-doc.xml.txt><page-flow.xml.txt>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Hi, Erik et al.
 
I've attached a zip file as requested (with a .txt extension added to fool my - and maybe others' - email filtering).  I'm running on a TomCat server, so for me, the files live at C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ops\WEB-INF\resources\apps\TestCase - you can create a TestCase folder under your RESOURCES/apps and extract the 4 files there.  I then invoke the form as http://localhost:8080/ops/TestCase/.
 
I can't show the problem in a single XHTML file, since it involves coordination between multiple pages (unless, of course, you slap me upside the head and show me a simpler solution <g>).
 
Thanks in advance,
Mark

________________________________

From: [hidden email] on behalf of Erik Bruchez
Sent: Fri 11/16/2007 2:30 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert



Mark,

Is there any way you could send your files as a self-contained zip of
a directory under RESOURCES/apps, with full instructions as to what
URL to hit and what else to do if necessary? This would make it easier
to run your example. Even better, can you show the problem in a single
XHTML file that can run in the sandbox?

The easiest it is for people to get your app to run, the more likely
you are to have an answer ;-)

-Erik

>
> Hi, all
>
> I sent this last week and haven't seen a response yet - maybe I
> missed it amongst the ops traffic, or perhaps you all didn't see it?
>
> Anyway, here it is again with my apologies to those who are seeing
> it twice.
>
> Mark
> From: [hidden email] on behalf of Mackinnon, Mark A.
> Sent: Tue 11/6/2007 5:49 PM
> To: [hidden email]
> Subject: RE: [ops-users] Dynamic Context for Insert
>
> Hi, Alex et al.
>
> I've attached some files which I hope will provide a simple example
> of what I'm trying to do.
>
> 1) blank-doc.xml is a template for the instance I'm trying to get
> filled-in.  There's some fields to be filled-in in the main document
> (represented by a single tag <SomeMainData/>) and 3 empty sections
> (A, B, and C).  The <Context> field at the end is for experimental
> purposes (as described below).
>
> 2) page-flow.xml describes 2 pages, one for the main portion of the
> document, and one for a document section.  Note that the main page
> points to blank-doc.xml through the default-submission attribute.
>
> 3) The model in doc-main.xhtml uses xi:include to bring in the
> instance (in this case, blank-doc.xml).  It also has an
> <xforms:input> to solicit text for the <SomeMainData/> field, then 3
> triggers and associated submission elements to jump to the 2nd page
> to fill in one of the 3 sections.
>
> 4) doc-section.xhtml also brings in the instance using xi:include.  
> It also has a local template instance for the narrative that will be
> inserted into a section.  There is an <xforms:input> to solicit this
> narrative, then a trigger with an insert and a setvalue to copy this
> narrative to the desired main instance section.
>
> Note that the context attribute on the insert (line 44, doc-
> section.xhtml) is ".".  This seems to correspond to the value of the
> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things
> currently stand, any insertions made become children of the DocRoot
> element.  If I change the ref attribute in doc-main to "/DocRoot/
> SectionA", I can get the insertion to go where I want, but when I
> try to return to doc-main to fill-in another section, I can't get
> back to the DocRoot element.
>
> I can leave the ref in the doc-main submission as "/" and hard-code
> the context attribute in doc-section to "/DocRoot/SectionA" rather
> than ".".  Now I can get to doc-section, insert at SectionA and
> return to doc-main with the whole instance accessible, but I'd have
> to have many section pages with hard-coded context attributes, one
> for each section (and there a many more than 3).
>
> I thought I could "pass the context into" the section page somehow.  
> At first, I thought I would use setvalue within each of the 3
> triggers in doc-main to change the contents of the <Context> tag
> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the
> context attribute in the insert as context="/DocRoot/Context" but,
> of course, alll I got was the string /DocRoot/Context rather than
> the string that is the content of that node, and no insertion took
> place at all.  (Actually, I don't like this technique because, when
> I finally submit the form, I don't want the <Context> tag hanging
> around.  If something like this could work, I'd rather the <Context>
> info was in a separate instance, but I don't know how to pass 2
> instances using the xi:include technique.  But first things first).
>
> Anyway, that's my problem, and I hope I've described it in enough
> detail.  Any suggestions would be greatly appreciated.
>
> Thanks,
> Mark MacKinnon
>
>
> From: [hidden email] on behalf of Alessandro Vernet
> Sent: Mon 11/5/2007 10:00 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
> Mark,
>
> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.
> <[hidden email]> wrote:
> > Is there a way to get a dynamic insertion point into the page
> (specifically, I think, to be used in the context attribute of the
> xforms:insert tag)?  I've been attempting to set a value into a
> Context tag in my instance and pull that value out in the secondary
> page, but I can't seem to get at the value of the Context tag inside
> the insert (if I say <xforms:insert context="Context" ... I get the
> string "Context", not its value which might be "/MainDoc/Section1",
> "MainDoc/Section2", etc.)  I read some speculation of an
> xforms:variable in past forums, where I might say <xforms:variable
> name="current-context" ref="Context"/> and then say <xforms:insert
> context="$current-context" ... but apparently that has never been
> implemented?
>
> Yes, like you discovered, there is no <xforms:variable> in XForms or
> in Orbeon Forms at this point. Now I don't quite understand the issue
> with <xforms:insert context="Context">. You use the context attribute
> to set where the data is inserted, so I am not sure what getting the
> string "Context" means in this case. Could you create a simple example
> that runs in the XForms sandbox and that shows this issues?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.com/
>
> <blank-doc.xml.txt><page-flow.xml.txt>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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

winmail.dat (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Context for Insert

Erik Bruchez
Administrator
Is it me or the attachment did not make it?

-Erik

On Nov 16, 2007, at 2:53 PM, Mackinnon, Mark A. wrote:

> Hi, Erik et al.
>
> I've attached a zip file as requested (with a .txt extension added  
> to fool my - and maybe others' - email filtering).  I'm running on a  
> TomCat server, so for me, the files live at C:\Program Files\Apache  
> Software Foundation\Tomcat 5.5\webapps\ops\WEB-INF\resources\apps
> \TestCase - you can create a TestCase folder under your RESOURCES/
> apps and extract the 4 files there.  I then invoke the form as http://localhost:8080/ops/TestCase/ 
> .
>
> I can't show the problem in a single XHTML file, since it involves  
> coordination between multiple pages (unless, of course, you slap me  
> upside the head and show me a simpler solution <g>).
>
> Thanks in advance,
> Mark
>
> ________________________________
>
> From: [hidden email] on behalf of Erik Bruchez
> Sent: Fri 11/16/2007 2:30 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
>
>
> Mark,
>
> Is there any way you could send your files as a self-contained zip of
> a directory under RESOURCES/apps, with full instructions as to what
> URL to hit and what else to do if necessary? This would make it easier
> to run your example. Even better, can you show the problem in a single
> XHTML file that can run in the sandbox?
>
> The easiest it is for people to get your app to run, the more likely
> you are to have an answer ;-)
>
> -Erik
>
>>
>> Hi, all
>>
>> I sent this last week and haven't seen a response yet - maybe I
>> missed it amongst the ops traffic, or perhaps you all didn't see it?
>>
>> Anyway, here it is again with my apologies to those who are seeing
>> it twice.
>>
>> Mark
>> From: [hidden email] on behalf of Mackinnon, Mark A.
>> Sent: Tue 11/6/2007 5:49 PM
>> To: [hidden email]
>> Subject: RE: [ops-users] Dynamic Context for Insert
>>
>> Hi, Alex et al.
>>
>> I've attached some files which I hope will provide a simple example
>> of what I'm trying to do.
>>
>> 1) blank-doc.xml is a template for the instance I'm trying to get
>> filled-in.  There's some fields to be filled-in in the main document
>> (represented by a single tag <SomeMainData/>) and 3 empty sections
>> (A, B, and C).  The <Context> field at the end is for experimental
>> purposes (as described below).
>>
>> 2) page-flow.xml describes 2 pages, one for the main portion of the
>> document, and one for a document section.  Note that the main page
>> points to blank-doc.xml through the default-submission attribute.
>>
>> 3) The model in doc-main.xhtml uses xi:include to bring in the
>> instance (in this case, blank-doc.xml).  It also has an
>> <xforms:input> to solicit text for the <SomeMainData/> field, then 3
>> triggers and associated submission elements to jump to the 2nd page
>> to fill in one of the 3 sections.
>>
>> 4) doc-section.xhtml also brings in the instance using xi:include.
>> It also has a local template instance for the narrative that will be
>> inserted into a section.  There is an <xforms:input> to solicit this
>> narrative, then a trigger with an insert and a setvalue to copy this
>> narrative to the desired main instance section.
>>
>> Note that the context attribute on the insert (line 44, doc-
>> section.xhtml) is ".".  This seems to correspond to the value of the
>> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things
>> currently stand, any insertions made become children of the DocRoot
>> element.  If I change the ref attribute in doc-main to "/DocRoot/
>> SectionA", I can get the insertion to go where I want, but when I
>> try to return to doc-main to fill-in another section, I can't get
>> back to the DocRoot element.
>>
>> I can leave the ref in the doc-main submission as "/" and hard-code
>> the context attribute in doc-section to "/DocRoot/SectionA" rather
>> than ".".  Now I can get to doc-section, insert at SectionA and
>> return to doc-main with the whole instance accessible, but I'd have
>> to have many section pages with hard-coded context attributes, one
>> for each section (and there a many more than 3).
>>
>> I thought I could "pass the context into" the section page somehow.
>> At first, I thought I would use setvalue within each of the 3
>> triggers in doc-main to change the contents of the <Context> tag
>> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the
>> context attribute in the insert as context="/DocRoot/Context" but,
>> of course, alll I got was the string /DocRoot/Context rather than
>> the string that is the content of that node, and no insertion took
>> place at all.  (Actually, I don't like this technique because, when
>> I finally submit the form, I don't want the <Context> tag hanging
>> around.  If something like this could work, I'd rather the <Context>
>> info was in a separate instance, but I don't know how to pass 2
>> instances using the xi:include technique.  But first things first).
>>
>> Anyway, that's my problem, and I hope I've described it in enough
>> detail.  Any suggestions would be greatly appreciated.
>>
>> Thanks,
>> Mark MacKinnon
>>
>>
>> From: [hidden email] on behalf of Alessandro Vernet
>> Sent: Mon 11/5/2007 10:00 PM
>> To: [hidden email]
>> Subject: Re: [ops-users] Dynamic Context for Insert
>>
>> Mark,
>>
>> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.
>> <[hidden email]> wrote:
>>> Is there a way to get a dynamic insertion point into the page
>> (specifically, I think, to be used in the context attribute of the
>> xforms:insert tag)?  I've been attempting to set a value into a
>> Context tag in my instance and pull that value out in the secondary
>> page, but I can't seem to get at the value of the Context tag inside
>> the insert (if I say <xforms:insert context="Context" ... I get the
>> string "Context", not its value which might be "/MainDoc/Section1",
>> "MainDoc/Section2", etc.)  I read some speculation of an
>> xforms:variable in past forums, where I might say <xforms:variable
>> name="current-context" ref="Context"/> and then say <xforms:insert
>> context="$current-context" ... but apparently that has never been
>> implemented?
>>
>> Yes, like you discovered, there is no <xforms:variable> in XForms or
>> in Orbeon Forms at this point. Now I don't quite understand the issue
>> with <xforms:insert context="Context">. You use the context attribute
>> to set where the data is inserted, so I am not sure what getting the
>> string "Context" means in this case. Could you create a simple  
>> example
>> that runs in the XForms sandbox and that shows this issues?
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.com/
>>
>> <blank-doc.xml.txt><page-flow.xml.txt>
>>
>> --
>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>
> <winmail.dat>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Hi, Erik
 
I got the attachment when I got the ops-users copy of my message.  Here it is again with the zip file renamed as .txt without the phrase .zip anywhere in the name.  Please let me know if it comes through this time.
 
Mark

________________________________

From: [hidden email] on behalf of Erik Bruchez
Sent: Fri 11/16/2007 7:34 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert



Is it me or the attachment did not make it?

-Erik

On Nov 16, 2007, at 2:53 PM, Mackinnon, Mark A. wrote:

> Hi, Erik et al.
>
> I've attached a zip file as requested (with a .txt extension added
> to fool my - and maybe others' - email filtering).  I'm running on a
> TomCat server, so for me, the files live at C:\Program Files\Apache
> Software Foundation\Tomcat 5.5\webapps\ops\WEB-INF\resources\apps
> \TestCase - you can create a TestCase folder under your RESOURCES/
> apps and extract the 4 files there.  I then invoke the form as http://localhost:8080/ops/TestCase/
> .
>
> I can't show the problem in a single XHTML file, since it involves
> coordination between multiple pages (unless, of course, you slap me
> upside the head and show me a simpler solution <g>).
>
> Thanks in advance,
> Mark
>
> ________________________________
>
> From: [hidden email] on behalf of Erik Bruchez
> Sent: Fri 11/16/2007 2:30 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
>
>
> Mark,
>
> Is there any way you could send your files as a self-contained zip of
> a directory under RESOURCES/apps, with full instructions as to what
> URL to hit and what else to do if necessary? This would make it easier
> to run your example. Even better, can you show the problem in a single
> XHTML file that can run in the sandbox?
>
> The easiest it is for people to get your app to run, the more likely
> you are to have an answer ;-)
>
> -Erik
>
>>
>> Hi, all
>>
>> I sent this last week and haven't seen a response yet - maybe I
>> missed it amongst the ops traffic, or perhaps you all didn't see it?
>>
>> Anyway, here it is again with my apologies to those who are seeing
>> it twice.
>>
>> Mark
>> From: [hidden email] on behalf of Mackinnon, Mark A.
>> Sent: Tue 11/6/2007 5:49 PM
>> To: [hidden email]
>> Subject: RE: [ops-users] Dynamic Context for Insert
>>
>> Hi, Alex et al.
>>
>> I've attached some files which I hope will provide a simple example
>> of what I'm trying to do.
>>
>> 1) blank-doc.xml is a template for the instance I'm trying to get
>> filled-in.  There's some fields to be filled-in in the main document
>> (represented by a single tag <SomeMainData/>) and 3 empty sections
>> (A, B, and C).  The <Context> field at the end is for experimental
>> purposes (as described below).
>>
>> 2) page-flow.xml describes 2 pages, one for the main portion of the
>> document, and one for a document section.  Note that the main page
>> points to blank-doc.xml through the default-submission attribute.
>>
>> 3) The model in doc-main.xhtml uses xi:include to bring in the
>> instance (in this case, blank-doc.xml).  It also has an
>> <xforms:input> to solicit text for the <SomeMainData/> field, then 3
>> triggers and associated submission elements to jump to the 2nd page
>> to fill in one of the 3 sections.
>>
>> 4) doc-section.xhtml also brings in the instance using xi:include.
>> It also has a local template instance for the narrative that will be
>> inserted into a section.  There is an <xforms:input> to solicit this
>> narrative, then a trigger with an insert and a setvalue to copy this
>> narrative to the desired main instance section.
>>
>> Note that the context attribute on the insert (line 44, doc-
>> section.xhtml) is ".".  This seems to correspond to the value of the
>> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things
>> currently stand, any insertions made become children of the DocRoot
>> element.  If I change the ref attribute in doc-main to "/DocRoot/
>> SectionA", I can get the insertion to go where I want, but when I
>> try to return to doc-main to fill-in another section, I can't get
>> back to the DocRoot element.
>>
>> I can leave the ref in the doc-main submission as "/" and hard-code
>> the context attribute in doc-section to "/DocRoot/SectionA" rather
>> than ".".  Now I can get to doc-section, insert at SectionA and
>> return to doc-main with the whole instance accessible, but I'd have
>> to have many section pages with hard-coded context attributes, one
>> for each section (and there a many more than 3).
>>
>> I thought I could "pass the context into" the section page somehow.
>> At first, I thought I would use setvalue within each of the 3
>> triggers in doc-main to change the contents of the <Context> tag
>> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the
>> context attribute in the insert as context="/DocRoot/Context" but,
>> of course, alll I got was the string /DocRoot/Context rather than
>> the string that is the content of that node, and no insertion took
>> place at all.  (Actually, I don't like this technique because, when
>> I finally submit the form, I don't want the <Context> tag hanging
>> around.  If something like this could work, I'd rather the <Context>
>> info was in a separate instance, but I don't know how to pass 2
>> instances using the xi:include technique.  But first things first).
>>
>> Anyway, that's my problem, and I hope I've described it in enough
>> detail.  Any suggestions would be greatly appreciated.
>>
>> Thanks,
>> Mark MacKinnon
>>
>>
>> From: [hidden email] on behalf of Alessandro Vernet
>> Sent: Mon 11/5/2007 10:00 PM
>> To: [hidden email]
>> Subject: Re: [ops-users] Dynamic Context for Insert
>>
>> Mark,
>>
>> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.
>> <[hidden email]> wrote:
>>> Is there a way to get a dynamic insertion point into the page
>> (specifically, I think, to be used in the context attribute of the
>> xforms:insert tag)?  I've been attempting to set a value into a
>> Context tag in my instance and pull that value out in the secondary
>> page, but I can't seem to get at the value of the Context tag inside
>> the insert (if I say <xforms:insert context="Context" ... I get the
>> string "Context", not its value which might be "/MainDoc/Section1",
>> "MainDoc/Section2", etc.)  I read some speculation of an
>> xforms:variable in past forums, where I might say <xforms:variable
>> name="current-context" ref="Context"/> and then say <xforms:insert
>> context="$current-context" ... but apparently that has never been
>> implemented?
>>
>> Yes, like you discovered, there is no <xforms:variable> in XForms or
>> in Orbeon Forms at this point. Now I don't quite understand the issue
>> with <xforms:insert context="Context">. You use the context attribute
>> to set where the data is inserted, so I am not sure what getting the
>> string "Context" means in this case. Could you create a simple
>> example
>> that runs in the XForms sandbox and that shows this issues?
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.com/
>>
>> <blank-doc.xml.txt><page-flow.xml.txt>
>>
>> --
>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>
> <winmail.dat>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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

winmail.dat (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Context for Insert

Erik Bruchez
Administrator
I don't see it, and Nabble doesn't seem to have received the  
attachement either:

   http://www.nabble.com/RE%3A-Dynamic-Context-for-Insert-p13845347.html

-Erik

On Nov 19, 2007, at 12:57 PM, Mackinnon, Mark A. wrote:

> Hi, Erik
>
> I got the attachment when I got the ops-users copy of my message.  
> Here it is again with the zip file renamed as .txt without the  
> phrase .zip anywhere in the name.  Please let me know if it comes  
> through this time.
>
> Mark
>
> ________________________________
>
> From: [hidden email] on behalf of Erik Bruchez
> Sent: Fri 11/16/2007 7:34 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
>
>
> Is it me or the attachment did not make it?
>
> -Erik
>
> On Nov 16, 2007, at 2:53 PM, Mackinnon, Mark A. wrote:
>
>> Hi, Erik et al.
>>
>> I've attached a zip file as requested (with a .txt extension added
>> to fool my - and maybe others' - email filtering).  I'm running on a
>> TomCat server, so for me, the files live at C:\Program Files\Apache
>> Software Foundation\Tomcat 5.5\webapps\ops\WEB-INF\resources\apps
>> \TestCase - you can create a TestCase folder under your RESOURCES/
>> apps and extract the 4 files there.  I then invoke the form as http://localhost:8080/ops/TestCase/
>> .
>>
>> I can't show the problem in a single XHTML file, since it involves
>> coordination between multiple pages (unless, of course, you slap me
>> upside the head and show me a simpler solution <g>).
>>
>> Thanks in advance,
>> Mark
>>
>> ________________________________
>>
>> From: [hidden email] on behalf of Erik Bruchez
>> Sent: Fri 11/16/2007 2:30 PM
>> To: [hidden email]
>> Subject: Re: [ops-users] Dynamic Context for Insert
>>
>>
>>
>> Mark,
>>
>> Is there any way you could send your files as a self-contained zip of
>> a directory under RESOURCES/apps, with full instructions as to what
>> URL to hit and what else to do if necessary? This would make it  
>> easier
>> to run your example. Even better, can you show the problem in a  
>> single
>> XHTML file that can run in the sandbox?
>>
>> The easiest it is for people to get your app to run, the more likely
>> you are to have an answer ;-)
>>
>> -Erik
>>
>>>
>>> Hi, all
>>>
>>> I sent this last week and haven't seen a response yet - maybe I
>>> missed it amongst the ops traffic, or perhaps you all didn't see it?
>>>
>>> Anyway, here it is again with my apologies to those who are seeing
>>> it twice.
>>>
>>> Mark
>>> From: [hidden email] on behalf of Mackinnon, Mark A.
>>> Sent: Tue 11/6/2007 5:49 PM
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Dynamic Context for Insert
>>>
>>> Hi, Alex et al.
>>>
>>> I've attached some files which I hope will provide a simple example
>>> of what I'm trying to do.
>>>
>>> 1) blank-doc.xml is a template for the instance I'm trying to get
>>> filled-in.  There's some fields to be filled-in in the main document
>>> (represented by a single tag <SomeMainData/>) and 3 empty sections
>>> (A, B, and C).  The <Context> field at the end is for experimental
>>> purposes (as described below).
>>>
>>> 2) page-flow.xml describes 2 pages, one for the main portion of the
>>> document, and one for a document section.  Note that the main page
>>> points to blank-doc.xml through the default-submission attribute.
>>>
>>> 3) The model in doc-main.xhtml uses xi:include to bring in the
>>> instance (in this case, blank-doc.xml).  It also has an
>>> <xforms:input> to solicit text for the <SomeMainData/> field, then 3
>>> triggers and associated submission elements to jump to the 2nd page
>>> to fill in one of the 3 sections.
>>>
>>> 4) doc-section.xhtml also brings in the instance using xi:include.
>>> It also has a local template instance for the narrative that will be
>>> inserted into a section.  There is an <xforms:input> to solicit this
>>> narrative, then a trigger with an insert and a setvalue to copy this
>>> narrative to the desired main instance section.
>>>
>>> Note that the context attribute on the insert (line 44, doc-
>>> section.xhtml) is ".".  This seems to correspond to the value of the
>>> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things
>>> currently stand, any insertions made become children of the DocRoot
>>> element.  If I change the ref attribute in doc-main to "/DocRoot/
>>> SectionA", I can get the insertion to go where I want, but when I
>>> try to return to doc-main to fill-in another section, I can't get
>>> back to the DocRoot element.
>>>
>>> I can leave the ref in the doc-main submission as "/" and hard-code
>>> the context attribute in doc-section to "/DocRoot/SectionA" rather
>>> than ".".  Now I can get to doc-section, insert at SectionA and
>>> return to doc-main with the whole instance accessible, but I'd have
>>> to have many section pages with hard-coded context attributes, one
>>> for each section (and there a many more than 3).
>>>
>>> I thought I could "pass the context into" the section page somehow.
>>> At first, I thought I would use setvalue within each of the 3
>>> triggers in doc-main to change the contents of the <Context> tag
>>> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the
>>> context attribute in the insert as context="/DocRoot/Context" but,
>>> of course, alll I got was the string /DocRoot/Context rather than
>>> the string that is the content of that node, and no insertion took
>>> place at all.  (Actually, I don't like this technique because, when
>>> I finally submit the form, I don't want the <Context> tag hanging
>>> around.  If something like this could work, I'd rather the <Context>
>>> info was in a separate instance, but I don't know how to pass 2
>>> instances using the xi:include technique.  But first things first).
>>>
>>> Anyway, that's my problem, and I hope I've described it in enough
>>> detail.  Any suggestions would be greatly appreciated.
>>>
>>> Thanks,
>>> Mark MacKinnon
>>>
>>>
>>> From: [hidden email] on behalf of Alessandro Vernet
>>> Sent: Mon 11/5/2007 10:00 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Dynamic Context for Insert
>>>
>>> Mark,
>>>
>>> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.
>>> <[hidden email]> wrote:
>>>> Is there a way to get a dynamic insertion point into the page
>>> (specifically, I think, to be used in the context attribute of the
>>> xforms:insert tag)?  I've been attempting to set a value into a
>>> Context tag in my instance and pull that value out in the secondary
>>> page, but I can't seem to get at the value of the Context tag inside
>>> the insert (if I say <xforms:insert context="Context" ... I get the
>>> string "Context", not its value which might be "/MainDoc/Section1",
>>> "MainDoc/Section2", etc.)  I read some speculation of an
>>> xforms:variable in past forums, where I might say <xforms:variable
>>> name="current-context" ref="Context"/> and then say <xforms:insert
>>> context="$current-context" ... but apparently that has never been
>>> implemented?
>>>
>>> Yes, like you discovered, there is no <xforms:variable> in XForms or
>>> in Orbeon Forms at this point. Now I don't quite understand the  
>>> issue
>>> with <xforms:insert context="Context">. You use the context  
>>> attribute
>>> to set where the data is inserted, so I am not sure what getting the
>>> string "Context" means in this case. Could you create a simple
>>> example
>>> that runs in the XForms sandbox and that shows this issues?
>>>
>>> Alex
>>> --
>>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>>> http://www.orbeon.com/
>>>
>>> <blank-doc.xml.txt><page-flow.xml.txt>
>>>
>>> --
>>> 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
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>>
>> <winmail.dat>
>> --
>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>
> <winmail.dat>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic Context for Insert

Mackinnon, Mark A.
Hi, Erik
 
When I went to that Nabble link, I found a line at the bottom of the page  that says " winmail.dat (19K) Download Attachment <http://www.nabble.com/attachment/13845347/0/winmail.dat> ".  When I downloaded the file and renamed it from winmail.dat to winmail.zip, it contained the 4 files I was trying to send.  After unzipping, you'll have to rename page-flow.xml.txt to remove the .txt.
 
Does this help?
 
Mark

________________________________

From: [hidden email] on behalf of Erik Bruchez
Sent: Mon 11/19/2007 5:36 PM
To: [hidden email]
Subject: Re: [ops-users] Dynamic Context for Insert



I don't see it, and Nabble doesn't seem to have received the
attachement either:

   http://www.nabble.com/RE%3A-Dynamic-Context-for-Insert-p13845347.html

-Erik

On Nov 19, 2007, at 12:57 PM, Mackinnon, Mark A. wrote:

> Hi, Erik
>
> I got the attachment when I got the ops-users copy of my message.  
> Here it is again with the zip file renamed as .txt without the
> phrase .zip anywhere in the name.  Please let me know if it comes
> through this time.
>
> Mark
>
> ________________________________
>
> From: [hidden email] on behalf of Erik Bruchez
> Sent: Fri 11/16/2007 7:34 PM
> To: [hidden email]
> Subject: Re: [ops-users] Dynamic Context for Insert
>
>
>
> Is it me or the attachment did not make it?
>
> -Erik
>
> On Nov 16, 2007, at 2:53 PM, Mackinnon, Mark A. wrote:
>
>> Hi, Erik et al.
>>
>> I've attached a zip file as requested (with a .txt extension added
>> to fool my - and maybe others' - email filtering).  I'm running on a
>> TomCat server, so for me, the files live at C:\Program Files\Apache
>> Software Foundation\Tomcat 5.5\webapps\ops\WEB-INF\resources\apps
>> \TestCase - you can create a TestCase folder under your RESOURCES/
>> apps and extract the 4 files there.  I then invoke the form as http://localhost:8080/ops/TestCase/
>> .
>>
>> I can't show the problem in a single XHTML file, since it involves
>> coordination between multiple pages (unless, of course, you slap me
>> upside the head and show me a simpler solution <g>).
>>
>> Thanks in advance,
>> Mark
>>
>> ________________________________
>>
>> From: [hidden email] on behalf of Erik Bruchez
>> Sent: Fri 11/16/2007 2:30 PM
>> To: [hidden email]
>> Subject: Re: [ops-users] Dynamic Context for Insert
>>
>>
>>
>> Mark,
>>
>> Is there any way you could send your files as a self-contained zip of
>> a directory under RESOURCES/apps, with full instructions as to what
>> URL to hit and what else to do if necessary? This would make it
>> easier
>> to run your example. Even better, can you show the problem in a
>> single
>> XHTML file that can run in the sandbox?
>>
>> The easiest it is for people to get your app to run, the more likely
>> you are to have an answer ;-)
>>
>> -Erik
>>
>>>
>>> Hi, all
>>>
>>> I sent this last week and haven't seen a response yet - maybe I
>>> missed it amongst the ops traffic, or perhaps you all didn't see it?
>>>
>>> Anyway, here it is again with my apologies to those who are seeing
>>> it twice.
>>>
>>> Mark
>>> From: [hidden email] on behalf of Mackinnon, Mark A.
>>> Sent: Tue 11/6/2007 5:49 PM
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Dynamic Context for Insert
>>>
>>> Hi, Alex et al.
>>>
>>> I've attached some files which I hope will provide a simple example
>>> of what I'm trying to do.
>>>
>>> 1) blank-doc.xml is a template for the instance I'm trying to get
>>> filled-in.  There's some fields to be filled-in in the main document
>>> (represented by a single tag <SomeMainData/>) and 3 empty sections
>>> (A, B, and C).  The <Context> field at the end is for experimental
>>> purposes (as described below).
>>>
>>> 2) page-flow.xml describes 2 pages, one for the main portion of the
>>> document, and one for a document section.  Note that the main page
>>> points to blank-doc.xml through the default-submission attribute.
>>>
>>> 3) The model in doc-main.xhtml uses xi:include to bring in the
>>> instance (in this case, blank-doc.xml).  It also has an
>>> <xforms:input> to solicit text for the <SomeMainData/> field, then 3
>>> triggers and associated submission elements to jump to the 2nd page
>>> to fill in one of the 3 sections.
>>>
>>> 4) doc-section.xhtml also brings in the instance using xi:include.
>>> It also has a local template instance for the narrative that will be
>>> inserted into a section.  There is an <xforms:input> to solicit this
>>> narrative, then a trigger with an insert and a setvalue to copy this
>>> narrative to the desired main instance section.
>>>
>>> Note that the context attribute on the insert (line 44, doc-
>>> section.xhtml) is ".".  This seems to correspond to the value of the
>>> ref attribute ("/") in lines 27-29 of doc-main.xhtml.  As things
>>> currently stand, any insertions made become children of the DocRoot
>>> element.  If I change the ref attribute in doc-main to "/DocRoot/
>>> SectionA", I can get the insertion to go where I want, but when I
>>> try to return to doc-main to fill-in another section, I can't get
>>> back to the DocRoot element.
>>>
>>> I can leave the ref in the doc-main submission as "/" and hard-code
>>> the context attribute in doc-section to "/DocRoot/SectionA" rather
>>> than ".".  Now I can get to doc-section, insert at SectionA and
>>> return to doc-main with the whole instance accessible, but I'd have
>>> to have many section pages with hard-coded context attributes, one
>>> for each section (and there a many more than 3).
>>>
>>> I thought I could "pass the context into" the section page somehow.
>>> At first, I thought I would use setvalue within each of the 3
>>> triggers in doc-main to change the contents of the <Context> tag
>>> from "/DocRoot/SectionA" to "/DocRoot/SectionB" etc., then set the
>>> context attribute in the insert as context="/DocRoot/Context" but,
>>> of course, alll I got was the string /DocRoot/Context rather than
>>> the string that is the content of that node, and no insertion took
>>> place at all.  (Actually, I don't like this technique because, when
>>> I finally submit the form, I don't want the <Context> tag hanging
>>> around.  If something like this could work, I'd rather the <Context>
>>> info was in a separate instance, but I don't know how to pass 2
>>> instances using the xi:include technique.  But first things first).
>>>
>>> Anyway, that's my problem, and I hope I've described it in enough
>>> detail.  Any suggestions would be greatly appreciated.
>>>
>>> Thanks,
>>> Mark MacKinnon
>>>
>>>
>>> From: [hidden email] on behalf of Alessandro Vernet
>>> Sent: Mon 11/5/2007 10:00 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Dynamic Context for Insert
>>>
>>> Mark,
>>>
>>> On Nov 5, 2007 5:09 PM, Mackinnon, Mark A.
>>> <[hidden email]> wrote:
>>>> Is there a way to get a dynamic insertion point into the page
>>> (specifically, I think, to be used in the context attribute of the
>>> xforms:insert tag)?  I've been attempting to set a value into a
>>> Context tag in my instance and pull that value out in the secondary
>>> page, but I can't seem to get at the value of the Context tag inside
>>> the insert (if I say <xforms:insert context="Context" ... I get the
>>> string "Context", not its value which might be "/MainDoc/Section1",
>>> "MainDoc/Section2", etc.)  I read some speculation of an
>>> xforms:variable in past forums, where I might say <xforms:variable
>>> name="current-context" ref="Context"/> and then say <xforms:insert
>>> context="$current-context" ... but apparently that has never been
>>> implemented?
>>>
>>> Yes, like you discovered, there is no <xforms:variable> in XForms or
>>> in Orbeon Forms at this point. Now I don't quite understand the
>>> issue
>>> with <xforms:insert context="Context">. You use the context
>>> attribute
>>> to set where the data is inserted, so I am not sure what getting the
>>> string "Context" means in this case. Could you create a simple
>>> example
>>> that runs in the XForms sandbox and that shows this issues?
>>>
>>> Alex
>>> --
>>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>>> http://www.orbeon.com/
>>>
>>> <blank-doc.xml.txt><page-flow.xml.txt>
>>>
>>> --
>>> 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
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>>
>> <winmail.dat>
>> --
>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
>
> <winmail.dat>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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

winmail.dat (19K) Download Attachment
12