Hi, Is
there any way to get the instance node value for a readonly instance node on
form submission? I will
make my requirement more clear. I have
an xforms:input whose instance is bound as readonly. From a popup jsp, I’m
setting value to this textbox and triggering the onchanged event of this
textbox using javascript. But since this node is bound as readonly, I’m
not getting this value in the instance on submission. Is there any way to get
the textbox value in the instance on submission? Please help. Thanks
in advance Jency -- 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
|
Jency,
Read-only controls are not allowed to write to instance data (that is, while they are readonly). XForms 1.1 even further protects read-only nodes by making sure that actions such as xforms:setvalue cannot modify them. The pattern we use for your kind of use case is to use a hidden xforms:input control, e.g.: <xforms:input ref="instance('my-temporary-instance')" class="xforms- disabled"/> Then, have your JavaScript use our API to set the value of an input field, see: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-get-set-value Then, use xforms:setvalue or a calculate bind to copy over the data stored in instance('my-temporary-instance') to the final location, which is the read-only node. -Erik On Feb 11, 2008, at 5:22 AM, Jency Thomas wrote: > Hi, > > Is there any way to get the instance node value for a readonly > instance node on form submission? > I will make my requirement more clear. > > I have an xforms:input whose instance is bound as readonly. From a > popup jsp, I’m setting value to this textbox and triggering the > onchanged event of this textbox using javascript. But since this > node is bound as readonly, I’m not getting this value in the > instance on submission. Is there any way to get the textbox value > in the instance on submission? Please help. > > Thanks in advance > Jency 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 |
In reply to this post by Jency Thomas
Thank you....but even the setvalue is working for readonly instance. Will that feature be removed in future? -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Tuesday, February 12, 2008 11:35 PM To: [hidden email] Subject: [ops-users] Re: issue with readonly instance Jency, Read-only controls are not allowed to write to instance data (that is, while they are readonly). XForms 1.1 even further protects read-only nodes by making sure that actions such as xforms:setvalue cannot modify them. The pattern we use for your kind of use case is to use a hidden xforms:input control, e.g.: <xforms:input ref="instance('my-temporary-instance')" class="xforms- disabled"/> Then, have your JavaScript use our API to set the value of an input field, see: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-get-s et-value Then, use xforms:setvalue or a calculate bind to copy over the data stored in instance('my-temporary-instance') to the final location, which is the read-only node. -Erik On Feb 11, 2008, at 5:22 AM, Jency Thomas wrote: > Hi, > > Is there any way to get the instance node value for a readonly > instance node on form submission? > I will make my requirement more clear. > > I have an xforms:input whose instance is bound as readonly. From a > popup jsp, I'm setting value to this textbox and triggering the > onchanged event of this textbox using javascript. But since this > node is bound as readonly, I'm not getting this value in the > instance on submission. Is there any way to get the textbox value > in the instance on submission? Please help. > > Thanks in advance > Jency 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 |
Administrator
|
That's right, we do no yet implement this in Orbeon Forms.
It was only decided by the working group back in October that this was the way readonly had to work. It came down to 1) how the XForms 1.0 specification was to be interpreted with regards to the readonly property, and 2) what behavior we really wanted to have in XForms 1.1. I strongly argued that readonly really ought to only impact UI controls, but others thought otherwise and I lost the argument. In fact, some implementations already interpreted the XForms 1.0 spec as requiring full readonly protection in the model, which was seen as a further argument in favor of this decision. So in the future, we will likely implement this constraint in Orbeon Forms. This will cause an incompatibility, but it seems hard to avoid if we want to comply with XForms 1.1. -Erik On Feb 14, 2008, at 9:00 PM, Jency Thomas wrote: > > Thank you....but even the setvalue is working for readonly instance. > Will that feature be removed in future? > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Tuesday, February 12, 2008 11:35 PM > To: [hidden email] > Subject: [ops-users] Re: issue with readonly instance > > Jency, > > Read-only controls are not allowed to write to instance data (that is, > while they are readonly). XForms 1.1 even further protects read-only > nodes by making sure that actions such as xforms:setvalue cannot > modify them. > > The pattern we use for your kind of use case is to use a hidden > xforms:input control, e.g.: > > <xforms:input ref="instance('my-temporary-instance')" class="xforms- > disabled"/> > > Then, have your JavaScript use our API to set the value of an input > field, see: > > http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-get-s > et-value > > Then, use xforms:setvalue or a calculate bind to copy over the data > stored in instance('my-temporary-instance') to the final location, > which is the read-only node. > > -Erik > > On Feb 11, 2008, at 5:22 AM, Jency Thomas wrote: > >> Hi, >> >> Is there any way to get the instance node value for a readonly >> instance node on form submission? >> I will make my requirement more clear. >> >> I have an xforms:input whose instance is bound as readonly. From a >> popup jsp, I'm setting value to this textbox and triggering the >> onchanged event of this textbox using javascript. But since this >> node is bound as readonly, I'm not getting this value in the >> instance on submission. Is there any way to get the textbox value >> in the instance on submission? Please help. >> >> Thanks in advance >> Jency > > -- > 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 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 |
Free forum by Nabble | Edit this page |