}
@RequestMapping(value = {"/console/app/(*:appId)/(~:appVersion)/userview/builderPreview/(*:userviewId)","/console/app/(*:appId)/(~:appVersion)/userview/builderPreview/(*:userviewId)/(*:menuId)"}, method = RequestMethod.POST)
public String preview(ModelMap map, HttpServletRequest request, @RequestParam("appId") String appId, @RequestParam(value = "appVersion", required = false) String appVersion, @RequestParam("userviewId") String userviewId, @RequestParam("json") String json, @RequestParam(value = "menuId", required = false) String menuId) throws Exception {
// get app definition so that it's set in the current thread
AppDefinition appDef = appService.getAppDefinition(appId, appVersion);
map.addAttribute("appId", appId);
map.addAttribute("appVersion", appDef.getVersion());
String tempJson = json;
if (tempJson.contains(SecurityUtil.ENVELOPE) || tempJson.contains(PropertyUtil.PASSWORD_PROTECTED_VALUE)) {
UserviewDefinition userview = userviewDefinitionDao.loadById(userviewId, appDef);