References to read only field not being updated

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

References to read only field not being updated

natasaradenovic
Hello team,

I have a form with read only input fields whose value changes through the
ORBEON.xforms.Document.setValue function. The read only fields are
referenced by an xf:output element and displayed to the user. When the value
of the read only field changes, then the value of the output element should
get updated. But that is not the case. The value of the output element stays
the same. This error doesn't happen with input fields that aren't marked as
read only, and it doesn't happen with xf:setvalue. It only happens if the
value is changed with ORBEON.xforms.Document.setValue.

Could you help me resolve this issue?

Regards,

Natasa

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: References to read only field not being updated

Alessandro  Vernet
Administrator
Hi Natasa,

This is because Orbeon Forms prevents the value of read-only fields from
being changed by any "event" coming from a browser. If that wasn't the case,
a malicious user could run that `setValue()`, say from the Chrome Dev Tools,
and thus modify a read-only field.

What is your logic for running the `setValue()`? I'm asking as I'm thinking
that it might be more secure for that logic to be written in XForms and use
an `xf:setvalue`.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet