2 Replies Latest reply: Apr 3, 2013 7:09 AM by DFy RSS

    How to print Felx Asset attribute value in jsp?

    655526
      I have shared an Asset Type called "Article" from avisports site to my site.

      i created an Asset for Article in my contributor interface. Now i would like to print one of the attribute value of that Article asset.

      I tried the below code but it is not working. please help me.

      I don't know how to get the Asset id dynamically so i just hardcoded it.

      <assetset:setasset name="Sample" type="Article" id='1337377897396' />
      <asset:get name="Sample" field="Headline" output="printHL" />
      <ics:getvar name="printHL"/>
        • 1. Re: How to print Felx Asset attribute value in jsp?
          Rodney-Oracle
          You could reference the article template in avisport or you can check the developer guide (http://docs.oracle.com/cd/E29495_01/doc.1111/webcenter_sites_11gr1_bp1_developer_guide.pdf) pg.634 - Coding Templates That Display Flex Assets

          Note: the type is available as c variable <%=ics.GetVar("c")%> and the id should be available as cid variable <%=ics.GetVar("cid")%>

          Cheers,
          Rodney
          • 2. Re: How to print Felx Asset attribute value in jsp?
            DFy
            Try this:
            <assetset:setasset name="theAsset" type='Article' id='1337377897396' />
            <assetset:getattributevalues name="theAsset" attribute="Headline" typename="your flex attribute typename" listvarname="HeadineList" />
            <ics:listget listname="HeadineList" fieldname="value" />

            where typename in the second line should be the flex attribute typename for Headline (similar to Media_A).

            Cheers!
            DFy