4 Replies Latest reply on Mar 7, 2008 5:10 PM by (ersin)

    CS3 server - java : how to find the Page object (or number) of an identified element (like TextFrame

      Hello everyone,
      I want to know what's the best solution to find the Page object of an "Identified" element.
      I do :

      ]iId = 123; //just an example
      ]TextFrame oTextFrame = oDocument.getIdentifiedChildTextFrame(iId);

      Now I want to find the Page object that contains my "oTextFrame" object.
      With the getParent() method it works (PageHelper.narrow works) but what about nested TextFrames (a TextFrame that contains another TextFrame). The parent of such TextFrames are going to be another TextFrame (and not the Page object), so the narrow fails.

      In fact, the real question is : How to know the "real type" of an SObject or a VariableType ? (because, it seems narrow can "convert" anything into anything else, that's not really safe...)