[opencms-dev] Problem writing properties
Michael Emmerich
emmerich at german-navy.de
Fri Sep 30 18:57:49 CEST 2005
Do you have locked the resource before writing the property?
You can only write resources that are locked to the current user.
Regards,
Michael Emmerich
Alkacon Software - The OpenCms experts
> Hi
>
> I am trying to update a property value in OpenCms 6 and getting an exception
> which is not very helpful as it does not say why,
>
> org.opencms.file.CmsVfsException: Error writing property "template" on
> resource "/index.html".
>
> I have tried the vfs resource name and the fully qualified resource name
> returned by getRootPath() neither of which allows me to update the property,
> the code is as follows.
>
> CmsProperty prop = cms.readPropertyObject(vfsName, "template", false) ;
> String templateName = prop.getValue() ;
> templateName = templateName.substring(0, templateName.length()-4) +
> "PUB.jsp" ;
> prop.setValue(templateName, CmsProperty.TYPE_INDIVIDUAL) ;
> cms.writePropertyObject(vfsName, prop) ;
>
> Has anyone seen this problem.
>
> Jeff White
> JVolution Ltd.
> Tel : (+44) 0208 714 4488
> Mob: 07951 764806
> This email and any attachments or links are confidential and intended only
> for the individual to whom it is addressed. If you are not the intended
> recipient, any use or dissemination of this communication is strictly
> prohibited and you are requested to notify the sender immediately and then
> delete this email.
>
> JVolution does not accept liability for any data corruption, unauthorised
> amendment, viruses and unforeseen delays to which this email may be subject.
> This email and any attachments or links are opened at your own risk.
> JVolution can take no responsibility for the consequences of actions carried
> out as a result of this e-mail.
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
--
Home : emmerich at german-navy.de
Work : m.emmerich at alkacon.com
ICQ : 18897063
WWW : German Naval History http://www.german-navy.de
More information about the opencms-dev
mailing list