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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Very strange behavior for the Event:Parameter of Collection Widget

seanccc
17-Peridot

Very strange behavior for the Event:Parameter of Collection Widget

Hi , 

If you set MashupParameterBindings to Collection,for exampe: { "description": "theDesc" },  then the Collection will has a mashup parameter called Event:Description .   

I bind the Event:Description to a express with auto evaluate and hope it can reflect the change of the paramter,  but I feel very confused about the behavior. 

In the inner mashup, I bind the new value to a expression and bind the expression's output to the mashup paramter, what I observed is: 

  • If click via a button then the mashup parameter get changed but the Event:Description's binding expression is not triggered
  • If click via a value display then mashup parameter get changed and Event:Description's binding expression is triggered , but it always reflect the previous value .  If you check the debug info you'll see a data change event is triggered before the value display's click event , although the click event is the first action you performed. 

 

Please try the attached xml file to reproduce the strange behavior: 

1. Input value to New Value field in any cell on the left screen, then click "Button",  you'll see the upper text box get changed but the new description on the right screen doesn't change.

2. This time input value to New Value then click "Click" , repeat twice , you'll see the New description on the right screen always display the previous value . 

 

Is it a bug or designed behavior ? 

 

Regards,

Sean

7 REPLIES 7
slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

Which version of ThingWorx are you running?  We tested under 8.4.2 using the provided mashup, but were unable to recreate the issue you describe.

 

Regards.

 

--Sharon

seanccc
17-Peridot
(To:slangley)

@slangley ,

My environment is ThingWorx 8.4.2-b2151 + Chrome  76.0.3809.100  + Windows server 2016 + Postgresql 10.x.

 

Did you test it via importing my attached entity.xml ? 

 

regards,

Sean

slangley
23-Emerald II
(To:slangley)

Hi @seanccc.

 

Yes, we did test it using the .xml you provided.

 

To ensure we're on the same page, can you provide some screenshots of you're configuration and what you're seeing?  You may also want to test it using a different browser.

 

Regards.

 

--Sharon

seanccc
17-Peridot
(To:slangley)

@slangley ,

 

I found why you cannot reproduce it .  I exported the mashup via tag but for certain reason , not all of the mashup get exported.  

 

Please try the attached new entity.  You'll find a mashup called "CollectionEventParamter" after importing.  Executing the mashup, you'll observe: 

Input value to any "New Value" field on the left screen, then if click Button , the right screen has no changes.  if click "Click", the  "New description" of right screen display the previous value of the "New Value".  

 

I tried in both of Chrome and Firefox,  and got the same result. 

 

Regards,

Sean

seanccc
17-Peridot
(To:slangley)

Hi @slangley ,

 

Did you get a chance to try my updated entities.xml ?  

slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

We're sorry for the delay.  We have tested with the .xml you provided and the behavior is as you described.  However, it appears the issue is related to your logic.  If you enter a value and click the first time, it populates the description.  But if you click a 2nd time without changing anything, the value that was entered is populated.

 

We're really not understanding the use case.   Please explain the functionality you are trying to test with this mashup.

 

Regards.

 

--Sharon

seanccc
17-Peridot
(To:slangley)

@slangley , 

 

My use case is simple ,  my collection widget has a mashup which contains valuedisplay.  I want the click on the valuedisplay can notify the outer collection.   For each parameter defined in collection widget ,there is a property called Event: %ParameterName%.  I want to utilize  the property to achieve the purpose. 

 

I expect the logic would be:  click the valuedisplay -> update the mashup paramter inside collection ->  monitor the parameter change via property Event: %ParameterName% -> do something in Expression when change occurs. 

 

However ,  as I described in the post , I found the property Event: %ParameterName% doesn't reflects the current value .

Top Tags