Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Whenever I am clicking on a button a new text box should be there on the mashup
You should use a Repeater.
HI Carles,
But how to use the repeater widget, as in repeater widget we give limitations, how much time it should repeat.
Hi, Repeater Widget doesn't have limitations, you should have a service on Server Side where you query for the content to show on the rows, and another service to add a new row.
Hi Carles,
Normal java script coding will work here to add a new row.
Hi,
We are not able to add the new row upon clicking of a button.
we are only able to add only one text box in one row.
What it should ideally do like that when i click on the button it should add a new text box. Please help us with the code.
Thanks,
Aditya Kumar
Hi,
We are not able to add the new row upon clicking of a button.
we are only able to add only one text box in one row.
What it should ideally do like that when i click on the button it should add a new text box. Please help us with the code.
We are using the repeater widget now.
Thanks,
Aditya Kumar
Hi,
Thank you Carles for the response. But we are struggling with the creation of the service which adds a Row to a an infotable or datatable with, which will record the value of the TextBox calledAddTextBox with a parameter "Text" with the desired text on the textbox.
Can you please help us in the creation of the service or provide us the sample code.
Thanks,
Aditya Kumar
Create a property on the Thing of type "INFOTABLE", name it myDummyInfotable. Create a DataShape for that infotable, with the desired columns (id, text)
On the Service AddTextBox ( which it's created on the same previous thing ):
var tmp = me.myDummyInfotable;
tmp.AddRow({ id: me.myDummyInfotable.length, text: Text });
me.myDummyInfotable = tmp;
Service GetRows should be just ( with a return value as Infotable with previously created DataShape ):
var result = me.myDummyInfotable
Hi Carles,
Thanks it helped us. We are able to create it.
If we want to create it with rest api service instead of using repeater.
For example:
if we have a situation like on selection of different options different different widgets should appear on the screen.
if we have selected one option radio button should come
if we have selected another option text button should come.
js widget = new js();
widget.addPanel(textBox);
Thanks,
Aditya Kumar
If you want to have different types of rows on the repeater ( on row with a text box, another with a combo, another with an image,...), you will need to record the mashup name on the Infotable, and use this MashupName to load the repeater entries.
Carles.
Thanks Carles