[Hippo-cms7-user] Does model.compareTo-functionality only work on first-level fields?

Edwin B. ettepet at gmail.com
Fri Sep 10 16:16:29 CEST 2010


I have been playing with this new 7.4 version of Hippo CMS and implemented
the "model.compareTo"-functionality as demo'ed on the Hippo GetTogether.
This does work realy nice on *simple* documenttypes! But...

...when using nested compound types the compare-function seems to lose
control on field-level of nested documenttypes.

For example, this snip of my CND:

[myProject:contentPagina] > myProject:basedocument orderable
  - myProject:titel (string)
  - myProject:introductie (string)
  + myProject:vraagantwoord (myProject:vraagAntwoord) multiple
  + myProject:content (myProject:content) multiple

[myProject:vraagAntwoord] > nt:base
  - myProject:vraag (string)
  - myProject:antwoord (string)
[myProject:content] > nt:base orderable
  + myProject:paragrafen (myProject:paragraaf) multiple

[myProject:paragraaf] > nt:base
  - myProject:titel (string)
  + myProject:paragraaf (hippostd:html)

When edited the fields "titel" or "introductie" of a publishable
"contentPagina"-item -> no problem.
Changes do color red and green.

But, after editing one of the nested fields "vraag" or "antwoord", this
whole compoundtype "vraagAntwoord" is coloured red with all its content
striked through.
And underneath a second green block is placed with the actual content
So, now I can see *something* inside this Q&A block has been changed, but I
still have to screen all the content of both fields by myself to figure out
what word has been changed in one of the two Q&A-fields.

The same happens when using a deeper nesting level (eg.

My implementation:
In all four corresponding documenttypes mentioned above I did add:
1. the "model.compareTo"-value into the "frontend:references"-section of the
2. the "${model.compareTo}"-value into the "model.compareTo"-property of
each field in the "editor:templates"-section.
See [1] the "template" and "compareTo reference" sections.

I also tested with:
The "model.compareTo"-value into the "frontend:references"-section of the
"editor:templates"-section in all four corresponding documenttypes, but the
"${model.compareTo}"-thing only in the *deepest* node (the node that
contains the content that has to be compared).
This seems to break the compare functionality; it looks like this
compare-function isn't propagated to the deepest level anymore:

10.09.2010 16:01:20 WARN 
No compareTo model reference for field plugin
in editor cluster that implements compare mode

Did I miss some configuration, or does this compare-function not (yet?)
support comparison of nested documenttypes on field-level?

Best regards,

View this message in context: http://hippo.2275632.n2.nabble.com/Does-model-compareTo-functionality-only-work-on-first-level-fields-tp5518466p5518466.html
Sent from the Hippo CMS 7 mailing list archive at Nabble.com.

More information about the Hippo-cms7-user mailing list