0 Replies Latest reply on Apr 27, 2012 3:07 PM by nomoremonster

    Diff function only works when a component is added to parsys?

    nomoremonster

      Hi:

       

      I am recently working on a few components in cq5.5, one of the questions that I've encountered is:

       

      The "Diff" function to show changes between various versions of a component content only works when that component is in a parsys, for instance:

       

      I have a text component that I added into a parsys component in a page,

       

      in version 1.1, I have: test1

      in version 1.2, I have: test1 test2

       

      When click on "Diff" from sidekick, that component displays, which is correct

       

      test1 test2

       

      ------------------------------------------------------------------------------------------ --------------------------------

      But if I write a text component directly into my jsp page, something like:

       

      <cq:include path="text1" resourceType="foundation/components/text"/>

       

      and create 2 versions as above:

       

      in version 1.1, I have: test1

      in version 1.2, I have: test1 test2

       

      When click on "Diff", the component displays:

       

      test1 test2

       

       

      Further investigation shows that this line from text.class

       

      TagUtil.getRequest(this.pageContext).getResource()

       

      returns a resource instance with version information only when the text component is within parsys, VS in direct coded component in jsp, it returns a nt:unstructured resource without any version information.

       

      Anybody has the same problem like that before? any suggestion will be appreciated!