Page 1 of 1

Preventing split with using styles

Posted: Thu Feb 04, 2010 4:23 pm
by sijomon
Hi,

Yet another query.

I have a document, which is generally to be treated as read-only, within it is a node which is to be treated as read/write.

I was originally intending to enforce this using a DocumentFilter to supress all edit events that occured out side of the target node, however I discovered the Styles property Styles.KEY_EDITABLE which I now set inside a StyleFilter; I set it to true on the target node (and all its children) and false on all other nodes. This works great apart from when using the 'split' function on the target node. 'Splitting' the target node creates another node of the same type as a sibling of the target node, essentially edting the content of the common parent node, which has been marked as readonly in the StyleFilter.

Is the intended behaviour, or is this a bug? Have you any suggestions other than goig back to my DocumentFilter plan?

Many thanks for any assistance you can provide,

Simon.

Re: Preventing split with using styles

Posted: Thu Feb 04, 2010 5:23 pm
by Radu
Hi Simon,

I understand your problem.
Split is proposed in the editable child despite the fact that the parent is marked as not editable and the split will modify it by adding an extra child.
This situation is already fixed in the current development stream which contains better validation checking for split cases and will be available in Oxygen 11.2.
No suggestions for you but to use both a StylesFilter and a DocumentFilter which inhibits the split in this case.

Regards,
Radu

Re: Preventing split with using styles

Posted: Fri Feb 05, 2010 11:49 am
by sijomon
Ok, good to know. I have implemented a minimal DocumentFilter to supress the specific split case I'm interested in.

Thanks for the infor,

Simon.