jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@day.com>
Subject Re: cut /copy / paste
Date Wed, 11 Jun 2008 12:43:16 GMT
On Tue, Jun 10, 2008 at 7:20 PM, Alexander Klimetschek <aklimets@day.com> wrote:
> On Tue, Jun 10, 2008 at 6:15 PM, Luis Gervaso <luis.gervaso@gmail.com> wrote:
>> Why is not implemented orderAfter() instead of orderBefore()?

IMO there's no reason why orderAfter() would be 'better' than orderBefore().
it all depends on the specific use case and implementing the orderAfter
use case is trivial.

> Decision by the JCR standards committee... not everything is perfect
> in the API, but it's not that difficult to write your own insertAt()
> method by combining addNode() and orderBefore(). Note that you need to
> use a node type that allows for child ordering.
>> Since we iterate a collection we can "remember" the previous item in the
>> iteration
>> and can "insert" before or after the actual item in the loop. But probably
>> I'm really missed with
>> this thinking.
> The orderBefore() is simply based on (string) paths, which should make
> it easier if your content model is straightforward (eg.
> orderBefore("print", "quit") to move the print action before the
> quit).
>> I really don't know if generate a menu from the content is the correct way
>> using JCR
> There is no "correct" way. Your are free to use the API according to
> your needs! Still, there are best practices and recommondations for
> many common things. Have a look at
> http://wiki.apache.org/jackrabbit/DavidsModel for tips on content
> modeling.
>> or it must be only on the frontend code. maybe hardcoded, configuration file
>> ...
>> If i generate a menu from JCR we need a hard requirement to perform ordering
>> operations
>> on the nodes.
>> I have not found enough documentation, tutorials to create a simple
>> application with menus,
>> static content and dynamic content using JCR instead of the traditional
>> approach using database
>> Can anyone redirect me to a good quickstart / real application on JCR?
> There are many tutorials and examples on Google, for example:
> http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API

please keep in mind that this link refers to the alfresco specific
implementation of the
JCR api and alfresco specific api's. unless you're actually using
alfresco, i suggest
you have a look at the following, IMO excellent introduction:


> And there is a collection of jcr links on the Jackrabbit wiki:
> http://wiki.apache.org/jackrabbit/JcrLinks
> Regards,
> Alex
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com

View raw message