[opencms-dev] How to build property list

Isaac R. Higgins isaac.higgins at isaacray.com
Tue Apr 24 14:26:56 CEST 2007


thank you!!!!

-----Original Message-----
From: opencms-dev-bounces at opencms.org on behalf of David Sánchez Hernández
Sent: Tue 4/24/2007 2:28 AM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] How to build property list
 
byte[] XMLdocumentBytes = documentXML.getBytes("UTF-8");
List properties = new ArrayList();

              CmsProperty prop = new CmsProperty();
              prop.setName(CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS
);
              prop.setValue("/system/modules/xxxxx.jsp",
CmsProperty.TYPE_SHARED);
              properties.add(prop);

              prop = new CmsProperty();
              prop.setName(CmsPropertyDefinition.PROPERTY_TITLE);
              prop.setValue("Title",CmsProperty.TYPE_SHARED);
              properties.add(prop);

              cms.createResource(resource,
type,XMLdocumentBytes,properties);

type is the number given in opencms-vfs.xml to that content type.

Regards,
David.

2007/4/23, Isaac R. Higgins <isaac.higgins at isaacray.com>:
>
> Does anyone have an example of how to use:
>
> public CmsResource createResource(java.lang.String resourcename,
>                                   int type,
>                                   byte[] content,
>                                   java.util.List properties)
>
> I am not understanding how to construct the "properties" object, and I
> want to set the title, description, and navigation text of the new resource.
>
> Thanks,
> Isaac
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3293 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070424/44c6626d/attachment.bin>


More information about the opencms-dev mailing list