List of all conf JSON for new RMP_TextInput(conf)

665 views
Skip to first unread message

yves.d...@gmail.com

unread,
Jun 4, 2015, 4:06:52 PM6/4/15
to suppor...@runmyprocess.com
Hello,

I try to configure new RMP_TextInput(conf) as per http://docs.runmyprocess.com/API_Reference/JS/RMP_TextInput.html but I can't find how to configure the lenght of the text widget corresponding to Max visible char. parameter in the standard TextInput widget.

More generally, where can I find the exhaustive list of JSON parameters for all the series of new RMP xxx ?

Regards
Yves
Text widget size.jpg

Pankaj Kumar

unread,
Jun 5, 2015, 7:20:28 AM6/5/15
to suppor...@runmyprocess.com, yves.d...@etrali.com
Hi,

you can use the "maxLength" property to allow the maximum character entered in text input and "size" to no. of character visible in Text Input.
Please find the sample code below:-

var conf = {"id":"id_input_pp","label":{"text":"Text input"},"variable":[{"name":"my_variable","value":"foo"}],"js-type":"RMP_TextInput", "maxLength":"5", "size":"3"};
var id_input_pp= new RMP_TextInput(conf);
widget_id.insertBefore(id_input_pp);

document.getElementById("id_input_pp").size = "10"; 
document.getElementById("id_input_pp").maxLength = "20"; 

Note:- "maxLength" and "size" property defined in the conf object is not working at the "input" initialization time, so I set them once the "input" is initialized. We will update you soon on this behavior.

These property is not documented in the RMP user guide, but you can explore as most of the properties are same as of html control property.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

Yves

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/90e7956f-4245-4c77-808e-042acb5bd2b3%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

yves.d...@gmail.com

unread,
Jun 5, 2015, 2:01:54 PM6/5/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello Pankaj,

It doesn't work. Widget size doesn't change
I've used following code :

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",
"maxLength":"210",
"size":"210" };

var id_my_text1= new RMP_TextInput(my_text1_conf);
id_html_info.insertBelow(id_my_text1);
document.getElementById(id_of_my_text1).maxLength = "199";
document.getElementById(id_of_my_text1).size = "199";

When I inspect the element, the maxlength property appears but not the size property. See enclosed. And even if I add it manually to the page, it doesn't change the size.

Regards
Yves
RMP - text widget size.jpg
Message has been deleted

Pankaj Kumar

unread,
Jun 7, 2015, 7:31:39 AM6/7/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hi Yves,

For changing the size of the input control, please set the width of it, code is as follows:-

document.getElementById("id_of_my_text1").style.width= "200px"


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


Regards
Yves

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

yves.d...@gmail.com

unread,
Jun 8, 2015, 5:49:28 PM6/8/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
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
Array OK with text.jpg
Error Property 'eh' of null.jpg

Pankaj Kumar

unread,
Jun 13, 2015, 1:35:36 AM6/13/15
to suppor...@runmyprocess.com, Yves de Veyrac
Hi Yves,

"js-type" is missing in the "my_radiobutton_conf" Object declaration. 

Please use the "my_radiobutton_conf" as below:-

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" ,
"js-type":"RMP_RadioButton",
"tooltip":"pop_up_of_check",
};


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages