My understanding is that the Repeater is one widget that can be used to display an input capable list structure. I have a service that returns a data shape based infotable. How do I build an input capable list structure using this infotable?
Absolutely, I actually did an example like this with a repeater widget. It isn't posted in Downloads.
But how I have done it, is I have a ThingWorx DataTable. I use a service to retrieve the rows. Then I bind that to the repeater widget.
The Mashup tied to the Repeater widget retrieves each row based on the Key but you could just as well have it display the Info table being passed in.
To do the updates, I use a button that toggles a Session Parameter, which then fires a Service in the Parent mashup that contains the repeater widget to update the DataTable (Or any info table of data)
I'm not sure if what I wrote makes sense, let me know if you need more information and How To.
Thank you Pai, for all the help. In your earlier reply, how would you use the button in the Mashup that is tied to the Repeater widget ? In other words how would you detect that something changed ? Will it fire the service in the parent for each line change ?
Hi Vish, I use a button that toggles a Session Property in the parent mashup and then I use the Session Property Changed event to fire the actual table Add/Update inside the repeater mashup. This way I can trigger it outside of the repeater Mashup but have it act within it.
Thank you for the reply Pai. I do need some clarifications. Is the button in the Mashup ? If so, how is it fired ? I would like capture the changes to the list as the user keys into a text box in the Mashup. If you are using the Session Property Changed event on the parent, how are you passing the changed data to the service ? I am using a Infotable in my example.
My button triggers a service that checks the Session Property. If it is false it sets it to true and vice versa.
Please do provide me an example. That will really help.
So you have a mashup parm of type Infotable. I was using a Infotable column to pass between the repeater and the mashup. Thank you
Hi Vish, I put the example in our Downloads section. Please note that there are probably other ways to do this that might work even better. I believe I have some redundancy build into this example. It is called ThingWorx DataTable Editor using a Repeater Widget Example
Pai, I think I got this working. However, it appears that I would need to use a button WITHIN the mashup to alert (using Session Updater prop) the parent (that contains the repeater) that a row was changed - and then the parent would process the "selected" row (session prop change event).
Is there any other way to auto detect a change (row-col) without requiring the user to click the button ?
Hi Vish, I just have the button in the Parent mashup, what happens on the Add/Update is that it will process the whole Infotable, so each row within the Repeater is Added or Updated if necessary.
Pai, it would help if I can look at your example. I am getting an error when trying to import your example - "Data Table Thing: CGCEMTasksTable has an invalid data shape". Let me know. Thank you
Thank you for your help. I got the repeater widget working for a long input capable list. If the list size exceeds the repeater widget height, the scroll bar shows up. If I scroll down and scroll back up, I am loosing any content that was keyed in before scrolling down. How would I persist the content ?
I am also facing the same problem like Viswesh Palasur.
"How would I persist the content ? If the list size exceeds the repeater widget height, the scroll bar shows up. If I scroll down and scroll back up, I am loosing any content that was keyed in before scrolling down."
is there any update on this post? Thank you.