jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Dullaart" <marcel.dulla...@gmail.com>
Subject Re: Creating NodeType with dynamic, linked properties
Date Mon, 04 Dec 2006 10:17:40 GMT
Hi all,

This definitely seems to be a good idea for several occasions.
I'd like to re-use this idea for defining locales, and using them to
determine the locale for content items.
But how can I restrict the type of a reference in the cnd file?


On 11/16/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
> On 11/16/06, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> > you could e.g. create a node type myapp:Category that extends from
> > mix:referenceable. now for each category (e.g. book, dvd, etc) you can
> > create a node of type myapp:Category.
> >
> > in your custom node types make your "category" property a REFERENCE
> > property and restrict it to myapp:Category.
> >
> > you can add new categories (nodes of type myapp:Category) at any time.
> This is one of my favourite JCR patterns. Not only it gives you nice
> and controlled extensibility, it allows you to easily attach whatever
> information to the category nodes *and* gives you a blazing-fast
> mechanism to list all nodes that link to a given category.
> BR,
> Jukka Zitting

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message