You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 7
Next »
Template Types
Bean Shell
Template Name | Description |
---|
AJAX Options Binder | - To dynamically load available options based on dependency value.
See guide here. Template:
import org.joget.apps.app.service.AppUtil;
import org.joget.commons.util.LogUtil;
import org.joget.apps.form.model.FormRowSet;
import org.joget.apps.form.model.FormRow;
import org.joget.apps.form.service.FormUtil;
/**
* @param values - Dependency values of the controlling field.
*
* @return FormRowSet object which contains one or more FormRow object.
* All FormRow objects are expected to have "value" and "label" property.
*/
public FormRowSet load(String[] values) {
FormRowSet rows = new FormRowSet();
if (values != null && values.length > 0) {
String dependencyValue = values[0];
// Continue your code here
/* Sample code:
FormRow option = new FormRow();
option.setProperty(FormUtil.PROPERTY_VALUE, "sample-value");
option.setProperty(FormUtil.PROPERTY_LABEL, "sample-label");
rows.add(option);
*/
}
return rows;
}
return load(values);
|
Datalist Action | - To execute logic as row action and/or bulk action in the datalist.
See guide here. Template:
import org.joget.apps.app.service.AppUtil;
import org.joget.commons.util.LogUtil;
import javax.servlet.http.HttpServletRequest;
import org.joget.apps.datalist.model.DataList;
import org.joget.apps.datalist.model.DataListActionResult;
/**
* @param httpRequest - HTTP Request object of current HTTP Request.
* @param dataList - Datalist object of the current datalist
* @param rowKeys - A String array of record ID(s) for datalist row(s) that is selected for this action
*
* @return DataListActionResult object contains result for datalist to perform next
*/
public DataListActionResult executeAction(HttpServletRequest httpRequest, DataList dataList, String[] rowKeys) {
DataListActionResult result = new DataListActionResult();
result.setType(DataListActionResult.TYPE_REDIRECT);
result.setUrl("REFERER");
if (rowKeys != null && rowKeys.length > 0) {
for (String key : rowKeys) {
// Continue your code here
/* Sample code:
System.out.println(key);
*/
}
}
return result;
}
return executeAction(httpRequest, datalist, rowKeys);
|
Datalist Formatter |
|
Form Load Binder |
|
Form Options Binder |
|
Form Store Binder |
|
Form Validator |
|
Multirow Form Load Binder |
|
Multirow Form Store Binder |
|
Multirow Form Validator |
|
Permission |
|
Process Participant |
|
Process Tool |
|
Route Decision |
|
CSS
Write CSS here.
div#container {
display: block;
color: red;
}
p.container-text {
color: blue;
}
HTML
Write HTML here.
<div id="container">
<p class="container-text">I am a sample text inside a container.</p>
</div>
Javascript
Template Name | Description |
---|
jQuery |
|
JSON
Write JSON here.
{
"eBooks":[
{
"language":"Python",
"edition":"two"
},
{
"language":"SQL",
"edition":"three"
},
{
"language":"Java",
"edition":"four"
}
]
}
SQL
Template Name | Description |
---|
SELECT |
|
INSERT |
|
UPDATE |
|
DELETE |
|
Text
Write any text here.
XML
Write XML here.
<eBooks>
<element>
<language>Python</language>
<edition>two</edition>
</element>
<element>
<language>SQL</language>
<edition>three</edition>
</element>
<element>
<language>Java</language>
<edition>four</edition>
</element>
</eBooks>
Related Pages