Hi,
I have following problem with form preview. In my xforms code I use get-request-parameter() method: <xf:action ev:event="xforms-ready" ev:observer="fr-form-model" if="true()"> <xf:setvalue ref="instance('fr-form-instance')/*/*[name() = 'valueFromGet']" value="xxf:get-request-parameter('valueFromGet')"/> </xf:action> and It works correctly when i launch formRunner: I mean the value of get parameter: 'valueFromGet' is loading do control named: 'valueFromGet'. The problem is appearing when user clicks 'preview'. In that case control 'valueFromGet' is empty. I don't know why get-request-parameter doesn't work in preview mode. regards, Tom |
I ran into this behavior recently also.
The problem appears to live at: https://github.com/orbeon/orbeon-forms/blob/master/src/resources/forms/orbeon/builder/form/model.xml#L394 Query string parameters simply aren't passed along from the form being edited to the preview. To solve this I think we'd need another function similar to xxf:get-request-parameter that simply returns a copy of the query string. I would imagine something like that should live near: https://github.com/orbeon/orbeon-forms/blob/master/src/main/scala/org/orbeon/oxf/xforms/function/xxforms/RequestFunction.scala#L43 and also be registered around: https://github.com/orbeon/orbeon-forms/blob/master/src/main/scala/org/orbeon/oxf/xforms/library/XXFormsIndependentFunctions.scala#L45 Hopefully one of the developers will respond and let us know if this is a reasonable thing to do. Aaron Spike On Thursday, November 6, 2014 11:39:35 AM UTC-6, pumbosha wrote: Hi, This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College. -- 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]. |
Here's a patch that potentially fixes this issue (only minimally tested).
https://github.com/orbeon/orbeon-forms/pull/1980 This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College. -- 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]. |
I solved this problem by adding if statement to action:
<xf:action ev:event="xforms-ready" ev:observer="fr-form-model" if="xxf:get-request-parameter('valueFromGet')"> <xf:setvalue ref="instance('fr-form-instance')/*/*[name() = 'valueFromGet']" value="xxf:get-request-parameter('valueFromGet')"/> </xf:action> |
In reply to this post by Aaron Spike
A better solution is on the way:
https://github.com/orbeon/orbeon-forms/issues/1982 This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College. -- 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]. |
Free forum by Nabble | Edit this page |