[opencms-dev] RE: Add Templates to opencms
manolo fdez
manolofdez85 at hotmail.com
Mon Apr 17 09:29:18 CEST 2006
Let'S talk about code:
Trying to change file properties I made the following attempt:
<%
org.opencms.file.CmsObject ocms =
org.opencms.main.OpenCms.initCmsObject("Guest");
ocms.loginUser("Admin2", "Admin2"); // an existing user of group
Administrators
org.opencms.file.CmsProperty rProp = new
org.opencms.file.CmsProperty("ResourceProp", null, "Resource property
value", true);
ocms.writePropertyObject("/sites/default/index.jsp", rProp); // an existing
file
%>
I receive an exception:
Error writing property "ResourceProp" on resource
"/sites/default/index.jsp".
Could you tell me what I'm doing wrong?
--
View this message in context: http://www.nabble.com/Add-Templates-to-opencms-t1391802.html#a3946841
Sent from the OpenCMS - Dev forum at Nabble.com.
More information about the opencms-dev
mailing list