* @param
* @return
*/
public ActionForward queryMenuItems(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
Dto dto = new BaseDto();
String nodeid = request.getParameter("node");
dto.put("parentid", nodeid);
dto.put("menutype", SystemConstants.MENUTYPE_BUSINESS);
List menuList = g4Reader.queryForList("Resource.queryMenuItemsByDto", dto);
Dto menuDto = new BaseDto();
for (int i = 0; i < menuList.size(); i++) {
menuDto = (BaseDto) menuList.get(i);
if (menuDto.getAsString("leaf").equals(SystemConstants.LEAF_Y))
menuDto.put("leaf", new Boolean(true));
else
menuDto.put("leaf", new Boolean(false));
if (menuDto.getAsString("id").length() == 4)
menuDto.put("expanded", new Boolean(true));
}
write(JsonHelper.encodeObject2Json(menuList), response);
return mapping.findForward(null);
}