- org.joget.apps.userview.service.UserviewService
- Under wflow-core module
- Service methods used to parse userview json definition to create Userview
...
Code Block |
---|
|
import javax.servlet.http.HttpServletRequest;
import org.joget.apps.app.dao.UserviewDefinitionDao;
import org.joget.apps.app.model.UserviewDefinition;
import org.joget.apps.app.service.AppUtil;
import org.joget.apps.userview.service.UserviewService;
import org.joget.workflow.util.WorkflowUtil;
UserviewService userviewService = (UserviewService) AppUtil.getApplicationContext().getBean("userviewService");
UserviewDefinitionDao userviewDefinitionDao = (UserviewDefinitionDao) AppUtil.getApplicationContext().getBean("userviewDefinitionDao");
HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
AppDefinition appDef = AppUtil.getCurrentAppDefinition();
UserviewDefinition userviewDef = userviewDefinitionDao.loadById("crm", appDef);
if (userviewDef != null) {
//create userview
Userview userview = userviewService.createUserview(userview.getJson(), null, false, request.getContextPath(), request.getParameterMap(), null, false);
} |
Methods
createUserview
public org.joget.apps.userview.model.Userview createUserview(java.lang.String json, java.lang.String menuId, boolean preview, java.lang.String contextPath, java.util.Map requestParameters, java.lang.String key, java.lang.Boolean embed)
...