Specify the parameters to pass in as part of a dialog macro definition.
In the following example, we pass in x
and y
as boolean and text parameters, respectively, specifying default values and cardinality.
template-macro-def (id) {
params {
param (x) {
type (viv.core.Boolean)
min (Required) max (One)
}
param (y) {
type (viv.core.Text)
default ("default text value")
min (Optional) max (One)
}
}
content {
if (x) {
template ("#{y}")
} else {
template ("something else")
}
}
}
param optional | Parameter to which the argument (specified as a child) should bind |
Copyright 2024 Samsung All rights reserved