Janne -- I just checked in a big batch that fixes many of the issues relating to creating new pages. Editing works again, among other things. I changed the function of the WikiPageTypeConverter as described in option (1), with special pages constituting a special case. :)
Andrew On Fri, Apr 17, 2009 at 2:44 PM, Janne Jalkanen <[email protected]> wrote: >> >> The JCR Javadocs seem to be ambiguous about whether nodes are >> persisted when they are created, but they are very clear that they >> must be persisted when Node.save() is called. I did, indeed, just need >> to call ContentManager.addPage(). Seems to work just dandy. > > Actually, JSR-170 spec says about Node.addNode() > > "An ItemExistsException will be thrown either immediately (by this method), > or on save, if an item at the specified path already exists and same name > siblings are not allowed. Implementations may differ on when this validation > is performed. " > > The end result might be a bit confusing if same name siblings were allowed, > and the JCR repo would just silently add multiple copies. It means that we > should choose a nodetype which does not allow same name siblings. At the > moment everything is stored with nt:unstructured, which does allow such > beasts. > > I'm not sure whether calling addNode() would actually work with other repos > than Priha. Priha does not validate until save(). But now is difficult to > think what a good solution would be, too much noise around. > > /Janne
