On OPS 3.5.0 I had an external eXist database with a huge XML document in it, which is filtered from a select1 to create an instance which is then fed into another select1. This worked fine, however now I have OPS 3.5.1 running the instance is loaded correctly from eXist - and I can see it in the instance inspector, however the select1 doesn't update.
I have an action within the first select1 which picks up on xforms-value-changed and fires a submission, which actions a query to the eXist database using instance data. This then uses replace="instance" to update the instance which the second select1 reads from. Any reason why the second select1 has not updated, even though the instance it relates to has? |
Administrator
|
Chris,
> On OPS 3.5.0 I had an external eXist database with a huge XML document in it, > which is filtered from a select1 to create an instance which is then fed > into another select1. This worked fine, however now I have OPS 3.5.1 > running the instance is loaded correctly from eXist - and I can see it in > the instance inspector, however the select1 doesn't update. > > I have an action within the first select1 which picks up on > xforms-value-changed and fires a submission, which actions a query to the > eXist database using instance data. This then uses replace="instance" to > update the instance which the second select1 reads from. > > Any reason why the second select1 has not updated, even though the instance > it relates to has? Try enabling XForms logging in log4j.xml: http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-logging and among the information logged, see if the submission fails by any chance. You can also try to catch xforms-submit-error and run an xforms:message in that case to see if the submission failed. -Erik -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
Like I said when I submitted this, the instance is submitted and returned fine. If I use '<widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>' I can inspect the instance and it is the new data from my exist query. I also checked the logs from eXist and found it was returning the data correctly. Its not a matter of the instance isn't updated, just OPS hasn't told the select1 to refresh.
|
Administrator
|
Chris,
Is there a way you could build a very simple example showing this in the sandbox? -Erik ChrisSpeare wrote: > Erik, > > Like I said when I submitted this, the instance is submitted and returned > fine. If I use '<widget:xforms-instance-inspector > xmlns:widget="http://orbeon.org/oxf/xml/widget"/>' I can inspect the > instance and it is the new data from my exist query. I also checked the > logs from eXist and found it was returning the data correctly. > > Its not a matter of the instance isn't updated, just OPS hasn't told the > select1 to refresh. > > > Erik Bruchez wrote: >> Chris, >> >>> On OPS 3.5.0 I had an external eXist database with a huge XML document in >>> it, >>> which is filtered from a select1 to create an instance which is then fed >>> into another select1. This worked fine, however now I have OPS 3.5.1 >>> running the instance is loaded correctly from eXist - and I can see it in >>> the instance inspector, however the select1 doesn't update. >>> >>> I have an action within the first select1 which picks up on >>> xforms-value-changed and fires a submission, which actions a query to the >>> eXist database using instance data. This then uses replace="instance" to >>> update the instance which the second select1 reads from. >>> >>> Any reason why the second select1 has not updated, even though the >>> instance >>> it relates to has? >> It should update. I don't know why it doesn't in your case. >> >> Try enabling XForms logging in log4j.xml: >> >> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-logging >> >> and among the information logged, see if the submission fails by any >> chance. >> >> You can also try to catch xforms-submit-error and run an xforms:message >> in that case to see if the submission failed. >> >> -Erik >> >> -- >> 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 >> ObjectWeb mailing lists service home page: http://www.objectweb.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Eric,
Not really feasible due to time constraints of getting this done. I have attached the relevant sections as to what I have done (and what worked under OPS 3.5.0) Create instance from eXist database and provide submission method for updating: <xforms:instance id="SellerCountyList" xxforms:readonly="true"><CountyCodes/></xforms:instance> <xforms:submission id="getSellerCounties" method="get" action="http://chrisdev.tradocs.net:8080/exist/rest/db/UNECE/?_howmany=-1&_query=for $county in /CountyCodes/Country[countryCode='{instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID}']/Counties/County return $county" serialize="false" replace="instance" instance="SellerCountyList" xxforms:readonly="true"/> <xforms:send ev:event="xforms-ready" submission="getSellerCounties"/> Select1 listing the values of the instance: <xforms:select1 ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:IdentificationID" model="model_AcknowledgementOfOrder" class="inputCountrySelect"> <xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:Name" value="instance('SellerCountyList')/County[HASC = instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:IdentificationID]/name"/> </xforms:action> <xforms:itemset model="model_AcknowledgementOfOrder" nodeset="instance('SellerCountyList')/County"> <xforms:label ref="name"/> <xforms:value ref="HASC"/> </xforms:itemset> </xforms:select1> Select1 used to update the above select1 instance data <xforms:select1 ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID" model="model_AcknowledgementOfOrder" class="inputCountrySelect"> <xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:Name" value="instance('CountryList')/item[countryCode = instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID]/countryName"/> <xforms:send ev:event="xforms-ready" submission="getSellerCounties"/> </xforms:action> <xforms:itemset model="model_AcknowledgementOfOrder" nodeset="instance('CountryList')/item"> <xforms:label> <xforms:output value="if (string-length(countryName) > 30) then concat(substring(countryName,0,30),'..') else countryName"/> </xforms:label> <xforms:value ref="countryCode"/> </xforms:itemset> </xforms:select1> As you can see the flow goes, get instance from eXist and supply to SellerCountyList and display as select1. On country select1 value-changed re-submit eXist query and replace instance. That part works, I can inspect the instance and it is correct and up to date, however the select1 control DOES NOT UPDATE. I haven't changed any code since the 2 versions, so something is wrong with the update/refresh method in 3.5.1. I have updated my copy of the CVS code and the bug is still there.
|
Administrator
|
Chris,
On 5/21/07, ChrisSpeare <[hidden email]> wrote: > Not really feasible due to time constraints of getting this done. I have > attached the relevant sections as to what I have done (and what worked under > OPS 3.5.0) It is hard for us to take those snippets and put them together to create a test case. I hope you will be able to find some time to put together a single XHTML+XForms file that we can run in the XForms sandbox. I guess you will need to do a submission to load the XML data: you can do this by putting a static XML file on some public server and doing a GET from that server. Alex -- Orbeon Forms - Web 2.0 Forms 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by ChrisSpeare
Chris,
Really we need an easily reproducible test case, because we have our own time constraints and engagements here ;-) -Erik ChrisSpeare wrote: > Eric, > > Not really feasible due to time constraints of getting this done. I have > attached the relevant sections as to what I have done (and what worked under > OPS 3.5.0) > > Create instance from eXist database and provide submission method for > updating: > > <xforms:instance id="SellerCountyList" > xxforms:readonly="true"><CountyCodes/></xforms:instance> > <xforms:submission id="getSellerCounties" method="get" > > action="http://chrisdev.tradocs.net:8080/exist/rest/db/UNECE/?_howmany=-1&_query=for > $county in > /CountyCodes/Country[countryCode='{instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID}']/Counties/County > return $county" > serialize="false" replace="instance" instance="SellerCountyList" > xxforms:readonly="true"/> > <xforms:send ev:event="xforms-ready" > submission="getSellerCounties"/> > > > Select1 listing the values of the instance: > <xforms:select1 > ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:IdentificationID" > model="model_AcknowledgementOfOrder" class="inputCountrySelect"> > <xforms:action ev:event="xforms-value-changed"> > <xforms:setvalue > ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:Name" > value="instance('SellerCountyList')/County[HASC = > instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:SubordinateCountrySub-Division/userram:IdentificationID]/name"/> > </xforms:action> > > <xforms:itemset model="model_AcknowledgementOfOrder" > nodeset="instance('SellerCountyList')/County"> > <xforms:label ref="name"/> > <xforms:value ref="HASC"/> > </xforms:itemset> > </xforms:select1> > > > Select1 used to update the above select1 instance data > > <xforms:select1 > ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID" > model="model_AcknowledgementOfOrder" class="inputCountrySelect"> > <xforms:action ev:event="xforms-value-changed"> > <xforms:setvalue > ref="instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:Name" > value="instance('CountryList')/item[countryCode = > instance('instance_model_AcknowledgementOfOrder')/userrsm:SalesContractTrade/userram:SellerParty/userram:SpecifiedAddress/userram:CountryIdentificationCountry/userram:IdentificationID]/countryName"/> > > <xforms:send ev:event="xforms-ready" submission="getSellerCounties"/> > </xforms:action> > > <xforms:itemset model="model_AcknowledgementOfOrder" > nodeset="instance('CountryList')/item"> > <xforms:label> > <xforms:output value="if (string-length(countryName) > 30) then > concat(substring(countryName,0,30),'..') else countryName"/> > </xforms:label> > <xforms:value ref="countryCode"/> > </xforms:itemset> > </xforms:select1> > > As you can see the flow goes, get instance from eXist and supply to > SellerCountyList and display as select1. On country select1 value-changed > re-submit eXist query and replace instance. > > That part works, I can inspect the instance and it is correct and up to > date, however the select1 control DOES NOT UPDATE. > > I haven't changed any code since the 2 versions, so something is wrong with > the update/refresh method in 3.5.1. I have updated my copy of the CVS code > and the bug is still there. > > > Erik Bruchez wrote: >> Chris, >> >> Is there a way you could build a very simple example showing this in the >> sandbox? >> >> -Erik >> >> ChrisSpeare wrote: >>> Erik, >>> >>> Like I said when I submitted this, the instance is submitted and returned >>> fine. If I use '<widget:xforms-instance-inspector >>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/>' I can inspect the >>> instance and it is the new data from my exist query. I also checked the >>> logs from eXist and found it was returning the data correctly. >>> >>> Its not a matter of the instance isn't updated, just OPS hasn't told the >>> select1 to refresh. >>> >>> >>> Erik Bruchez wrote: >>>> Chris, >>>> >>>>> On OPS 3.5.0 I had an external eXist database with a huge XML document >>>>> in >>>>> it, >>>>> which is filtered from a select1 to create an instance which is then >>>>> fed >>>>> into another select1. This worked fine, however now I have OPS 3.5.1 >>>>> running the instance is loaded correctly from eXist - and I can see it >>>>> in >>>>> the instance inspector, however the select1 doesn't update. >>>>> >>>>> I have an action within the first select1 which picks up on >>>>> xforms-value-changed and fires a submission, which actions a query to >>>>> the >>>>> eXist database using instance data. This then uses replace="instance" >>>>> to >>>>> update the instance which the second select1 reads from. >>>>> >>>>> Any reason why the second select1 has not updated, even though the >>>>> instance >>>>> it relates to has? >>>> It should update. I don't know why it doesn't in your case. >>>> >>>> Try enabling XForms logging in log4j.xml: >>>> >>>> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-logging >>>> >>>> and among the information logged, see if the submission fails by any >>>> chance. >>>> >>>> You can also try to catch xforms-submit-error and run an xforms:message >>>> in that case to see if the submission failed. >>>> >>>> -Erik >>>> >>>> -- >>>> 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 >>>> ObjectWeb mailing lists service home page: http://www.objectweb.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 >> ObjectWeb mailing lists service home page: http://www.objectweb.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Chris, Erik:
I seem to be having a similar problem. Let me see if I can put together a test case within the next day or so. Larry T. Chen Intelenet Communications, Inc. Erik Bruchez wrote: Chris, -- 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 |
Chris, Erik:
It seems that my problem was caused by a bad setvalue statement upon xforms-submit-done. So unfortunately (or fortunately) I'm not experiencing this bug, so I cannot produce the sandbox test case. Sorry. Larry Larry T. Chen wrote: Chris, Erik: -- 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 |
In reply to this post by ChrisSpeare
Had a look at getting a version running under the sandbox, however due to the method the xForm is called from our system the xHtml + xForm do not work correctly under the sandbox. I didn't integrate them into the system and therefore cannot tell the difference between what they should be and how to work on the sandbox. I would also not be able to get the eXist database accessible from externally due to our firewall.
I do know that the this method worked under ops 3.5.0, and when I updated to 3.5.1 (for namespace index handling) they stopped. So what changed between the two versions on the handling over select1 and refreshes? When inspecting the instance data using widget I can see the new instance data in there, however the select1 does not update, even if I issue a xforms:refresh after the send submission to eXist. |
Administrator
|
Hi Chris,
On 5/31/07, ChrisSpeare <[hidden email]> wrote: > When inspecting the instance data using widget I can see the new instance > data in there, however the select1 does not update, even if I issue a > xforms:refresh after the send submission to eXist. Hard to say. Regarding creating a reproducible test case, maybe you can just put the XML returned by the database on some publicly accessible server (even Yahoo! GeoCities works for this) and modify your the submissions in your XForms to point that server instead of the eXist database. 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Alex,
Is it possible this is a namespace issue? I have been doing more work with my select1's today and they seem very picky about the namespace they are in. Even though the form loads from an eXist instance, is it possible that the xForm is not allowing or recognising the namespace of the instance in the updated instance?
|
Administrator
|
On 5/31/07, ChrisSpeare <[hidden email]> wrote:
> Is it possible this is a namespace issue? > > I have been doing more work with my select1's today and they seem very picky > about the namespace they are in. Even though the form loads from an eXist > instance, is it possible that the xForm is not allowing or recognising the > namespace of the instance in the updated instance? Yes, it could be. Is the second select1 (the one that does not update) empty to start with, and after the instance is replace still empty? 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Yes,
The idea is that when the form loads the second select1 is empty and is filled via the instance data returned from the eXist query composed using data from the first select1. The query runs (I have checked the eXist logs) and the instance updated (checked the catalina.out log from the ConsoleAppender) as well as the widget. So the instance data that the select is bound to is updating. I have also loaded the form with the query value set to ensure that I have bound the nodeset correctly, which it is. The second select1 just does not update. I have just put blank namespaces into the source XML documents that eXist queries however this has not resolved the problem. The values that the eXist returns don't actually have a namespace applied to them - clutching as straws I think.
|
Administrator
|
On 5/31/07, ChrisSpeare <[hidden email]> wrote:
> The second select1 just does not update. I have just put blank namespaces > into the source XML documents that eXist queries however this has not > resolved the problem. The values that the eXist returns don't actually have > a namespace applied to them - clutching as straws I think. Looking again at your code posted a few messages ago, you are using an output inside a label. Can you try instead to put that value attribute directly on the <xforms:label>, and remove the <xforms:output>? 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I have already removed the output on that line. I also started a-fresh with new form, to see if I messed something up. Here is the new select1 block:
<xforms:select1 ref="instance('instance_model_SeaManifest')/ManifestInformation/Header/AmendmentType" model="model_SeaManifest" class=""> <xforms:itemset model="model_SeaManifest" nodeset="instance('AllowedAmendmentTypes')/AmendmentType"> <xforms:label ref="AmendmentDesc"/> <xforms:value ref="AmendmentCode"/> </xforms:itemset> <xforms:select1> Which works when the form initially loads, I have attached the instance data that the form loads with (test1.xml), and the instance data returned from eXist (test2.xml). The data looks the same, and indeed if I change the initial XML into the xForm so that the query returns the second instance, it works. It just doesn't update the select1 |
Administrator
|
Hi Chris,
On 6/1/07, ChrisSpeare <[hidden email]> wrote: > Which works when the form initially loads, I have attached the instance data > that the form loads with ( http://www.nabble.com/file/p10908291/test1.xml > test1.xml ), and the instance data returned from eXist ( > http://www.nabble.com/file/p10908291/test2.xml test2.xml ). The data looks > the same, and indeed if I change the initial XML into the xForm so that the > query returns the second instance, it works. It just doesn't update the > select1 I created a stand-alone example that runs in the sandbox to reproduce this. But it works for me. The example is attached to this message. Try it, and if it works for you as well, try to modify it with the code you have trying to get to a point where you can reproduce the problem you have. Then post here the updated example. 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws gaga.xml (3K) Download Attachment |
Alex,
Odd I copied that into a xhtml file and ran that on the sandbox fine. Ran it on my server and THE SAME ERROR HAPPENS!?!?! The xml file is loaded into the instance, but the select1 doesn't update. I even downloaded and installed the last nightly build of OPS to see if that solved the error. All files are the same as distrib, except properties.xml where state-handling is now client, and epilogue-servlet.xpl where theme-portal is now theme-plain. How could these settings effect this? I will now be nuking my install again and install fresh, then run the xhtml you sent again
|
state-handling! Set that back to session and it works, as client it fails. Had that config in 3.5.0 and it worked but the same config in 3.5.1 fails.
Firstly, why did it fail Secondly, what effect will this have on my app. I think all my session information is actually curled and posted so thats handled. |
Administrator
|
On 6/1/07, ChrisSpeare <[hidden email]> wrote:
> state-handling! Set that back to session and it works, as client it fails. > Had that config in 3.5.0 and it worked but the same config in 3.5.1 fails. > > Firstly, why did it fail > > Secondly, what effect will this have on my app. I think all my session > information is actually curled and posted so thats handled. I am not sure why it fails in this case, but we have a few issues right now with "client" state handling. See the 2 bugs below. The second one is limited to uploads with replace="instance" and this is a limitation that is likely to have always been there. However the first bug might be a new one. In the meantime, I recommend you set state handling to session (which is also the default). http://forge.objectweb.org/tracker/index.php?func=detail&aid=307025&group_id=168&atid=350207 http://forge.objectweb.org/tracker/index.php?func=detail&aid=307136&group_id=168&atid=350207 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |