Skip to main content
16-Pearl
November 20, 2018
Solved

RadioButton SelectedValue not set to default value at Mashup load

  • November 20, 2018
  • 1 reply
  • 6705 views

Hey, did you get a response for this? I'm experiencing the same on twx 8.2.6.

Thanks

Nico

 

Best answer by posipova

To reconfirm: this is working per design. Using state definitions for the default state "off" is not the same as pre-selecting "selectedvalue" that's why it's passing as 'undefined'. 

Thank you for your time and patience!

1 reply

20-Turquoise
December 6, 2018

The issue described in the thread you linked is quite old and has been fixed almost two years ago. 

https://www.ptc.com/en/support/article?n=CS248962

We would have to gather all of the details including you sample set up to demonstrate the problem and evaluate.

nmutter16-PearlAuthor
16-Pearl
December 20, 2018

Hey

thanks for your reply. The issue you linked is different from the problem here.

 

If we have a RadioButton in the mashup and use its value for a service call, the value send to the service will be "undefined" and not the expected default value of the button.

 If you like I can create a small sample.

 

Best

Nico

nmutter16-PearlAuthor
16-Pearl
December 20, 2018

Here is an example. See the screenshots and also the two .xml files if you want to import it into your twx instance.

 

I have a radio button with a state, which has a default value off. The output is wired to a text label. If we look at the mashup in runtime, the label shows empty. If you change the state of the button the value is displayed correctly.

Screenshot from the mashup builderScreenshot from the mashup builderScreenshot mashup in runtimeScreenshot mashup in runtime

The same behaviour is when you wire the value to a service. When the service is called, no value is passed (like no string appears in the label). So when a user enters the mashup and does not touch the radiobutton, no value is set - but the defaul value is selected in the widget.