[opencms-dev] Value for path attribute in AddValue method[Scanned]

Jon Mayes jon.mayes at pegasus-homes.co.uk
Fri Nov 11 13:38:27 CET 2005


Are you trying to add a new content type? If so this link might be
helpful:

 

http://www.wdogsystems.com/opencms/opencms/demos/structured_content_edit
ing.html 

 

  _____  

From: Manoj Kumar Konakalla [mailto:konakalla at gmail.com] 
Sent: 11 November 2005 10:01
To: opencms-dev at opencms.org
Subject: [opencms-dev] Value for path attribute in AddValue
method[Scanned]

 

Hi,

 

My requirement is to add new value for content through program.

 

There is one method addValue in CmsXmlContent class.

 

public
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\xml\types\I_CmsXmlContentValue.html> 
I_CmsXmlContentValue
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\xml\types\I_CmsXmlContentValue.html>  addValue(
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\file\CmsObject.html> 
CmsObject
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\file\CmsObject.html>  cms,
                                     java.lang.String path,
                                     java.util.Locale locale,
                                     int index)
                              throws
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsIllegalArgumentException.html> 
CmsIllegalArgumentException
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsIllegalArgumentException.html> ,
 
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsRuntimeException.html> 
CmsRuntimeException
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsRuntimeException.html> 

Adds a new XML content value for the given element name and locale at
the given index position to this XML content document. 

Parameters: 

cms - the current users OpenCms context 

path - the path to the XML content value element 

locale - the locale where to add the new value 

index - the index where to add the value (relative to all other values
of this type) 

Returns: 

the created XML content value 

Throws: 

CmsIllegalArgumentException
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsIllegalArgumentException.html>  - if the given path is invalid


CmsRuntimeException
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\main\CmsRuntimeException.html>  - if the element identified by the
path already occured I_CmsXmlSchemaType.getMaxOccurs()
<file:///\\dt2752-sridhar\intranet\templates\com.alkacon.documentation.d
ocumentation_javadoc_1.0.0\alkacon-documentation\javadoc\core\org\opencm
s\xml\types\I_CmsXmlSchemaType.html#getMaxOccurs()>  or the given index
is invalid (too high).

We should give the path of the element to be added. 

 

Any of you ever used this method and if so can you tell me what kind of
value needed to be passed for the argument???

 

Regards
Manoj 
 
Jon mayes
Marketing & Business Systems
Pegasus Retirement Homes plc
Tel: 
Fax: 
Email: jon.mayes at pegasus-homes.co.uk 
 
For more information on Pegasus please visit our web site at www.pegasus-homes.co.uk 

 
Privileged/Confidential information may be contained in this message.  If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone.  In such case, you should destroy this message and kindly notify the sender by reply email.  Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20051111/35bbac62/attachment.htm>


More information about the opencms-dev mailing list