Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
Table of Contents |
---|
English | |
---|---|
borderColor | green |
borderWidth | 1 |
titleBGColor | #ddffcc |
borderStyle | solid | title | Definition
Bean Shell Formatter allows you to write custom Java code to transform values on the datalist column. |
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This is a new feature in Joget Workflow v6. |
...
Name | Description |
---|---|
Script | Script in Java. |
The entire script is defaulted to be applied to every row in such column, hence user does not need to perform looping to apply transformation to every row.
Injected variables available for consumption are:-
Returns a String.
Code Block | ||||
---|---|---|---|---|
| ||||
return value + "append this text to every column value"; |
It is also possible to inject hash variables into the values.
Code Block | ||||
---|---|---|---|---|
| ||||
return value + " #currentUser.firstName#"; |
Example code using DataListService service method:
Code Block | ||||
---|---|---|---|---|
| ||||
//import the necessary classes
import org.joget.apps.datalist.service.DataListService;
import org.joget.apps.app.service.AppUtil;
DataListService dataListService = (DataListService) AppUtil.getApplicationContext().getBean("dataListService");
//since this entire bean shell applies to every row, "row" is automatically iterated here.
//"name" is the column id
return dataListService.evaluateColumnValueFromRow(row, "name"); |
...