[opencms-dev] OpenCMS Schema question.

Jonathan Woods jonathan.woods at scintillance.com
Thu Aug 17 15:37:42 CEST 2006


A while ago I tried a sophisticated (but crap!) workaround by registering a
listener which reacted to CmsResource change events, intending to trap
changes to properties and reflect them in schema contents.  But this
foundered because (i) the event approach isn't well documented and (ii) I
couldn't get my head round the best way to deal with locking/unlocking and
avoiding event cascades.

Eventually I convinced myself that I should either regard explicit property
setting as a kind of manual override, and therefore as acceptable, or I
should take values directly from XML elements.  I've mostly ended up doing
the latter.

Jon

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Anthony Roy
Sent: 17 August 2006 14:13
To: The OpenCms mailing list
Subject: RE: [opencms-dev] OpenCMS Schema question.

Thanks for the quick reply. 

[BTW - Sorry about the duplicate post starting [SPAM] - it's our companies
crap mail filter that adds it, and I forgot to remove it from the title!]

> 
> No, it's a limitation.
> 

Are there any workarounds? I tried adding a default like so:

<defaults>
    <default element="Title" value="${property.Title}"/> </defaults>

But the Title that was inserted wasn't the one of the XML document as I had
expected, but "Dialog - New resource xmlcontent" which I guess is the Title
of the resource dialog file.

Cheers,

Anthony.

> <xsd:annotation>
>     <xsd:appinfo>
>         ...
>         <mappings>
>             <mapping element="Title" mapto="property:Title" />
>         </mappings>
> 	  ...
>     </xsd:appinfo>
> </xsd:annotation>
> 
> Now, this has half of the effect that I want: if I set the Title field 
> of the XML document, it automatically updates the Title property of 
> the file. However, if I change the Title property, it does not update 
> the Title element - it behaves like a one-way mapping.
> 
> Is this a limitation of OpenCMS, or am I missing something?
> 
> Thanks,
> 
> 
> Anthony Roy. 
> 
> 
> This email and any files transmitted with it are confidential and are 
> intended solely for the use of the individual or entity to whom they 
> are addressed. This communication represents the originator's personal 
> views and opinions, which do not necessarily reflect those of HPI 
> Limited. If you are not the original recipient or the person 
> responsible for delivering the email to the intended recipient, be 
> advised that you have received this email in error, and that any use, 
> dissemination, forwarding, printing, or copying of this email is 
> strictly prohibited. If you received this email in error, please 
> immediately notify postmaster at hpi.co.uk.This message has been scanned 
> by Anti-Virus. Recipients are advised to apply their own virus checks 
> to this message on delivery.
> 
> 
> _______________________________________________
> 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
> 
> 
> 
> _______________________________________________
> 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
> 

_______________________________________________
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

_______________________________________________
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





More information about the opencms-dev mailing list