Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Code Block | ||||
---|---|---|---|---|
| ||||
import org.joget.apps.app.dao.DatalistDefinitionDao; import org.joget.apps.app.model.AppDefinition; import org.joget.apps.app.model.DatalistDefinition; import org.joget.apps.app.service.AppService; import org.joget.apps.app.service.AppUtil; import org.joget.apps.datalist.model.DataList; import org.joget.apps.datalist.service.DataListService; AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService"); DataListService dataListService = (DataListService) AppUtil.getApplicationContext().getBean("dataListService"); DatalistDefinitionDao datalistDefinitionDao = (DatalistDefinitionDao) AppUtil.getApplicationContext().getBean("datalistDefinitionDao"); String id = "crm_account"; String appId = "crm"; Long appVersion = appService.getPublishedVersion(appId); AppDefinition appDef = appService.getAppDefinition(appId, appVersion.toString()); DatalistDefinition datalistDefinition = datalistDefinitionDao.loadById(id, appDef); if (datalistDefinition != null) { //retrieve the datalist object DataList list = dataListService.fromJson(datalistDefinition.getJson()); } |
...
public org.joget.apps.datalist.model.DataList fromJson(java.lang.String json)
Create a DataList object from JSON definition.
public org.joget.apps.datalist.model.DataList evaluateColumnValueFromRow(Object row, String propertyName)
Retrieve a column value from the specified row and column. row expects a row number and propertyName expects a property value from a column id.
public org.joget.apps.datalist.model.DataListAction getAction(java.lang.String className)
Retrieve an action plugin by class name.
...
public org.joget.apps.datalist.model.DataListBinder getBinder(java.lang.String id)
Retrieve a binder plugin by ID. For now the ID is the class name.
...