/** * Adds a value element of the type the original xpath indicates * at the selected index to the XML content document.<p> * * The "original xpath" is the path used in the constructor when creating * this value sequence.<p> * * @param cms the current users OpenCms context * @param index the index where to add the new value element * * @return the added XML content value element * * @see CmsXmlContent#addValue(CmsObject, String, Locale, int) * @see #addValue(CmsObject, String, int) * @see #addValue(CmsObject, I_CmsXmlSchemaType, int) */ public I_CmsXmlContentValue addValue(CmsObject cms, int index) { return addValue(cms, getPath(), index); }
/** * Removes the value element of the sequence type at the selected index from XML content document.<p> * * @param index the index where to remove the value element * * @see CmsXmlContent#removeValue(String, Locale, int) */ public void removeValue(int index) { m_content.removeValue(getPath(), getLocale(), index); // re-initialize the value list m_values = m_content.getValues(getPath(), getLocale()); } }
/** * Removes the value element of the sequence type at the selected index from XML content document.<p> * * @param index the index where to remove the value element * * @see CmsXmlContent#removeValue(String, Locale, int) */ public void removeValue(int index) { m_content.removeValue(getPath(), getLocale(), index); // re-initialize the value list m_values = m_content.getValues(getPath(), getLocale()); } }
/** * Adds a value element of the sequence type at the selected index to the XML content document.<p> * * @param cms the current users OpenCms context * @param index the index where to add the new value element * * @return the added XML content value element * * @see CmsXmlContent#addValue(CmsObject, String, Locale, int) */ public I_CmsXmlContentValue addValue(CmsObject cms, int index) { I_CmsXmlContentValue newValue = m_content.addValue(cms, getPath(), getLocale(), index); // re-initialize the value list m_values = m_content.getValues(getPath(), getLocale()); return newValue; }
/** * Adds a value element of the given type * at the selected index to the XML content document.<p> * * @param cms the current users OpenCms context * @param type the type to add * @param index the index where to add the new value element * * @return the added XML content value element * * @see CmsXmlContent#addValue(CmsObject, String, Locale, int) * @see #addValue(CmsObject, String, int) * @see #addValue(CmsObject, int) */ public I_CmsXmlContentValue addValue(CmsObject cms, I_CmsXmlSchemaType type, int index) { String xpath = CmsXmlUtils.concatXpath(CmsXmlUtils.removeLastXpathElement(getPath()), type.getName()); return addValue(cms, xpath, index); }
/** * Adds a value element of the type indicated by the given xpath * at the selected index to the XML content document.<p> * * @param cms the current users OpenCms context * @param xpath the path that indicates the element type in the content definition * @param index the index where to add the new value element * * @return the added XML content value element * * @see CmsXmlContent#addValue(CmsObject, String, Locale, int) * @see #addValue(CmsObject, I_CmsXmlSchemaType, int) * @see #addValue(CmsObject, int) */ public I_CmsXmlContentValue addValue(CmsObject cms, String xpath, int index) { I_CmsXmlContentValue newValue = m_content.addValue(cms, xpath, getLocale(), index); // re-initialize the value list m_values = m_content.getValues(getPath(), getLocale()); return newValue; }