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 
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</#list> 
105 
106<#macro getEditIcon> 
107  <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
108    <#assign redirectURL = renderResponse.createRenderURL() /> 
109 
110    ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
111    ${redirectURL.setWindowState("pop_up")} 
112 
113    <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
114 
115    <#if validator.isNotNull(editPortletURL)> 
116      <#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
117      <@liferay_ui["icon"] 
118        image="edit" 
119        message=title 
120        url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
121      /> 
122    </#if> 
123  </#if> 
124</#macro> 
125 
126<#macro excerpt abstract> 
127  <#assign max=200> 
128  <#assign min=21> 
129  <#if abstract?length &lt; max> 
130    ${htmlUtil.escape(abstract)} 
131  <#else> 
132    <#assign words=htmlUtil.escape(abstract)?word_list> 
133    <#if words?size gt min> 
134      <#list words[0..20] as word>${word} </#list>... 
135    <#else> 
136        ${htmlUtil.escape(abstract)} 
137    </#if> 
138  </#if> 
139</#macro> 
140 
141<#macro excerptFocus abstractFocus> 
142  <#assign max = 70> 
143  <#if abstractFocus?word_list?size &lt; max> 
144    ${htmlUtil.escape(abstractFocus)} 
145  <#else> 
146    <#assign words = htmlUtil.escape(abstractFocus)?word_list> 
147    <#list words[0..30] as word>${word} </#list>...     
148  </#if> 
149</#macro> 
150 
151<#macro getTitle> 
152  <#assign max=60> 
153  <#if entryTitle?length &lt; max> 
154    ${entryTitle} 
155  <#else> 
156    <#assign words=entryTitle?word_list> 
157    <#list words[0..5] as word>${word} </#list>... 
158  </#if> 
159</#macro> 
160 
161<#macro getEditIcon> 
162  <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
163    <#assign redirectURL = renderResponse.createRenderURL() /> 
164    ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
165    ${redirectURL.setWindowState("pop_up")} 
166    <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
167    <#if validator.isNotNull(editPortletURL)> 
168      <#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
169      <@liferay_ui["icon"] 
170        image="edit" 
171        message=title 
172        url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
173      /> 
174    </#if> 
175  </#if> 
176</#macro>