cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

RadioButton SelectedValue not set to default value at Mashup load

Level 7

RadioButton SelectedValue not set to default value at Mashup load

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

Thanks

Nico

 

6 REPLIES

Re: RadioButton SelectedValue not set to default value at Mashup load

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.

Re: RadioButton SelectedValue not set to default value at Mashup load

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

Re: RadioButton SelectedValue not set to default value at Mashup load

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.

MashupBuilder.pngScreenshot from the mashup builder2018-12-20 15_42_25-RadioButtonTest.pngScreenshot 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.

Re: RadioButton SelectedValue not set to default value at Mashup load

I apologize for the delayed response, for some reason I did not see a notification on the update on this.

Thank you for attaching detailed description and entities! However, I cannot reproduce the issue with your supplied entities.

Per the state definitions,  I see the default is sset to Off. When I run the mashup, the label is empty/not set and the default button selected is off. When I toggle, I see proper label change on both states. What am I missing? Uness it is fixed now (I tried on latest 8.3 and unreleased 8.4)

 

Re: RadioButton SelectedValue not set to default value at Mashup load

No worries about the delay! I wish you a happy new year ;)

 

Thank your for looking into it. "When I run the mashup, the label is empty/not set " Exactly this is the problem. The button tells you the state is "Off", but this state is not communicated initialy to subscribed services/widgets. I expect the label to show "Off" as well, as this is the state of the radioButton.

 

If we use the radioButton state in a service, the button tells us "Off" but the service will get "undefined". Exactly as the label in the example is not set to the correct value, which should be "Off". Only if the user interacts with the radio button, the state will be communicated correctly.

 

I hope you understand what I mean? Let me know ;)

 

Thanks

Nico

Re: RadioButton SelectedValue not set to default value at Mashup load

Thank you and happy new year to you as well!

 

Ok, I see what you are talking about. This works per design -- the binding on the label is for "selectedvalue".  But there is nothing selected at the start -- it's just the default "state" is "off". Once you make the selection then the trigger works. Does this make sense?