| Table of Contents | ||
|---|---|---|
|
HeliumDev Client Setup
java -jar HeliumDev-app-1.5.0-jar-with-dependencies.jar he-dev> set server=dev he-dev> server set uri=https://dev.mezzanineware.com he-dev> server set user=usrname he-dev> server password he-dev> set mobileNumber=278212345678 he-dev> set project=Helium Tutorial he-dev> project set roles=System Admin he-dev> project set dir=/workspace/helium-tut
HeliumDev Client Common Commands
java -jar HeliumDev-app-1.5.0-jar-with-dependencies.jar
he-dev> help
he-dev> new-sandbox
he-dev> build
he-dev> run
he-dev> release
Project Folder Structure
| Code Block |
|---|
├── notification-templates
│ └── en.json
├── builtin-reports
│ └── foo-report
│ ├── foo_image.png
│ └── foo_report.jrxml
├── jasper-reports
│ └── bar-report
│ ├── master.jrxml
│ └── report.json
├── model
│ └── MyCustomObject.mez
├── sql-scripts
│ └── myStartupScript.sql
├── services
│ └── UserInvite.mez
├── utilities
│ └── dateStringFormatter.mez
└── web-app
├── email-templates
│ └── template1.html
├── images
│ ├── BarMenuIcon.png
│ └── FooMenuIcon.png
├── lang
│ └── en.lang
├── presenters
│ ├── PresenterFilesCon.mez
│ └── TainingDslUnits.mez
└── views
│ ├── BarView.vxml
│ └── FooView.vxml
└── static
├── dashboard.html
├── dashboard.css
└── dashboard.js |
Hello World
| Code Block | ||||
|---|---|---|---|---|
| ||||
<info label="some.lang_file.label"> <binding variable="helloWorld" /> </info> |
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
string helloWorld;
void init() {
helloWorld = "Hello, World";
} |
DSL Basics
| Code Block | ||
|---|---|---|
| ||
//this is a comment
/* this is a multi-
line comment */
unit UnitName;
MyCustomFoo globalScopedFoo;
void myFunction () {
globalScopedFoo = MyCustomFoo:new();
}
MyCustomFoo myReturnTypeFunction () {
MyCustomFoo localScopedFoo = MyCustomFoo:new();
return localScopedFoo;
} |
View Basics
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<ui xmlns="http://uiprogram.mezzanine.com/View"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://uiprogram.mezzanine.com/View ../View.xsd">
<view label="view_heading.for_this_view" unit="LinkedUnit"
init="onPageLoadFunction" destroy="onPageExitFunction">
<!-- this is a comment -->
<info label="at.least.one.widget">
<binding variable="variableInLinkedUnit" />
<binding variable="otherUnit:variableInOtherUnit" />
</info>
</view>
</ui> |
Navigation
| Code Block | ||
|---|---|---|
| ||
<view label="view_heading.nurse_management" unit="NurseManagement"> |
| Code Block | ||||
|---|---|---|---|---|
| ||||
<view label="view_heading.nurse_details" unit="NurseDetails"> <button label="action.back" action="back" /> |
| Code Block | ||||
|---|---|---|---|---|
| ||||
unit NurseDetails;
//returns member of auto-generated enum DSL_VIEWS
DSL_VIEWS back() {
return DSL_VIEWS.NurseManagement; //corresponds to vxml file name
} |
Objects
| Code Block | ||
|---|---|---|
| ||
object Person
{
string fname;
string sname;
int age;
} |
| Code Block | ||
|---|---|---|
| ||
persistent object Person
{
string fname;
string sname;
int age;
} |
Collections
| Code Block |
|---|
int[] integerCollection; MyCustomObject[] objectCollection; MyCustomObject fourthObject = objectCollection.get(3); MyCustomObject objectAtIndex = objectCollection.get(i); |
Built-in Data Types
type | operators | samples | comparison operators | samples |
|---|---|---|---|---|
int | + - * / % | int a = (2 + 3 * 15) % 2 | > < == >= <= != | if (a <= b) {... |
string | > < == >= <= != | string a = "alpha"; string b = "bravo"; | ||
decimal | + - * / % | decimal a = (2 + 3 * 15) % 2 | > < == >= <= != | if (a <= b / 5) {... |
bigint | + - * / % | bigint a = (2 + 3 * 1500000000000l) % 2 | > < == >= <= != | if (a <= b) {... |
bool | || && | bool a = b || c | == != | if ((i == 1) && (i == j)) {... |
date | > < == >= <= != | date d = Mez:now(); | ||
datetime | > < == >= <= != | datetime dt = Mez:now(); | ||
uuid | == != | if (u == u2) { ... | ||
void | ||||
blob | ||||
json | ||||
jsonarray |
(Variables of all primitive types are null after declaration, until assigned a value)
Control Structures
| Code Block | ||
|---|---|---|
| ||
if(name == "Tom") {
Mez:log("Hello Tom!");
} else if (name == "Frank") {
Mez:log("Hello Frank!");
} else {
Mez:log("Hi! Who are you?");
} |
| Code Block | ||
|---|---|---|
| ||
for(int i = 1; i <= 10; i++) {
Mez:log(i);
} |
| Code Block | ||
|---|---|---|
| ||
int i = 0;
for(; i < 10;) {
Mez:log("While style loop!");
} |
| Code Block | ||
|---|---|---|
| ||
SomeObject[] objectCollection = SomeObject:all();
foreach(SomeObject currentObject: objectCollection) {
currentObject.description = "Foreach style loop!";
} |
| Code Block | ||
|---|---|---|
| ||
try {
Mez:log("inside try statement");
// throws an exception now ...
} catch (ex){
Mez:log("inside catch statement");
} finally {
Mez:log("inside finally statement");
} |
| Code Block | ||
|---|---|---|
| ||
void throwStatementExample(){
Mez:log("Throwing an exception now ...");
string error = "Oops, something went wrong!";
throw error;
} |
Type Conversion
| Code Block |
|---|
date value = Date:fromString("2017-01-02");
datetime value = Date:fromTimeString("2017-1-20 08:45:12 GMT"); |
| Code Block |
|---|
int value = Integer:fromString("12"); |
| Code Block |
|---|
decimal value = Decimal:fromString("12.01"); |
| Code Block |
|---|
bigint value = 1631104351673l; //note the 'l' at the end of the literal bigint value = "1631104351673";//no 'l' when converting from string bigint value = 1234; //implicit converstion from int bigint value = Date:now();//implicit conversion from datetime |
| Code Block |
|---|
uuid value = Uuid:fromString("c1bd11cb-4bb2-43e5-88b4-009ed40fc69f"); |
| Code Block |
|---|
string s = value; //value = any of above types
string s = String:concat("", value); |
| Code Block |
|---|
json jsonPerson = /%
{
"name": "John",
"surname": "Smith",
"phoneNumber": "555-6162"
}
%/; |
| Code Block |
|---|
jsonarray pets = /%
[
{
"name": "Jasmine",
"type": "Dog"
},
{
"name": "Markus",
"type": "Mole-rat"
}
]
%/; |
| Code Block |
|---|
jsonarray primeNumbersJsonArray = /%[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]%/; int[] primeNumbersPrimitiveArray = primeNumbersJsonArray; |
Built-in Functions (BIFs)
Date BIFs
| Code Block |
|---|
date d = Date:addSeconds(startDate, 10);
date d = Date:addDays(startDate, 10);
date d = Date:addMonths(startDate, 10);
int diff = Date:secondsBetween(dt1, dt2);
int diff = Date:daysBetween(d1, d2);
int diff = Date:monthsBetween(d1, d2);
int yr = Date:extract(dt, "year");
date d = Date:fromString("2017-01-02");
datetime dt = Date:fromUnixTimestamp(1631104351673l);
datetime dt = Date:fromTimeString("2017-1-20 08:45:12 GMT");
datetime dt = Date:now();
date d = Date:today(); |
String BIFs
| Code Block |
|---|
string s = String:concat("abc","def");
string[] result = String:split("abc def", " ");
string[] result = String:split("abc|def", "\\|");
int i = String:length("Hello world");
string s = String:substring("Hello World", 1, 4);
string s = String:lower("Hello World");
string s = String:upper("hello world");
bool b = String:startsWith("Hello World", "Hello");
bool b = String:endsWith("Hello World", "World");
bool b = String:regexMatch("27000111222", "^27[0-9]{9,}$");
int i = String:indexOf("Hello World", "ello");
string s = String:join(stringCollection, " ");
string s = String:translate("translation.key");
string s = /%
This is a
multi line string
declaration
%/;
string encodedTest = String:urlEncode("The string ü@foo-bar");
// encodedTest = The+string+%C3%BC%40foo-ba
string s = String:regexReplaceFirst("ab32c56desd111", "[0-9]", "X");
string s = String:regexReplaceAll("ab32c56desd111", "[0-9]", "X");
string s = String:replaceAll("Hello World", "l", "L"); |
Integer BIFs
| Code Block |
|---|
int value = Integer:fromString("12"); |
Decimal BIFs
| Code Block |
|---|
decimal value = Decimal:fromString("12.01"); |
Uuid BIFs
| Code Block |
|---|
uuid value = Uuid:fromString("c1bd11cb-4bb2-43e5-88b4-009ed40fc69f"); |
Math BIFs
| Code Block |
|---|
int i = Math:pow(2, 8); decimal d = Math:sqrt(3); decimal r = Math:random(); |
Mez BIFs
| Code Block |
|---|
datetime t = Mez:now();
date d = Mez:today();
Mez:log("Hello, World");
Mez:warn("Something could go wrong");
Mez:error("Something went wrong");
Mez:alert("translation.key");
Mez:alertWarn("translation.key");
Mez:alertError("translation.key");
Mez:userRole();
Mez:email(person, "email.descriptionKey", "email.subjectKey", "email.bodyKey");
Mez:email(person.emailAddress, "email.descriptionKey", "email.subjectKey", "email.bodyKey");
Mez:email(person.emailAddress, "email.descriptionKey", "email.subjectKey", "email.bodyKey", EMAIL_TEMPLATES.email_template);
Mez:email(person.emailAddress, "email.descriptionKey", "email.subjectKey", "email.bodyKey", "farmer_purchase_invoice_report/FarmerPurchaseInvoice.jrxml", "additional_farmer_report_1/AdditionalFarmerReport1.jrxml");
Mez:emailAttach(person.emailAddress, "email.descriptionKey", "email.subjectKey", "email.bodyKey", {"farmer_purchase_invoice_report/FarmerPurchaseInvoice.jrxml", getFarmerPurchaseInvoiceFileName()});
uuid smsId = Mez:sms(client, "mobileNumber", "exampleKey.smsText");
MezBatch stockUpdateBatch = Mez:createBatch(fileUpload._id, fileUpload.data);
Mez:requestPaymentStatus(paymentId);
Mez:createCryptoKey(name, key);
string result = Mez:encrypt("encrypt this value");
string result = Mez:encrypt("encrypt this value", "mykey");
string result = Mez:decrypt(encryptedValueVar);
string result = Mez:decrypt(encryptedValueVar, "mykey"); |
Persistent Entity BIFs
| Code Block |
|---|
Person p = Person:new();
p.save();
Person p = Person:read(getUserUUID());
Person:delete(p);
Person currentPerson = Person:user();
p.invite(p.mobileNumber);
p.invite(p.mobileNumber, p.emailAddress);
person.removeRole();
person.notify("description.key", "sms.content.key",
"email.subj.key", "email.content.key");
Person[] plist = Person:fromCsv(uploadedFile.blobData);
person.pay(shop, "ZAR", amount);
person.payWithRef(shop, "ZAR", amount, ourPayId, extraPayInfoString);
person.forcePasswordReset();
Person p = Person:fromCsvLine(personBatch.header, personBatchItem.value);
|
Selector BIFs
| Code Block |
|---|
Person[] plist = Person:all(); Person[] plist = Person:equals(deleted, false); Person[] plist = Person:empty(mobileNum); Person[] plist = Person:between(dob, date1, date2); Person[] plist = Person:lessThanOrEqual(age, num); Person[] plist = Person:lessThan(age, num); Person[] plist = Person:greaterThan(age, num); Person[] plist = Person:attributeIn(state, state_list); Person[] plist = Person:relationshipIn(reportsTo, person); Person[] plist = Person:contains(name, "a"); Person[] plist = Person:beginsWith(name, "A"); Person[] plist = Person:endsWith(name, "a"); Person[] plist = Person:notEquals(deleted, true); Person[] plist = Person:notEmpty(mobileNum); Person[] plist = Person:notBetween(dob, date1, date2); Person[] plist = Person:notContains(name, "a"); Person[] plist = Person:notBeginWith(name, "A"); Person[] plist = Person:notEndsWith(name, "a"); Person[] plist = Person:notAttributeIn(state, state_list); Person[] plist = Person:notRelationshipIn(reportsTo, person); Person[] plist = Person:union(equals(rating, "good"), equals(rating, "excellent")); Person[] plist = Person:diff(equals(), equals()); Person[] plist = Person:intersect(equals(deleted, false, equals(active, true)); Person[] plist = Person:and(equals(deleted, false), equals(active, true)); |
Collection BIFs
| Code Block |
|---|
Person p = plist.pop();
Person p = plist.drop();
int len = plist.length();
Person firstPerson = plist.first();
Person lastPerson = plist.last();
plist.append(p);
plist.prepend(p);
plist.add(i, p);
Person p = plist.get(i);
plist.remove(i);
plist.sortAsc("dob"); //sort according to date attr. "dob"
plist.sortDesc("dob");
plist.clear();
plist.notify("description.key", "sms.content.key",
"email.subj.key", "email.content.key");
Person[] plistDoctorsSubset = plist.select(equals(title, "Dr.")); |
SQL BIFs
| Code Block |
|---|
QueryResult[] result = sql:query(selectQuery, param_1, ..., param_n); int updates = sql:execute(updateQuery, param_1, ..., param_n); |
JSON Types BIFs
| Code Block |
|---|
json personJsonObject = "{}";
personJsonObject.jsonPut("name", "John");
string personName = personJsonObject.jsonGet("name"); |
API BIFs
| Code Block |
|---|
// Outbound API specific MezApiRequest request = ... MezApiResponse response = api:get(request); MezApiResponse response = api:post(request); MezApiResponse response = api:delete(request); MezApiResponse response = api:put(request); // Inbound API specific api:setResponseCode(404); |
Assert BIFs
| Code Block | ||
|---|---|---|
| ||
//Assert:isEqual takes two values (objects or primitive types) and evaluates whether they are equal Assert:isEqual(value1, value2, "value1 and value2 are not equal"); Assert:isEqual(1, 0, "1 and 0 are not equal"); //Assert:isNotEqual takes two values (objects or primitive types) and evaluates whether they are not equal Assert:isNotEqual(value1, value1, "value1 and value1 are equal"); Assert:isNotEqual(1, 1, "1 and 1 are equal"); //Assert:isTrue takes one boolean value (variable/primitive/function that returns bool) and evaluates whether it is true Assert:isTrue(false, "false is not true"); Assert:isTrue(someFunction(), "someFunction() does not return true"); //Assert:isFalse takes one boolean value (variable/primitive/function that returns bool) and evaluates whether it is true Assert:isFalse(true, "true is not false"); Assert:isFalse(someFunction(), "someFunction() does not return false"); //Assert:isBoth takes two boolean value (variable/primitive/function that returns bool) and evaluates whether both are true Assert:isBoth(true, false, "both true and false are not true"); Assert:isBoth(someFunction(), anotherFunction(), "someFunction() and anotherFunction() do not both return true"); //Assert:isEither takes two boolean value (variable/primitive/function that returns bool) and evaluates whether one is true Assert:isEither(false, false, "neither false nor false is true"); Assert:isEither(someFunction(), anotherFunction(), "neither someFunction() nor anotherFunction() returns true"); //Assert:isNull takes one value (variable/primitive/function) and evaluates whether it is null or returns null Assert:isNull(1, "1 is not null"); Assert:isNull(someFunction(), "someFunction() does not return null"); //Assert:isNotNull takes one value (variable/primitive/function) and evaluates whether it is not null or returns non-null Assert:isNotNull(null, "null is null"); Assert:isNotNull(someFunction(), "someFunction() returns null"); //Assert:isGreater takes two values and evaluates whether the second is greater than the first Assert:isGreater(2, 1, "1 is not greater than 2"); Assert:isGreater(value1, value2, "value2 is not greater than value1"); //Assert:isGreaterOrEqual takes two values and evaluates whether the second is greater than or equal to the first Assert:isGreaterOrEqual(2, 1, "1 is not greater than or equal to 2"); Assert:isGreaterOrEqual(value1, value2, "value2 is not greater than or equal to value1"); //Assert:isLess takes two values and evaluates whether the second is less than the first Assert:isLess(1, 2, "2 is not less than 1"); Assert:isLess(value1, value2, "value2 is not less than value1"); //Assert:isLessOrEqual takes two values and evaluates whether the second is less than or equal to the first Assert:isLessOrEqual(1, 2, "2 is not less than or equal to 1"); Assert:isLessOrEqual(value1, value2, "value2 is not less than or equal to value1"); |
Object Annotations
| Code Block |
|---|
@Role("Manager")
object Manager { ... } |
| Code Block |
|---|
@Restrict("DevManager", equals(dept, "development"))
object Employee { ... } |
| Code Block |
|---|
@RolesAllowed("Manager", "rw")
object EmployeeRecord { ... } |
| Code Block |
|---|
@NotTracked
persistent object Person { ... } |
Function Annotations
| Code Block |
|---|
@RoleName
string getGymEmployeeRoleName(GymEmployee employee) { ... } |
| Code Block |
|---|
// Run at 2:15 AM every day
@Scheduled("15 2 * * *")
void foobar() { ... }
// Run at 06:00 every week-day (days 1 to 5)
@Scheduled("0 6 * * 1-5")
void foobar() { ... }
// Run every ten minutes
@Scheduled("*/10 * * * *")
void foobar() { ... }
//minute | hour | day-of-month | month | day-of-week |
| Code Block |
|---|
@ReceiveSms("Test description")
void receiveSmsNumberText(string number, string text) { ... }
@ReceiveSms("Test description")
void receiveSmsNumberTextJson(string number, string text, json aggregatorFields) { ... }
@ReceiveSms("Test description")
void receiveSmsObjectText(Nurse nurse, string text) { ... }
@ReceiveSms("Test description")
void receiveSmsObjectNumberText(Nurse nurse, string number, string text) { ... } |
| Code Block |
|---|
@OnSmsResultUpdate
void smsResultUpdateCallback(__sms_result__ smsResult) { ... } |
| Code Block |
|---|
@OnScheduledFunctionResultUpdate
void scheduledFunctionResultUpdateCallback(
__scheduled_function_result__ scheduledFunctionResult) { ... } |
| Code Block |
|---|
@OnPaymentUpdate
void paymentUpdate(uuid id, PAYMENT_STATUS status, string message){
Mez:log(Strings:concat("Updated Payment ", id, status, message);
} |
| Code Block |
|---|
@POST("v1/farmer/profile/documentation")
void postFarmerDocumentation(FarmerDocumentation farmerDocumentation) {...} |
| Code Block |
|---|
@ResponseExclude("middleName")
@ResponseExpand("crops")
@GET("v1/farmer/mobileNumber/{mobileNumber}")
Farmer getFarmer(string mobileNumber) {...} |
| Code Block |
|---|
@PUT("v1/farmer")
void updateFarmer(Farmer farmer) {...} |
| Code Block |
|---|
@DELETE("v1/farmer/mobileNumber/{mobileNumber}")
json deleteFarmer(string mobileNumber, bool purge) {...} |
| Code Block | ||
|---|---|---|
| ||
@Test
void someUnitTest() {
string value1 = "John Doe";
string value2 = "Jane Smith";
Assert:isEqual(value1, value2, "value1 and value2 are not equal");
}
@Test
string someUnitTestWithReturn() {
string value1 = "John Doe";
string value2 = "Jane Smith";
Assert:isEqual(value1, value2, "value1 and value2 are not equal");
return value1;
} |
| Code Block | ||
|---|---|---|
| ||
@USSD("description1")
MezUssdMenu processUssd(int menu, int selection) {
...
}
@USSD("description2")
MezUssdMenu processUssd(int menu, int selection, json gatewayArgs) {
...
} |
Object Attribute Annotations
| Code Block |
|---|
persistent object Person
{
@FirstnameValidator("validr.msg.fname")
string fname;
... |
| Code Block |
|---|
persistent object Person
{
string name;
@OneToOne
IdentityDocument idDoc via person;
@OneToMany
Vehicle vehicles via owner;
@ManyToOne
House home via residents;
@ManyToMany
Person children via parents;
} |
Atomic Validators
| Code Block |
|---|
validator PersonNameValidator {
notnull(); minlen(2); maxlen(50);
} |
| Code Block |
|---|
validator BondRepaymentMonths {
notnull(); minval(0); maxval(72);
} |
| Code Block |
|---|
validator CTMetroPhoneNumber {
notnull(); regex("021-[7..9]{7}");
} |
| Code Block |
|---|
validator EmailValidator {
notnull(); regex("\b[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]{2,4}\b");
} |
View Widgets
| Code Block | ||
|---|---|---|
| ||
<button label="button.exec" action="exec" /> |
| Code Block | ||
|---|---|---|
| ||
<action label="action.exec" action="exec" /> |
| Code Block | ||
|---|---|---|
| ||
<textfield label="my.textfield.label" datatype="text">
<binding variable="MyUnit:string_value" />
</textfield> |
| Code Block | ||
|---|---|---|
| ||
<textarea label="my.textfield.label">
<binding variable="MyUnit:string_value" />
</textarea> |
| Code Block | ||
|---|---|---|
| ||
<datefield label="my.datefield.label">
<binding variable="MyUnit:date_value"/>
</datefield> |
| Code Block | ||
|---|---|---|
| ||
<invite label="my.invite.label"> <binding variable="MyUnit:user_object"/> <role>MyUserRole</role> </invite> |
| Code Block | ||
|---|---|---|
| ||
<fileupload label="my.fileupload.label">
<binding variable="MyUnit:object">
<attribute name="attributeName" />
</binding>
</fileupload> |
| Code Block | ||
|---|---|---|
| ||
<filebrowser label="my.filebrowser.label">
<collectionSource function="MyUnit:values" />
</filebrowser> |
| Code Block | ||
|---|---|---|
| ||
<map lat="item_lat" long="item_long"> <collectionSource variable="MyUnit:map_data"> <markerAction label="Mmy.map.action.open" action="MyUnit:open_item"/> <markerTitle value="MyUnit:get_title"/> <markerIcon value="MyUnit:get_icon"/> <markerDesc value="MyUnit:get_desc"/> </map> |
| Code Block | ||
|---|---|---|
| ||
<code title="code_title.code_snippet">
<binding variable="QuestionManagement:question">
<attribute name="codeSnippet"/>
</binding>
</code> |
| Code Block | ||||
|---|---|---|---|---|
| ||||
<gallery title="my.gallery.heading" imageAttribute="image" descriptionAttribute="description"> <collectionSource function="getObjectsWithImageBlobs"/> <binding variable="selectedObject"/> </gallery> |
| Code Block | ||
|---|---|---|
| ||
<submit label="submit.exec" action="exec" /> |
| Code Block | ||
|---|---|---|
| ||
<info label="info.shop_owner_firstname">
<binding variable="shop">
<attribute name="owner.firstName"/>
</binding>
</info>
<info label="info.welcome" value="info.system_admin_welcome"/> |
| Code Block | ||
|---|---|---|
| ||
<checkbox label="my.checkbox.label"> <binding variable="MyUnit:bool_value" /> </checkbox> |
| Code Block | ||
|---|---|---|
| ||
<select label="my.select.label">
<binding variable="MyUnit:selected_value" />
<enum>SDS_SADSA</enum>
</select>
<select label="my.select.label">
<binding variable="MyUnit:selected_value" />
<collectionSource variable="MyUnit:values"/>
</select> |
| Code Block | ||
|---|---|---|
| ||
<table title="my.table.title" defaultSortColumn="1" defaultSortDirection="descending" csvExport="disabled">
<collectionSource variable="MyUnit:plist"/>
<column heading="Firstname">
<attributeName>fname</attributeName>
</column>
<column heading="Surname">
<attributeName>sname</attributeName>
</column>
</table> |
| Code Block | ||
|---|---|---|
| ||
<menuitem icon="icon_name" label="my.menu.item"> <userRole>MyUserRole</userRole> </menuitem> |
| Code Block | ||
|---|---|---|
| ||
<navigation outcome="success" target ="myview_name"/> |
| Code Block | ||
|---|---|---|
| ||
<wall label="my.wall.label" defaultSort="timeStamp" commentHandler="MyUnit:commentFunction" buttonLabel="my.custom.label.for.comment.button">
<collectionSource function="MyUnit:collection" />
<itemTitle value="MyUnit:getTitle"/>
<itemText value="MyUnit:getText"/>
<itemOwner value="MyUnit:getOwner"/>
<itemTime value="MyUnit:getTime"/>
<itemIcon value="MyUnit:getIcon"/>
</wall> |
Dynamic Content
Dynamic Widget Titles/Labels
| Code Block | ||
|---|---|---|
| ||
<table title="translation.key"> ... </table> <submit label="translation.key"> |
| Code Block | ||
|---|---|---|
| ||
translation.key = {UnitFoo:globalVar} |
| Code Block | ||
|---|---|---|
| ||
Unit UnitFoo;
string globalVar;
init() {
globalVar = getLabel();
...
} |
Dynamic Widget Visibility
| Code Block | ||
|---|---|---|
| ||
<table title="table.label"> <visible variable="isTableVisible"/> <collectionSource variable="items"/> <column heading="col.name.label"> <attributeName>name</attributeName> </column> <column heading="col.desc.label"> <attributeName>description</attributeName> <visible variable="isDescVisible"/> </column> </table> <checkbox label="have.at.least.one.visible.widget"> <visible variable="isCheckboxVisible"/> <binding variable="checkboxVar"/> </checkbox> |
| Code Block | ||
|---|---|---|
| ||
bool checkboxVar;
void init() {
checkboxVar = getCheckboxVar() {
...
} |
Built-in Objects
object | about | usage sample | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Implicit interface that is implemented by every @Role persistence object. |
| |||||||
| SMS results from Helium duplicated to the app schema. |
| |||||||
| Scheduled function results from Helium duplicated to the app schema. |
| |||||||
| Used by Helium to create a CSV batch for later processing. |
| |||||||
| Used by Helium to create CSV batch items for later processing. Each record represents a line from a CSV file and is related to a MezBatch. |
| |||||||
| Used as an argument to the outbound API built-in functions in Helium. |
| |||||||
| Used as a result type for the outbound API built-in functions in Helium. |
| |||||||
| Used as a data source to build map legends. |
| |||||||
| Used to represent menu content that is returned for USSD requests. |
| |||||||
| Used to represent menu options for menus that are returned for USSD requests. |
| |||||||
| Used to request to create a crypto key for this app. |
|