/** * Returns a list of current selected items.<p> * * @return a list of current selected items */ public List<CmsListItem> getSelectedItems() { Iterator it = CmsStringUtil.splitAsList(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR, true).iterator(); List items = new ArrayList(); while (it.hasNext()) { String id = (String)it.next(); items.add(getList().getItem(id)); } return items; }
/** * Returns a list of current selected items.<p> * * @return a list of current selected items */ public List<CmsListItem> getSelectedItems() { Iterator<String> it = CmsStringUtil.splitAsList( getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR, true).iterator(); List<CmsListItem> items = new ArrayList<CmsListItem>(); while (it.hasNext()) { String id = it.next(); items.add(getList().getItem(id)); } return items; }
/** * Returns the current selected item.<p> * * @return the current selected item */ public CmsListItem getSelectedItem() { try { return getList().getItem( CmsStringUtil.splitAsArray(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR)[0].trim()); } catch (Exception e) { try { return getList().getItem(""); } catch (Exception e1) { return null; } } }
CmsListItem item = getItem(id); if (item == null) { return null;
/** * Returns the current selected item.<p> * * @return the current selected item */ public CmsListItem getSelectedItem() { try { return getList().getItem( CmsStringUtil.splitAsArray(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR)[0].trim()); } catch (Exception e) { try { return getList().getItem(""); } catch (Exception e1) { return null; } } }
CmsListItem item = getItem(id); if (item == null) { return null;
/** * Returns the resource name of the selected resource.<p> * * @return the resource name of the selected resource or null if no resource was selected */ public String getSelectedResourceName() { String resParam = getJsp().getRequest().getParameter(getListId() + LIST_RACTION_SEL); if (CmsStringUtil.isNotEmpty(resParam)) { CmsListItem item = getList().getItem(resParam); return (String)item.get(LIST_COLUMN_NAME); } return null; }
/** * Returns the resource name of the selected resource.<p> * * @return the resource name of the selected resource or null if no resource was selected */ public String getSelectedResourceName() { String resParam = getJsp().getRequest().getParameter(getListId() + LIST_RACTION_SEL); if (CmsStringUtil.isNotEmpty(resParam)) { CmsListItem item = getList().getItem(resParam); return (String)item.get(LIST_COLUMN_NAME); } return null; }