Hello Pankaj,
I replaced ‘maxlength’ & 'size' properties by ‘cols’ property as I have a text widget with many lines and it works now.
But I face another issue now.
I’m using following code to dynamically create an array with 3 columns : text, radio button and text.
var my_text1_conf = {"id":"id_of_my_text1" ,
"label":{"text":"","width":"1"},
"variable":[{"name":"var_of_my_text1","value":"text_of_my_text1"}],
"js-type":"RMP_TextInput",
"lines": "3",
"cols":"100" };
var my_radiobutton_conf =
{ "id":"id_of_check",
"variable":[{"ref":"label","name":"label_of_check"},{"ref":"value","name":"var_of_check"}],
"label":{"text":"","width":"0"},
"list_type":"custom_list",
"url":"live/112501398931842687/data/4c12ecf0-0a23-11e5-b31a-22000b680007?P_version=${P_version}&P_mode=${P_mode}",
"label-field":{"tagname":"json:label"},
"value-field":{"tagname":"json:value"},
"required":"required_check",
"alignment":"vertical" ,
"tooltip":"pop_up_of_check",
};
var id_of_check = new RMP_RadioButton(my_radiobutton_conf);
id_text_1.insertAfter(id_of_check);
var my_text2_conf = {"id":"id_of_my_text2",
"label":{"text":"Comment","width":"80"},
"variable":[{"name":"var_of_my_text2","value":""}],
"js-type":"RMP_TextInput",
"lines": "3" };
var conf =
{"id":"id_array",
"variable":[{"name":"array"}],
"column":[{"header":"Test","widget":my_text1_conf},{"header":"Result","widget":my_radiobutton_conf},{"header":"Comment","widget":my_text2_conf}]};
var id_array = new RMP_Array(conf );
id_text_1.insertBelow(id_array );
document.getElementById("id_array.id_of_my_text1_0").cols = "99";
I created a webinterface with only 1 text widget ‘id_text_1’ and then tested my code in the JS tester
With this code, I get following error (see screen cpature)
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'eh' of null
If I simply replace ‘my_radiobutton_conf’ by ‘my_text1_conf’ as widget type of the 2nd column it works fine. See below :
var conf =
{"id":"id_array",
"variable":[{"name":"array"}],
"column":[{"header":"Test","widget":my_text1_conf},{"header":"Result","widget":my_text1_conf},{"header":"Comment","widget":my_text2_conf}]};
The radio button widget alone (ie not in a array) works fine as well. See Screen capture
Any idea ?
Regards