[opencms-dev] [Resolved] Problem for update one field xmlcontent programmatic
Deiverson Silveira
deiverson at solutioncms.com
Thu Jun 24 20:42:34 CEST 2010
*
Hi Harald,
Thank very much! Worked with your help! I test two solution, and I choose
the second solution! =]
With Friendly Regards,
Deiverson Silveira
Brabenetz, Harald* harald.brabenetz at bearingpointconsulting.com
<opencms-dev%40opencms.org?Subject=%5Bopencms-dev%5D%20Problem%20for%20update%20one%20field%20xmlcontent%0A%20programmatic&In-Reply-To=AANLkTikWNMo9_SRSp23EAYR6K81wIWtw-nW7UZV2yMcL%40mail.gmail.com>
*Thu Jun 24 16:45:58 CEST 2010*
- Previous message: [opencms-dev] Problem for update one field xmlcontent
programmatic<http://lists.opencms.org/pipermail/opencms-dev/2010q2/034632.html>
- *Messages sorted by:* [ date
]<http://lists.opencms.org/pipermail/opencms-dev/2010q2/date.html#34633>
[ thread ]<http://lists.opencms.org/pipermail/opencms-dev/2010q2/thread.html#34633>
[ subject ]<http://lists.opencms.org/pipermail/opencms-dev/2010q2/subject.html#34633>
[ author ]<http://lists.opencms.org/pipermail/opencms-dev/2010q2/author.html#34633>
------------------------------
With "xmlcontent = CmsXmlContentFactory.createDocument(...)" a new
document will be created.
try "xmlcontent = CmsXmlContentFactory.unmarshal(CmsObject, CmsFile)" instead.
Or use the Beta-1 Version of the Commons
Module:http://bp-cms-commons.sourceforge.net/m2site/infonova/modules/at.infonova.opencms.modules.commons/1.0-B1/
There is a XmlContentEditorHelper:
-------------------------------
XmlContentEditorHelper helper = new
XmlContentEditorHelper(getCmsObject(), CmsFile, Locale);
// edit XML Content
helper.setValue("Title", "Some test Message");
// save XML-Content.
helper.writeContent();
-------------------------------
with friendly regards,
Harald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100624/0ad62e7b/attachment.htm>
More information about the opencms-dev
mailing list