Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Setting values depending on alert dialog answer

27 views
Skip to first unread message

Javier Echaniz

unread,
Oct 21, 2024, 11:01:49 AM10/21/24
to Orbeon Forms
Hi, i have an alert dialog dispatched when a value changed and i would like to change values and clear repetitions depending on the dialog's answer.

I use 2018 version, and i don´t know what to do or what i'm doing wrong. 

This is the part of the code that would do the operations.

Could you  give me some help?

Thanks in advance.

   <xh:head>
        <xh:title>INVESTIGACION</xh:title>
        <xh:style type="text/css"/>
        <xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">  

....
           
            <xf:action id="getDispatch-binding">
                <xf:action event="xforms-value-changed" ev:observer="cuerpo-control" if="true()">
                    <xf:dispatch target="overwrite-file-dialog" name="fr-show">
                        <xf:property name="message" value="'Do yu want to continue?'"/>                        
                    </xf:dispatch>
                </xf:action>                
            </xf:action>

....

</xf:model>
    </xh:head>
<xh:body>
        <fr:view>

....
 
<fr:alert-dialog id="overwrite-file-dialog">
<fr:negative-choice>                            
<fr:repeat-clear repeat="iteracionesLink"/>
<xf:setvalue ref="//cuerpoanterior" value="'NEGATIVE XF'"/>    
<fr:control-setvalue value="'NEGATIVE FR'"  control="cuerpoanterior" at="0"/>
</fr:negative-choice>
<fr:positive-choice>
<xf:setvalue ref="//cuerpoanterior" value="'POSITIVE'"/>      
<fr:control-setvalue value="'POSITIVE FR'"  control="cuerpoanterior" />
</fr:positive-choice>
</fr:alert-dialog>

Alessandro Vernet

unread,
Oct 22, 2024, 7:37:18 PM10/22/24
to orb...@googlegroups.com
Hi Javier,

`<fr:repeat-clear>` is part of the action syntax (see link below), which cannot be used inside a `<fr:positive-choice>` or `<fr:negative-choice>`. For context, is this for a form you created with Form Builder, or is it for XForms you wrote yourself? Also, what triggers the dialog to appear?


--
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 orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/a5963f31-18ce-4e6e-b8c4-477e5dbb03f2n%40googlegroups.com.

Echaniz

unread,
Oct 23, 2024, 12:32:20 PM10/23/24
to orb...@googlegroups.com
Hi Alex,

the form has been created with Form Builder (except for the action and dialog message, what i wrote myself) and i have no triggers in the code for the dialog to appear, it appears when the field "cuerpo" changes its value.

Javier..

You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/JN-NQR1KMfA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CANrzKk%3Dipk%3DcY268c6FORELn-XtbmiybToB2VNcTZSNxPMFfaw%40mail.gmail.com.

Alessandro Vernet

unread,
Oct 28, 2024, 4:08:35 PM10/28/24
to orb...@googlegroups.com
Hi Javier,

Thank you for the additional details.

- Is your dialog box showing?
- We need to find a replacement for `<fr:repeat-clear repeat="iteracionesLink"/>`. It will most likely be a `<xf:delete ref="...">`. To determine exactly what to delete, I recommend examining the data structure using the XForms inspector.
- You shouldn't need the `fr:control-setvalue` since you are already setting the value elsewhere. I recommend removing these instances. At best, they won't have any effect, and at worst, they could cause problems.

-Alex

Alessandro Vernet

unread,
Nov 4, 2024, 2:58:46 PM11/4/24
to orb...@googlegroups.com
Hi Javier,

Were you able to replace `<fr:repeat-clear repeat="iteracionesLink"/>` with `<xf:delete ref="...">` based on your data structure? If not and you're still working on this, let me know if I can help.

-Alex

Javier Echaniz

unread,
Nov 15, 2024, 12:23:14 PM11/15/24
to Orbeon Forms
Hi Alex, sorry for not answering.

I've been moved into another project and i've been told not to continue with this issue. As soon as i could have a little rest i'll try to guess about this dialog.

Thanks.

Javier.

Alessandro Vernet

unread,
Nov 15, 2024, 12:38:29 PM11/15/24
to orb...@googlegroups.com
Hi Javier,

No problem at all - thanks for letting us know. If you do get a chance to revisit this dialog issue in the future, feel free to reach out and I'll be happy to help figure out the right approach with the `xf:delete` replacement.

-Alex

--
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 orbeon+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages