/** * Creates a list of possible elements of a template from the template property "template-elements".<p> * * @return the list of elements in a String array with element name, nice name (if present) and mandatory flag */ public List<CmsDialogElement> computeElements() { if (m_elementList == null) { m_elementList = computeElements(getCms(), getParamTempfile(), getElementLocale()); } return m_elementList; }
/** * Returns the list of active elements of the page.<p> * * @return the list of active elements of the page */ protected List<CmsDialogElement> getElementList() { if (m_elementList == null) { m_elementList = CmsDialogElements.computeElements(getCms(), m_page, getParamTempfile(), getElementLocale()); } return m_elementList; }
/** * Returns the list of active elements of the page.<p> * * @return the list of active elements of the page */ protected List getElementList() { if (m_elementList == null) { m_elementList = CmsDialogElements.computeElements(getCms(), m_page, getParamTempfile(), getElementLocale()); } return m_elementList; }
/** * Creates a list of possible elements of a template from the template property "template-elements".<p> * * @return the list of elements in a String array with element name, nice name (if present) and mandatory flag */ public List computeElements() { if (m_elementList == null) { m_elementList = computeElements(getCms(), getParamTempfile(), getElementLocale()); } return m_elementList; }
List<CmsDialogElement> elementList = computeElements();
List elementList = computeElements();
/** * Creates a list of possible elements of a template from the template property "template-elements" * and the elements available in the provided resource file.<p> * * @param cms the CmsObject * @param xmlPageUri the resource to read the elements from * @param locale the current element locale * @return the list of elements in a String array with element name, nice name (if present) and mandatory flag */ public static List computeElements(CmsObject cms, String xmlPageUri, Locale locale) { CmsXmlPage page = null; try { // read the xmlpage file CmsFile pageFile = cms.readFile(xmlPageUri, CmsResourceFilter.IGNORE_EXPIRATION); page = CmsXmlPageFactory.unmarshal(cms, pageFile); } catch (CmsException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_XMLPAGE_FAILED_1, xmlPageUri), e); // xmlpage will be null, only "template-elements" property on template will be checked } return computeElements(cms, page, xmlPageUri, locale); }
/** * Creates a list of possible elements of a template from the template property "template-elements" * and the elements available in the provided resource file.<p> * * @param cms the CmsObject * @param xmlPageUri the resource to read the elements from * @param locale the current element locale * @return the list of elements in a String array with element name, nice name (if present) and mandatory flag */ public static List<CmsDialogElement> computeElements(CmsObject cms, String xmlPageUri, Locale locale) { CmsXmlPage page = null; try { // read the xmlpage file CmsFile pageFile = cms.readFile(xmlPageUri, CmsResourceFilter.IGNORE_EXPIRATION); page = CmsXmlPageFactory.unmarshal(cms, pageFile); } catch (CmsException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_XMLPAGE_FAILED_1, xmlPageUri), e); // xmlpage will be null, only "template-elements" property on template will be checked } return computeElements(cms, page, xmlPageUri, locale); }
List<CmsDialogElement> elementList = computeElements(); CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION); CmsXmlPage page = CmsXmlPageFactory.unmarshal(getCms(), file);
List elementList = computeElements(); CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION); CmsXmlPage page = CmsXmlPageFactory.unmarshal(getCms(), file);