jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: About child Nodes
Date Thu, 20 Apr 2006 15:44:38 GMT
your 'esc:categ' is defined as mixin nodetype. do you mix-it in to
something? or do you use it as a primary nodetype?

furthermore, the nt:folder supertype already defined a childnode
definition for 'nt:hierarchyNode'. so you at least can add those.

how do you create your property?

regards, toby

On 4/20/06, hsp <piccinatto@ibest.com.br> wrote:
> In the custom_nodetype.xml, I defined a node type like this:
>         <nodeType name="esc:categ" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
>                 <supertypes>
>                         <supertype>nt:folder</supertype>
>                         <supertype>mix:referenceable</supertype>
>                 </supertypes>
>         <childNodeDefinition name="*" defaultPrimaryType="esc:categ" autoCreated="false"
mandatory="false" onParentVersion="VERSION" protected="false" sameNameSiblings="false">
>             <requiredPrimaryTypes>
>                 <requiredPrimaryType>esc:categ</requiredPrimaryType>
>             </requiredPrimaryTypes>
>         </childNodeDefinition>
>                 <propertyDefinition name="prop:descCateg" requiredType="String" autoCreated="false"
mandatory="false" onParentVersion="VERSION" protected="false" multiple="false"/>
>                 <propertyDefinition name="*" requiredType="undefined" autoCreated="false"
mandatory="false" onParentVersion="VERSION" protected="true" multiple="true"/>
>         </nodeType>
> So, in my mind, the node of type esc:categ will only permit child nodes of type esc:categ,
but I can create whatever kind of type node under a node of type esc:categ. How to restrict
this rule?
> Another doubt, when I try to define the property prop:descCateg, in the creation of a
node of type esc:categ, I got an error:
> javax.jcr.nodetype.ConstraintViolationException: no matching property definition found
for {http://www.esc.org/prop/1.0}descCateg
> What could it be?
> Hope get some help, thanks
> Helio.

-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

View raw message