DataListService

Skip to end of metadata



Go to start of metadata


Description

  • org.joget.apps.datalist.service.DataListService
  • Under wflow-core module
  • Service class to manage data lists

Code Sample

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());

}

Methods

fromJson
public org.joget.apps.datalist.model.DataList fromJson(java.lang.String json)

Create a DataList object from JSON definition.

getAction
public org.joget.apps.datalist.model.DataListAction getAction(java.lang.String className)

Retrieve an action plugin by class name.

getAvailableActions
public org.joget.apps.datalist.model.DataListAction[] getAvailableActions()

Returns an array of available action plugins. For now, ID is the fully qualified class name.

getAvailableBinders
public org.joget.apps.datalist.model.DataListBinder[] getAvailableBinders()

Returns an array of available binder plugins. For now, ID is the fully qualified class name. 

getAvailableFormats
public org.joget.apps.datalist.model.DataListColumnFormat[] getAvailableFormats()

Returns an array of available formatter plugins. For now, ID is the fully qualified class name.

getBinder
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.

文档更新时间: 2018-11-06 07:03   作者:李庆