Um erro ocorreu enquanto processava o modelo.
Error on line 10, column 5 in 20155#20195#407715
categoryService.getAssetCategory(request.getParameter("categoryId")?number) is undefined.
It cannot be assigned to contextcategory
1<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> 
2<#assign categoryService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService")> 
3<#assign dLFileEntryLocalServiceUtil = staticUtil["com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil"] /> 
4<#assign httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] /> 
5<#assign htmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] /> 
6<#assign assetCategoryPropertyLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetCategoryPropertyLocalServiceUtil"] /> 
7<#assign hasCategory = false/> 
8 
9<#if request.getParameter("categoryId")?has_content> 
10    <#assign contextcategory = categoryService.getAssetCategory(request.getParameter("categoryId")?number) /> 
11    <#assign hasCategory = true/> 
12</#if> 
13 
14<#if hasCategory > 
15 
16<#assign link = ""/> 
17<#assign ano = ""/> 
18<#assign descricao = ""/> 
19 
20<#attempt> 
21  <#--  BUG   
22    <#if assetCategoryPropertyLocalServiceUtil.getCategoryProperty(contextcategory.categoryId, "link")?has_content > 
23      <#assign link = assetCategoryPropertyLocalServiceUtil.getCategoryProperty(contextcategory.categoryId, "link")/> 
24    </#if> 
25  --> 
26  <#--  <#assign descricao = assetCategoryPropertyLocalServiceUtil.getCategoryProperty(contextcategory.categoryId, "descricao")/>  --> 
27  <#--  <#assign autor = assetCategoryPropertyLocalServiceUtil.getCategoryProperty(contextcategory.categoryId, "autor")/>  --> 
28<#recover> 
29</#attempt> 
30  <div> 
31    <h1>${contextcategory.name}</h1> 
32    <#if contextcategory.description??> 
33      <p>${contextcategory.description}</p> 
34    </#if> 
35    <#--  <#if validator.isNotNull(autor) && validator.isNotNull(descricao) && validator.isNotNull(link)> 
36      <ul class="featured-links--description">  
37        <a target="_blank" href="http://${link.value}"> 
38            <li> <h4>${autor.value}</h4> <p class="link-external">${descricao.value}</p> </li> 
39        </a>  
40      </ul> 
41    </#if>  --> 
42  </div> 
43</#if> 
44 
45<#assign noticia_destaque = true /> 
46<#assign dateDayFormat = "dd" /> 
47<#assign dateMonthFormat = "MMM" /> 
48<#assign dateYearFormat = "yyyy" /> 
49<#assign targetViewUrl = "informacao-da-publicacao" /> 
50<#assign targetPortletID = "6JYIsGMAMkW1" /> 
51 
52<#list entries as entry> 
53  <#if entry.getAssetRenderer()?has_content> 
54    <#assign entry = entry /> 
55    <#assign assetRenderer = entry.getAssetRenderer() /> 
56    <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
57 
58    <#assign dlFileEntryId = assetRenderer.getClassPK() /> 
59    <#assign dlFileEntry = dLFileEntryLocalServiceUtil.getDLFileEntry(dlFileEntryId) /> 
60    <#assign fileVersion = dlFileEntry.getLatestFileVersion(true)/> 
61    <#assign entryFileTitle = httpUtil.encodeURL(htmlUtil.unescape(dlFileEntry.getTitle())) /> 
62 
63    <#assign viewURL = "/${targetViewUrl}/-/asset_publisher/${targetPortletID}/document/id/${entry.getEntryId()}" /> 
64 
65 
66    <#assign downloadURL ="/documents/${dlFileEntry.getGroupId()}/${dlFileEntry.getFolderId()}/${entryFileTitle}/${dlFileEntry.getUuid()}?version=${fileVersion.getVersion()} "/> 
67 
68 
69    <#if entry_index == 0> 
70      <div class="publication-featured"> 
71        <h3>Todas as Publicações</h3> 
72    <#else> 
73      <div class="publication-featured">     
74    </#if>     
75        <img src="${entry.getAssetRenderer().getThumbnailPath(renderRequest)}"> 
76        <div class="publication__body"> 
77          <span class="magazine">${entryTitle}  ›</span> 
78          <p><@excerptFocus abstractFocus="${assetRenderer.getSummary(locale)}"/></p> 
79          <div class="metadados"> 
80             
81            <#assign dlFileVersion = dlFileEntry.getFileVersion() /> 
82            <#assign fileVersionId = dlFileEntry.getLatestFileVersion(true).getFileVersionId() /> 
83            <#assign fieldsMap = dlFileEntry.getFieldsMap(fileVersionId) /> 
84             
85            <ul> 
86              <#list fieldsMap.entrySet() as entry> 
87              <#assign fields = entry.value /> 
88                  <#list fields.getNames() as name> 
89                    <li> 
90                      <#if validator.isNotNull(fields.get(name).getValue()) && (name == "autor" || name == "volume" || name == "ano" || name == "numero")> 
91                        ${name?capitalize}: ${fields.get(name).getValue()} 
92                      </#if> 
93                    </li> 
94                  </#list> 
95              </#list> 
96            <ul> 
97          </div> 
98          <div class="publication__links"> 
99            <a href="${viewURL}"><div class="publication__more">Saiba mais</div></a> 
100            <a href="${downloadURL}" target ="_blank"><div class="publication__donwload">Download</div></a> 
101          </div> 
102        </div>   
103      </div> 
104    </#if>  
105</#list> 
106 
107<#macro getEditIcon> 
108  <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
109    <#assign redirectURL = renderResponse.createRenderURL() /> 
110 
111    ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
112    ${redirectURL.setWindowState("pop_up")} 
113 
114    <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
115 
116    <#if validator.isNotNull(editPortletURL)> 
117      <#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
118      <@liferay_ui["icon"] 
119        image="edit" 
120        message=title 
121        url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
122      /> 
123    </#if> 
124  </#if> 
125</#macro> 
126 
127<#macro excerpt abstract> 
128  <#assign max=200> 
129  <#assign min=21> 
130  <#if abstract?length &lt; max> 
131    ${htmlUtil.escape(abstract)} 
132  <#else> 
133    <#assign words=htmlUtil.escape(abstract)?word_list> 
134    <#if words?size gt min> 
135      <#list words[0..20] as word>${word} </#list>... 
136    <#else> 
137        ${htmlUtil.escape(abstract)} 
138    </#if> 
139  </#if> 
140</#macro> 
141 
142<#macro excerptFocus abstractFocus> 
143  <#assign max = 70> 
144  <#if abstractFocus?word_list?size &lt; max> 
145    ${htmlUtil.escape(abstractFocus)} 
146  <#else> 
147    <#assign words = htmlUtil.escape(abstractFocus)?word_list> 
148    <#list words[0..30] as word>${word} </#list>...     
149  </#if> 
150</#macro> 
151 
152<#macro getTitle> 
153  <#assign max=60> 
154  <#if entryTitle?length &lt; max> 
155    ${entryTitle} 
156  <#else> 
157    <#assign words=entryTitle?word_list> 
158    <#list words[0..5] as word>${word} </#list>... 
159  </#if> 
160</#macro> 
161 
162<#macro getEditIcon> 
163  <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
164    <#assign redirectURL = renderResponse.createRenderURL() /> 
165    ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
166    ${redirectURL.setWindowState("pop_up")} 
167    <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
168    <#if validator.isNotNull(editPortletURL)> 
169      <#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
170      <@liferay_ui["icon"] 
171        image="edit" 
172        message=title 
173        url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
174      /> 
175    </#if> 
176  </#if> 
177</#macro>