Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 36636 invoked from network); 4 Dec 2006 10:18:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2006 10:18:06 -0000 Received: (qmail 16929 invoked by uid 500); 4 Dec 2006 10:18:15 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 16674 invoked by uid 500); 4 Dec 2006 10:18:14 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 16664 invoked by uid 99); 4 Dec 2006 10:18:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 02:18:14 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marcel.dullaart@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 02:18:02 -0800 Received: by nf-out-0910.google.com with SMTP id x4so4458261nfb for ; Mon, 04 Dec 2006 02:17:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=KxN4fTtoc/ncIDj9jJY7UXms0ZJKJWC4rkOTp9Skj8GblTOCBs93ulXYFGgay62rhAeYNaGjENus/7Bp3U+tMMx9vUbC+4L/qNmFubXpGljEaAtsJ3nX89z+ZXSkTmS0+CV+JMP+b5+E6j7m8OVILkH+XQLvzG9ZJz9e0ZKe/u4= Received: by 10.82.107.15 with SMTP id f15mr1437066buc.1165227460909; Mon, 04 Dec 2006 02:17:40 -0800 (PST) Received: by 10.82.179.7 with HTTP; Mon, 4 Dec 2006 02:17:40 -0800 (PST) Message-ID: Date: Mon, 4 Dec 2006 11:17:40 +0100 From: "Marcel Dullaart" To: users@jackrabbit.apache.org Subject: Re: Creating NodeType with dynamic, linked properties In-Reply-To: <510143ac0611160231i8a4201bt8ddfe3554cb1b77d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_29577_927604.1165227460880" References: <20061116092828.90025.qmail@web60019.mail.yahoo.com> <90a8d1c00611160146u345d5ccfg46c88d2e359b9c00@mail.gmail.com> <510143ac0611160231i8a4201bt8ddfe3554cb1b77d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_29577_927604.1165227460880 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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? Thanks, Marcel On 11/16/06, Jukka Zitting wrote: > > Hi, > > On 11/16/06, Stefan Guggisberg 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 > ------=_Part_29577_927604.1165227460880--