Hi All,
I'm having a problem with XForms state that I cannot figure out. This might be a bug or maybe I'm doing something wrong. I have an XForms view hooked up to an XPL model as follows: <page path-info="/Configuration/edit" view="Configuration-edit.xhtml" model="Configuration-edit.xpl" /> On initial load of Configuration-edit.xhtml, I'm able to make changes and save the form data in eXist with no problem. When I load Configuration-edit.xhtml again, I give Configuration-edit.xpl a document-id to load the same form data again from eXist. No problem, the data loads fine and displays fine. Then I make more changes to the same form data, and save the data. The XPL debug output shows the updated XML. No problem. But here comes the problem, when I load the Configuration-edit.xhtml page again giving it the same document-id, the XPL debug output shows the correctly updated XML, yet the XForms display shows the first version of the data that I entered! This is what makes me suspect it's a bug in OPS, since the final XML output of Configuration-edit.xpl that's fed to Configuration-edit.xhtml is different from what's shown on the screen! Another thing I noticed is that invoking the XForms page using a post submission from another XForms page results in a URL of /xforms-server-submit showing on the browser rather than the URL that I submitted to (i.e. /Configuration/edit). Is this a related bug? I would hope to be able to keep the URLs that was used as the submission action, rather than every submission resulting in the URL /xforms-server-submit. Here's what Configuration-edit.xpl looks like: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude"> <p:param name="instance" type="input" debug="true"/> <p:param name="data" type="output" debug="true"/> <p:choose href="#instance"> <p:when test="/*/@document-id"> <!-- Load document from DB --> <p:processor name="oxf:pipeline"> <p:input name="config" href="../data-access/read-document.xpl"/> <p:input name="document-id" href="#instance"/> <p:output name="document-info" ref="data"/> </p:processor> </p:when> <p:otherwise> <!-- Generate new document --> . . . </p:otherwise> </p:choose> </p:config> Thanks in advance for any help. Larry T. Chen Software Engineer Intelenet Communications, Inc. -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Larry,
This could be a caching issue, but it is hard to say without actually running the code. Would you be able to create a simple use case with just a few files that reproduces this and that we can run locally? Alex On 7/11/06, Larry T. Chen <[hidden email]> wrote: > Hi All, > > I'm having a problem with XForms state that I cannot figure out. This > might be a bug or maybe I'm doing something wrong. > > I have an XForms view hooked up to an XPL model as follows: > > <page path-info="/Configuration/edit" view="Configuration-edit.xhtml" > model="Configuration-edit.xpl" /> > > On initial load of Configuration-edit.xhtml, I'm able to make changes > and save the form data in eXist with no problem. > When I load Configuration-edit.xhtml again, I give > Configuration-edit.xpl a document-id to load the same form data again > from eXist. No problem, the data loads fine and displays fine. > Then I make more changes to the same form data, and save the data. The > XPL debug output shows the updated XML. No problem. > But here comes the problem, when I load the Configuration-edit.xhtml > page again giving it the same document-id, > the XPL debug output shows the correctly updated XML, yet the XForms > display shows the first version of the data that I entered! > > This is what makes me suspect it's a bug in OPS, since the final XML > output of Configuration-edit.xpl that's fed to Configuration-edit.xhtml > is different from what's shown on the screen! > > Another thing I noticed is that invoking the XForms page using a post > submission from another XForms page results in a URL of > /xforms-server-submit showing on the browser rather than the URL that I > submitted to (i.e. /Configuration/edit). Is this a related bug? I > would hope to be able to keep the URLs that was used as the submission > action, rather than every submission resulting in the URL > /xforms-server-submit. > > Here's what Configuration-edit.xpl looks like: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xi="http://www.w3.org/2001/XInclude"> > > <p:param name="instance" type="input" debug="true"/> > <p:param name="data" type="output" debug="true"/> > > <p:choose href="#instance"> > <p:when test="/*/@document-id"> > <!-- Load document from DB --> > <p:processor name="oxf:pipeline"> > <p:input name="config" > href="../data-access/read-document.xpl"/> > <p:input name="document-id" href="#instance"/> > <p:output name="document-info" ref="data"/> > </p:processor> > </p:when> > <p:otherwise> > <!-- Generate new document --> > . . . > </p:otherwise> > </p:choose> > > </p:config> > > Thanks in advance for any help. > > Larry T. Chen > Software Engineer > Intelenet Communications, Inc. > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |