3 Replies Latest reply: Jan 28, 2013 5:09 AM by Jiri.Machotka-Oracle RSS

    How to retrieve list of all children of a particular asset

    Nelash Jindal
      Hi,

      I have created a new flex family where I have one parent as BankParent and three children namely CarLoan, CreditCard and holiday offer.

      Does anybody have any idea how to retrieve the id and type of a child from parent asset.


      Thanks,
      Nelash jindal
        • 1. Re: How to retrieve list of all children of a particular asset
          Jiri.Machotka-Oracle
          See http://docs.oracle.com/cd/E29495_01/doc.1111/webcenter_sites_11gr1_bp1_developer_guide.pdf page 83

          ASSET.CHILDREN (XML) asset:children (JSP)
          <ASSET.CHILDREN
          NAME=“assetName”
          LIST= “listName”
          [CODE= “NameOfAssociation”]
          [OBJECTTYPE= “typeOfObject”]
          [OBJECTID=“objectID”]
          [ORDER=“nrank”]/>
          <asset:children
          name=“assetName”
          list=“listName”
          [code=“NameOfAssociation”]
          [objectype=“typeOfObject”]
          [objectid=“objectID”]
          [order=“nrank”]/>

          This tag queries the AssetRelationTree table and then builds a list of assets that are children of the asset that you specified. You use this tag to retrieve assets in a collection, to retrieve the image assets associated with article assets, and so on.
          Use the RENDER.LOGDEP tag in conjunction with ASSET.CHILDREN to log a dependency between the element or template in which it appears and the content that ASSET.CHILDREN retrieves.
          • 2. Re: How to retrieve list of all children of a particular asset
            Nelash Jindal
            Hey jiri,

            Thanks for the reply.

            But this tag is not working for me as their is no entry in AssetRelationTree for the asset and its children that I have created.

            Actually I have created a flex family where I have one parent( Namely TestParent) and three children(Child1, Child2, Child3). But their is not entry for this parent and child in AssetRelationTree.

            I want to retrieve these children with the help of this TestParent ID.

            Any idea how to do this?

            Thanks in advance
            • 3. Re: How to retrieve list of all children of a particular asset
              Jiri.Machotka-Oracle
              I want to retrieve these children with the help of this TestParent ID.
              Check whether you can query assets for this kind of query.

              There is one more thing you could try before that: see p. 84 of http://docs.oracle.com/cd/E29495_01/doc.1111/webcenter_sites_11gr1_bp1_developer_guide.pdf
              there are two tags, ASSETSET and SEARCHSTATE that could contain the link to parent/children.