/** * @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String) */ @Override protected void fillDetails(String detailId) { // get content List users = getList().getAllContent(); Iterator itCategories = users.iterator(); while (itCategories.hasNext()) { CmsListItem item = (CmsListItem)itCategories.next(); String categoryPath = item.getId(); StringBuffer html = new StringBuffer(512); try { CmsCategory category = m_categoryService.readCategory(getCms(), categoryPath, getParamResource()); if (detailId.equals(LIST_DETAIL_PATH)) { html.append(category.getRootPath()); } else if (detailId.equals(LIST_DETAIL_DESCRIPTION)) { // Append the description if one is given if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(category.getDescription())) { html.append(category.getDescription()); } } } catch (Exception e) { // noop } item.set(detailId, html.toString()); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String) */ @Override protected void fillDetails(String detailId) { // get content List<CmsListItem> items = getList().getAllContent(); Iterator<CmsListItem> itCategories = items.iterator(); while (itCategories.hasNext()) { CmsListItem item = itCategories.next(); String categoryPath = item.getId(); StringBuffer html = new StringBuffer(512); try { CmsCategory category = m_categoryService.readCategory(getCms(), categoryPath, getParamResource()); if (detailId.equals(LIST_DETAIL_PATH)) { html.append(category.getRootPath()); } else if (detailId.equals(LIST_DETAIL_DESCRIPTION)) { // Append the description if one is given if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(category.getDescription())) { html.append(category.getDescription()); } } } catch (Exception e) { // noop } item.set(detailId, html.toString()); } }
/** * Constructor.<p> * * @param category the server-side category */ public CmsCategoryBean(CmsCategory category) { this( category.getId(), category.getTitle(), category.getDescription(), category.getPath(), category.getBasePath(), category.getRootPath()); }