<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>document is my repeatable field .how to get data from adt</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120781546" />
  <subtitle>document is my repeatable field .how to get data from adt</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120781546</id>
  <updated>2026-05-21T12:57:08Z</updated>
  <dc:date>2026-05-21T12:57:08Z</dc:date>
  <entry>
    <title>document is my repeatable field .how to get data from adt</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120781545" />
    <author>
      <name>Manish Chouhan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120781545</id>
    <updated>2021-05-13T13:17:51Z</updated>
    <published>2021-05-13T08:39:06Z</published>
    <summary type="html">&lt;p&gt;&amp;lt;section id=&amp;quot;download-main-section&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;#assign
  product_array = [] /&amp;gt;&lt;br /&gt;&amp;lt;#assign arr = []
  /&amp;gt;&lt;br /&gt;&amp;lt;#assign serviceContext =
  staticUtil[&amp;quot;com.liferay.portal.kernel.service.ServiceContextThreadLocal&amp;quot;].getServiceContext()&amp;gt;&lt;br /&gt;&amp;lt;#assign
  themeDisplay = serviceContext.getThemeDisplay() /&amp;gt;&lt;br /&gt;    &amp;lt;#if
  entries?has_content&amp;gt;&lt;br /&gt;        &amp;lt;#list entries as
  curEntry&amp;gt;&lt;br /&gt;            &amp;lt;#assign&lt;br /&gt;              
   assetRenderer = curEntry.getAssetRenderer()&lt;br /&gt;              
   journalarticle = assetRenderer.getAssetObject()&lt;br /&gt;              
   viewURL = assetPublisherHelper.getAssetViewURL(renderRequest,
  renderResponse, assetRenderer, entry,
  !stringUtil.equals(assetLinkBehavior,
  &amp;quot;attrFullContent&amp;quot;))&lt;br /&gt;                document =
  saxReaderUtil.read(journalarticle.getContent())&lt;br /&gt;              
   rootElement = document.getRootElement()&lt;br /&gt;              
   articleId = journalarticle.getId()/&amp;gt;&lt;br /&gt;            &amp;lt;#list
  rootElement.elements() as dynamicElement&amp;gt;&lt;br /&gt;              
   &amp;lt;#if &amp;quot;insurance_type&amp;quot; ==
  dynamicElement.attributeValue(&amp;quot;name&amp;quot;)&amp;gt;&lt;br /&gt;          
           &amp;lt;#assign insurance_type =
  dynamicElement.element(&amp;quot;dynamic-content&amp;quot;).getData()
  /&amp;gt;&lt;br /&gt;                    &amp;lt;#if
  !product_array?seq_contains(insurance_type)&amp;gt;&lt;br /&gt;              
           &amp;lt;#assign product_array = product_array + [insurance_type]
  /&amp;gt; &lt;br /&gt;                    &amp;lt;/#if&amp;gt;&lt;br /&gt;              
   &amp;lt;/#if&amp;gt;&lt;br /&gt;            &amp;lt;/#list&amp;gt;&lt;br /&gt;      
   &amp;lt;/#list&amp;gt;&lt;br /&gt;    &amp;lt;/#if&amp;gt;&lt;br /&gt;    &lt;br /&gt;    &amp;lt;#if
  entries?has_content&amp;gt;&lt;br /&gt;        &amp;lt;div
  class=&amp;quot;product-type&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;          
   &amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;#assign
  count = 1/&amp;gt;&lt;br /&gt;                &amp;lt;#list product_array as
  cur_product&amp;gt;&lt;br /&gt;                    &amp;lt;#assign product =
  cur_product?lower_case?replace(' ','-')?trim /&amp;gt;&lt;br /&gt;              
       &amp;lt;button name=&amp;quot;${product}&amp;quot;
  class=&amp;quot;product-${count}&amp;quot;
  onclick=&amp;quot;show('${product}');&amp;quot;&amp;gt;${product}&amp;lt;/button&amp;gt;&lt;br /&gt;  
                   &amp;lt;#assign count = count + 1/&amp;gt;&lt;br /&gt;          
       &amp;lt;/#list&amp;gt;&lt;br /&gt;            &amp;lt;/div&amp;gt;&lt;br /&gt;      
   &amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;        &amp;lt;div class=&amp;quot;row
   download-section&amp;quot; id=&amp;quot;main&amp;quot;&amp;gt;&lt;br /&gt;          
   &amp;lt;#list entries as curEntry&amp;gt;&lt;br /&gt;              
   &amp;lt;#assign&lt;br /&gt;                    assetRenderer =
  curEntry.getAssetRenderer()&lt;br /&gt;                    journalarticle =
  assetRenderer.getAssetObject()&lt;br /&gt;                    viewURL =
  assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse,
  assetRenderer, entry, !stringUtil.equals(assetLinkBehavior,
  &amp;quot;attrFullContent&amp;quot;))&lt;br /&gt;                    document =
  saxReaderUtil.read(journalarticle.getContent())&lt;br /&gt;              
       rootElement = document.getRootElement()&lt;br /&gt;                  
   articleId = journalarticle.getId()/&amp;gt;&lt;br /&gt;              
   &amp;lt;#assign DocUrl = []/&amp;gt;&lt;br /&gt;                &amp;lt;#list
  rootElement.elements() as dynamicElement&amp;gt;&lt;br /&gt;                  
   &amp;lt;#if &amp;quot;insurance_type&amp;quot; ==
  dynamicElement.attributeValue(&amp;quot;name&amp;quot;)&amp;gt;&lt;br /&gt;          
               &amp;lt;#assign insurance_type =
  dynamicElement.element(&amp;quot;dynamic-content&amp;quot;).getData()
  /&amp;gt;&lt;br /&gt;                    &amp;lt;/#if&amp;gt;&lt;br /&gt;                  
   &amp;lt;#if &amp;quot;title&amp;quot; ==
  dynamicElement.attributeValue(&amp;quot;name&amp;quot;)&amp;gt;&lt;br /&gt;          
               &amp;lt;#assign title =
  dynamicElement.element(&amp;quot;dynamic-content&amp;quot;).getData()
  /&amp;gt;&lt;br /&gt;                    &amp;lt;/#if&amp;gt;&lt;br /&gt;                  
   &amp;lt;#if &amp;quot;uin&amp;quot; ==
  dynamicElement.attributeValue(&amp;quot;name&amp;quot;)&amp;gt;&lt;br /&gt;          
               &amp;lt;#assign uin =
  dynamicElement.element(&amp;quot;dynamic-content&amp;quot;).getData()
  /&amp;gt;&lt;br /&gt;                    &amp;lt;/#if&amp;gt;&lt;br /&gt;                  
    &lt;br /&gt;                    &amp;lt;#if &amp;quot;document&amp;quot; ==
  dynamicElement.attributeValue(&amp;quot;name&amp;quot;)&amp;gt;&lt;br /&gt;          
               &amp;lt;#assign document =
  dynamicElement.element(&amp;quot;dynamic-content&amp;quot;).getData()
  /&amp;gt;&lt;br /&gt;                        &amp;lt;#assign doc =
  jsonFactoryUtil.createJSONObject(document)/&amp;gt;&lt;br /&gt;              
       &amp;lt;/#if&amp;gt;&lt;br /&gt;                    &amp;lt;#if (doc)??&amp;gt;&lt;br /&gt;  
                       &amp;lt;#assign DocUrl = DocUrl +
  [themeDisplay.getPortalURL() + &amp;quot;/documents/&amp;quot;  +
  doc.getString(&amp;quot;groupId&amp;quot;) + &amp;quot;/o/&amp;quot; +
  doc.getString(&amp;quot;title&amp;quot;) + &amp;quot;/&amp;quot; +
  doc.getString(&amp;quot;uuid&amp;quot;)] /&amp;gt;&lt;br /&gt;                  
   &amp;lt;/#if&amp;gt;&lt;br /&gt;                &amp;lt;/#list&amp;gt;&lt;br /&gt;              
   &amp;lt;#if title?has_content&amp;gt;&lt;br /&gt;                    &amp;lt;div
  class=&amp;quot;card card-section col-md-12 all-type
  ${insurance_type?lower_case?replace(' ','-')?trim}&amp;quot;&amp;gt;&lt;br /&gt;  
                       &amp;lt;#if title?has_content &amp;amp;&amp;amp;
  uin?has_content &amp;gt;&lt;br /&gt;                            &amp;lt;div
  class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;                              
   &amp;lt;h2&amp;gt;${title}&amp;lt;/h2&amp;gt;&lt;br /&gt;                              
   &amp;lt;p&amp;gt;${uin}&amp;lt;/p&amp;gt;&lt;br /&gt;                          
   &amp;lt;/div&amp;gt;&lt;br /&gt;                        &amp;lt;/#if&amp;gt; &lt;br /&gt;      
                   &amp;lt;div class=&amp;quot;row
  document-section&amp;quot;&amp;gt;&lt;br /&gt;                            &amp;lt;#list
  DocUrl as cur_doc&amp;gt;&lt;br /&gt;                                    &amp;lt;div
  class=&amp;quot;document col-md-12&amp;quot;&amp;gt;&lt;br /&gt;                      
                   &amp;lt;a href=&amp;quot;${cur_doc}&amp;quot;
  &amp;gt;Download&amp;lt;/a&amp;gt;&lt;br /&gt;                                  
   &amp;lt;/div&amp;gt;&lt;br /&gt;                            &amp;lt;/#list&amp;gt;&lt;br /&gt;  
                       &amp;lt;/div&amp;gt;&lt;br /&gt;                  
   &amp;lt;/div&amp;gt;    &lt;br /&gt;                &amp;lt;/#if&amp;gt;&lt;br /&gt;          
   &lt;br /&gt;            &amp;lt;/#list&amp;gt;&lt;br /&gt;        &amp;lt;/div&amp;gt;&lt;br /&gt;  
   &amp;lt;/#if&amp;gt;&lt;br /&gt;&amp;lt;/section&amp;gt;        &lt;br /&gt;        &lt;br /&gt;      
   &lt;br /&gt;&amp;lt;script
  src=&amp;quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;  
   $(document).ready(function(){&lt;br /&gt;    var product =
  $(&amp;quot;.product-1&amp;quot;).attr(&amp;quot;name&amp;quot;);&lt;br /&gt;  
   $(&amp;quot;.all-type&amp;quot;).hide();&lt;br /&gt;  
   $(&amp;quot;.&amp;quot;+product).show();&lt;br /&gt;    });&lt;br /&gt;    &lt;br /&gt;  
   function show(choice){&lt;br /&gt;      
   $(&amp;quot;.all-type&amp;quot;).hide();&lt;br /&gt;      
   $(&amp;quot;.&amp;quot;+choice).show();&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;</summary>
    <dc:creator>Manish Chouhan</dc:creator>
    <dc:date>2021-05-13T08:39:06Z</dc:date>
  </entry>
</feed>
