Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • org.joget.apps.datalist.service.JsonUtil
  • Under wflow-core module
  • Utility class containing methods to create datalist from JSON
  • This Utility class should not use directly. Please use DataListService instead.

Code Sample

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.AppUtil;
import org.joget.apps.datalist.model.DataList;

AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");
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);
 
DataList dataList = JsonUtil.fromJson(datalistDefinition.getJson(), DataList.class);

Fields

PROPERTY_ACTION
public static final java.lang.String PROPERTY_ACTION = "action";

...