From version 3.2
edited by Maurice Gasco
on 2015/10/30 09:33
To version 4.1
edited by Maurice Gasco
on 2015/10/30 09:49
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -38,6 +38,7 @@
38 38  
39 39  (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
40 40  * recipient is either :
41 +(% style="font-size: 14px;" %)
41 41  ** a string representing an email address
42 42  ** an Entity object representing a User or a Group
43 43  ** an Array of Entity objects of Users or Groups
... ... @@ -44,7 +44,95 @@
44 44  * group is an Entity object representing a group used for delegation
45 45  
46 46  
48 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
49 +=== (% style="font-size: 20.44px;" %)setCc(recipient)(%%) ===
50 +
47 47  (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
52 +Set the copy informations
48 48  
49 -example:
50 -{{code language="javascript"}}var result = amount1.Multiply(taxrate);{{/code}}
54 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
55 +* recipient is either :
56 +(% style="font-size: 14px;" %)
57 +** a string representing an email address
58 +** an Entity object representing a User or a Group
59 +** an Array of Entity objects of Users or Groups
60 +
61 +
62 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
63 +=== (% style="font-size: 20.44px;" %)setBCc(recipient)(%%) ===
64 +
65 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
66 +Set the copy informations
67 +
68 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
69 +* recipient is either :
70 +(% style="font-size: 14px;" %)
71 +** a string representing an email address
72 +** an Entity object representing a User or a Group
73 +** an Array of Entity objects of Users or Groups
74 +
75 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start;" %)
76 +(((
77 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
78 +=== (% style="font-size: 20.44px;" %)setVariable(name, data)(%%) ===
79 +
80 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
81 +Set a variable in the javascript context used to compose the notification. Subject and Body of the notification template can be composed dynamically with variable resolution using the following syntax : ${data.rqTitle}
82 +
83 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
84 +* name is the variable name, for example "data"
85 +* data is an Entity object or a basic javascript object
86 +
87 +(((
88 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
89 +=== (% style="font-size: 20.44px;" %)compose()(%%) ===
90 +
91 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
92 +Build the notification using the templates, parameters and variables set and returns en Entity object representing the notification. The notification can be modified before being sent.
93 +)))
94 +)))
95 +
96 +
97 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start;" %)
98 +(((
99 +(% style="font-size: 14px;" %)
100 +(((
101 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
102 +=== (% style="font-size: 20.44px;" %)send()(%%) ===
103 +
104 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
105 +Compose and send the notification
106 +)))
107 +)))
108 +
109 +
110 +(% style="text-align: start;" %)
111 +(((
112 +(((
113 +(% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start;" %)
114 +=== (% style="font-size: 20.44px;" %)send(notification)(%%) ===
115 +
116 +(% style="text-align: start;" %)
117 +(% style="line-height: 19.6px;" %)Send the notification.
118 +
119 +* notification is an Entity object representing the notification. This object is the result of the compose function
120 +)))
121 +)))
122 +
123 +
124 +
125 +
126 +
127 +(% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
128 +=== (% style="color: rgb(34, 34, 34); font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 19.6px; text-align: start; background-color: rgb(245, 245, 245);" %)Examples:(%%) ===
129 +
130 +{{code language="javascript"}}
131 +var notif = new Notification();
132 +notif.init(param);
133 +notif.setVariable("data", data);
134 +
135 +notif.setTo("user1@gmail.com");
136 +notif.setTo("user2@gmail.com");
137 +notif.setFrom("noreply@requea.com");
138 +notif.send();
139 +{{/code}}
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation