1// actionParamTypesController.js
2({
3 putbooleanc : function(component, event, helper) {
4 helper.putdatatype(component, "c.pboolean", true);
5 },
6 putintc : function(component, event, helper) {
7 helper.putdatatype(component, "c.pint", 10);
8 },
9 putlongc : function(component, event, helper) {
10 helper.putdatatype(component, "c.plong", 2147483648);
11 },
12 putdecimalc : function(component, event, helper) {
13 helper.putdatatype(component, "c.pdecimal", 10.80);
14 },
15 putdoublec : function(component, event, helper) {
16 helper.putdatatype(component, "c.pdouble", 10.80);
17 },
18 putstringc : function(component, event, helper) {
19 helper.putdatatype(component, "c.pstring", "hello!");
20 },
21 putobjectc : function(component, event, helper) {
22 helper.putdatatype(component, "c.pobject", true);
23 },
24 putblobc : function(component, event, helper) {
25 helper.putdatatype(component, "c.pblob", "some blob as string");
26 },
27 // Date value is in ISO 8601 date format
28 putdatec : function(component, event, helper) {
29 helper.putdatatype(component, "c.pdate", "2020-01-31");
30 },
31 // Datetime value is in ISO 8601 datetime format
32 putdatetimec : function(component, event, helper) {
33 helper.putdatatype(component, "c.pdatetime", "2020-01-31T15:08:16.000Z");
34 },
35 // Set time in milliseconds.
36 // You can use (new Date()).getTime() to set the milliseconds
37 puttimec : function(component, event, helper) {
38 helper.putdatatype(component, "c.ptime", 3723004);
39 //helper.putdatatype(component, "c.ptime", (new Date()).getTime());
40 },
41 putlistoflistoflistofstringc : function(component, event, helper) {
42 helper.putdatatype(component, "c.plistoflistoflistofstring", [[['a','b'],['c','d']],[['e','f']]]);
43 },
44 putmapofstringc : function(component, event, helper) {
45 helper.putdatatype(component, "c.pmapofstring", {k1: 'v1'});
46 },
47 putcustomclassc : function(component, event, helper) {
48 helper.putdatatype(component, "c.pcustomclass", {
49 s: 'my string',
50 i: 10,
51 l: ['list value 1','list value 2'],
52 m: {k1: 'map value'},
53 os: {b: true}
54 });
55 },
56})