[opencms-dev] Change property value of vfs file

Matthias Neher Matthias.Neher at doubleSlash.de
Wed Oct 26 12:33:33 CEST 2005


Hi all,

I defined a new property. I don't like to change the property manually using
the context menu. I like to change this property using a jsp script. It is
no problem to read the property like this:

String value = cmso.readPropertyObject(currFile, "xxx", false).getValue();
// cmso is a CmsObject

Now I like to change the value of this property. How can I achieve this? I
tried to do this as follows:

//get the property
CmsProperty prop = cmso.readPropertyObject(currFile, "xxx", false);
//change the value of the property
prop.setValue("true", type); //what type should I use???
//write the property
cmso. writePropertyObject(currFile, prop);

Many thanks in advance

Best regards
Matthias



----------------------------------------------------------------------------
-----------------------------
Matthias Neher                                                   Fon:
+49-7541-6047-143
doubleSlash Net-Business GmbH                   Fax: +49-7541-6041-111
Müllerstr. 12 B
Matthias.Neher at doubleSlash.de
D-88045 Friedrichshafen
http://www.doubleSlash.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20051026/79ee427d/attachment.htm>


More information about the opencms-dev mailing list