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