Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
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); }
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)
public org.joget.apps.userview.model.Userview createUserview(org.joget.apps.app.model.AppDefinition appDef, 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)
Create userview fron json
public java.lang.String getMenuId(org.joget.apps.userview.model.UserviewMenu menu)
Gets the id of an userview menu
public java.lang.String getUserviewDescription(java.lang.String json)
Gets userview description from json definition
public java.lang.String getUserviewName(java.lang.String json)
Gets the name of a userview from json definition
public org.joget.apps.userview.model.UserviewSetting getUserviewSetting(org.joget.apps.app.model.AppDefinition appDef, java.lang.String json)
Get userview setting object
public org.joget.apps.userview.model.UserviewTheme getUserviewTheme(java.lang.String appId, java.lang.String userviewId)
Gets the userview theme used by an userview