Fellow Orbeonians,
I'm really stuck. I kind of got something to work, but there's a race condition I don't know how to resolve. In the following snippet, I need the value to change before the GET submission occurs because this value is used as a parameter in the submission resource URL. It is currently changing the value after the submission and overwriting the value with the results of the GET. Can someone please tell me how to make this work right? Thanks, -Jim <xforms:select1 -- 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 |
Jim,
What value are you talking about? It is currently changing the value after the submission and overwriting the value with the results of the GET. Can you create a test case that can be run in sandbox? A. On Jun 10, 2008, at 9:07 PM, Jim Logan wrote:
-- 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 |
Alexander Zatko wrote:
Jim,The "instance('asset-instance')/*/@rdf:about" value is not getting updated until after the submission. If I comment out the submission, it appears to update correctly, so I'm assuming that since the submission is happening with the old value, the value is not getting updated before the submission. I'm not sure how. I'm tied to a special server that nobody else can access. Thanks, -Jim
-- 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 |
I think when you are talking about commenting out submission, you mean commenting out <xforms:send submission="list-submission" />. If that is the case, then it would be useful to know what is that submission doing. That's why an in-the-sandbox-runnable example would come handy.
Also, it is not clear to me what do you mean by "...the submission is happening with the old value, the value is not getting updated before the submission...". But maybe it is just me - I tend to get stumped where others "get it". :-) A. On Jun 10, 2008, at 10:13 PM, Jim Logan wrote:
-- 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 |
Administrator
|
Not sure if I get it ;-) But the question could be whether, upon
processing xforms-select, the value is already committed to the instance. I believe we had a discussion in the XForms Working Group on this topic, and I think that it is expected that when the user changes the value, the new value is not yet committed to the instance when you get xforms-select/deselect. As suggested, you could use xforms-value-changed instead. -Erik On Jun 10, 2008, at 10:25 PM, Alexander Zatko wrote: > I think when you are talking about commenting out submission, you > mean commenting out <xforms:send submission="list-submission" />. If > that is the case, then it would be useful to know what is that > submission doing. That's why an in-the-sandbox-runnable example > would come handy. > > Also, it is not clear to me what do you mean by "...the submission > is happening with the old value, the value is not getting updated > before the submission...". But maybe it is just me - I tend to get > stumped where others "get it". :-) > > A. > > On Jun 10, 2008, at 10:13 PM, Jim Logan wrote: > >> Alexander Zatko wrote: >>> >>> Jim, >>> >>> What value are you talking about? >> The "instance('asset-instance')/*/@rdf:about" value is not getting >> updated until after the submission. If I comment out the >> submission, it appears to update correctly, so I'm assuming that >> since the submission is happening with the old value, the value is >> not getting updated before the submission. >>> >>>> It is currently changing the value after the submission and >>>> overwriting the value with the results of the GET. >>> >>> >>> Can you create a test case that can be run in sandbox? >> I'm not sure how. I'm tied to a special server that nobody else can >> access. >> >> Thanks, >> -Jim >> >>> >>> >>> On Jun 10, 2008, at 9:07 PM, Jim Logan wrote: >>> >>>> Fellow Orbeonians, >>>> >>>> I'm really stuck. I kind of got something to work, but there's a >>>> race condition I don't know how to resolve. In the following >>>> snippet, I need the value to change before the GET submission >>>> occurs because this value is used as a parameter in the >>>> submission resource URL. It is currently changing the value after >>>> the submission and overwriting the value with the results of the >>>> GET. Can someone please tell me how to make this work right? >>>> >>>> Thanks, >>>> -Jim >>>> >>>> <xforms:select1 >>>> ref="instance('asset-instance')/*/@rdf:about" >>>> appearance="xxforms:tree" >>>> id="select1-tree" >>>> incremental="true"> >>>> <xforms:itemset >>>> nodeset="instance('containers-instance')//rdfs:label/.."> >>>> <xforms:label ref="rdfs:label" /> >>>> <xforms:value ref="@rdf:about" /> >>>> </xforms:itemset> >>>> <xforms:action ev:event="xforms-select"> >>>> <!-- Load the selected asset --> >>>> <xxforms:show dialog="not-implemented"/> >>>> <xforms:send submission="list-submission" /> >>>> </xforms:action> >>>> </xforms:select1> >>>> <xforms:output ref="instance('asset-instance')/*/@rdf:about"> >>>> <xforms:label>ID:</xforms:label> >>>> </xforms:output> >> >> >> -- >> 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 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 |
Erik Bruchez wrote:
> Not sure if I get it ;-) But the question could be whether, upon > processing xforms-select, the value is already committed to the instance. You nailed it. > > I believe we had a discussion in the XForms Working Group on this > topic, and I think that it is expected that when the user changes the > value, the new value is not yet committed to the instance when you get > xforms-select/deselect. > > As suggested, you could use xforms-value-changed instead. I tried that, but it doesn't work. What happens is it continually does a submission because the submission causes an "xforms-value-changed". It never stops! What else can I do? Thanks, -Jim -- 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 |
In reply to this post by Alexander Žaťko
Alexander Zatko wrote:
I think when you are talking about commenting out submission, you mean commenting out <xforms:send submission="list-submission" />.Correct. If that is the case, then it would be useful to know what is that submission doing.The submission is doing a GET from a calculated URI, like so: <!-- The id passed via this form's URI is saved in the main instance on the "xforms-ready" event for this submission --> The resource uses the rdf:about attribute from the asset-instance it updates. If the submission happens before the select1 updates the rdf:about attribute, it GETs the wrong thing. Thanks, -Jim -- 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 |
Check this thread:
Possibly you have the same problem i had. A. On Jun 11, 2008, at 2:51 AM, Jim Logan wrote:
-- 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 |
In reply to this post by Jim Logan-3
Jim,
> What else can I do? I didn't test it, but you could use an additional instance with an element bound to the value of instance('asset-instance')/*/@rdf:about (using the @calculate attribute). Then, you could add a hidden input field referencing that element and add an action when the hidden input field changes. Ok, not quite straightforward, but should work :-) - i've attached an example. HTH florian -- 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 select1_change-value.xhtml (3K) Download Attachment |
Florian Schmitt wrote:
> Jim, > >> What else can I do? > > I didn't test it, but you could use an additional instance with an > element bound to the value of instance('asset-instance')/*/@rdf:about > (using the @calculate attribute). Then, you could add a hidden input > field referencing that element and add an action when the hidden input > field changes. Ok, not quite straightforward, but should work :-) - > i've attached an example. Attached is a modified version to show how it works with my special submission. -Jim -- 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 select1_change-value.xhtml (4K) Download Attachment |
Free forum by Nabble | Edit this page |