Pluggable Widget - Invalid Child Element actionVariables

0
Hi,    From the Mendix API Documentation > Studio Pro 10 > Pluggable Widgets API > Property Types, I can see that it is possible to provide a microflow or nanoflow with XML elements: see here.   We also get an example of how to achieve this: <property key="actionWithVariable" type="action"> <caption>On click</caption> <description>Action to be performed when button is clicked</description> <actionVariables> <actionVariable key="random" type="Decimal" caption="Random number between 0 and 1" /> </actionVariables> </property>   But when I copy past this example to my Pluggable Widget's XML file and try to use it on a Mendix app in Mendix Studio Pro 10.6.23, I get the error below:     Do you have any idea why this happens?   Thank you in advance, João
asked
1 answers
0

Hey João,

If I'm not mistaken the property <actionVariables> is only available for 10.10 or higher.

 

To fix your problem try this:

 <property key="random" type="decimal">
      <caption>Random number between 0 and 1</caption>
      <description>A decimal value generated by the widget</description>
    </property>

    <!-- Action property -->
    <property key="onClick" type="action">
      <caption>On Click</caption>
      <description>Action to be executed when the button is clicked</description>
    </property>

And then, you can call it using the OnClick property on Typescript

If this helped, click to accept :)

 

Best Regards,

Ricardo Pereira

answered