aggiornamento portlet config

This commit is contained in:
Federico Ruperti 2025-12-01 11:59:47 +01:00
parent 6baf9eda60
commit 5139369517
5 changed files with 18 additions and 8 deletions

View File

@ -16,8 +16,8 @@ dependencies {
compileOnly group: "com.liferay", name: "com.liferay.product.navigation.taglib"
compileOnly group: "javax.servlet", name: "javax.servlet-api"
compileOnly group: "javax.portlet", name: "portlet-api"
implementation group: "org.osgi", name: "org.osgi.service.component.annotations"
implementation group: "javax.servlet", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
implementation group: "javax.servlet", name: "jstl"
implementation project(":modules:portal-manager-core")
implementation project(":modules:portal-usermanagement-core")

View File

@ -23,10 +23,11 @@ import java.io.IOException;
@Component(
immediate = true,
property = {
"javax.portlet.name=vlabs_display",
"javax.portlet.name=vlabs-display-portlet",
"javax.portlet.display-name=Vlabs Display Portlet",
"javax.portlet.init-param.template-path=/",
"javax.portlet.init-param.view-template=/html/vlabsdisplay/view.jsp"
"javax.portlet.init-param.view-template=/html/vlabsdisplay/view.jsp",
"javax.portlet.init-param.config-template=/html/vlabsdisplay/config.jsp"
},
service = Portlet.class
)

View File

@ -8,7 +8,16 @@ import javax.portlet.PortletPreferences;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.portlet.DefaultConfigurationAction;
import com.liferay.portal.kernel.portlet.ConfigurationAction;
import org.osgi.service.component.annotations.Component;
@Component(
immediate = true,
property = {
"javax.portlet.name=vlabs-display-portlet"
},
service = ConfigurationAction.class
)
public class VLabsDisplayConfigurationAction extends DefaultConfigurationAction {
private static Log _log = LogFactoryUtil.getLog(VLabsDisplayConfigurationAction.class);
@Override
@ -109,4 +118,4 @@ public class VLabsDisplayConfigurationAction extends DefaultConfigurationAction
return "/html/vlabsdisplay/config.jsp";
}
}
}

View File

@ -7,5 +7,3 @@ change-log=
page-url=https://gcube-system.org
author=M. Assante
licenses=EUPL
portal-dependency-jars=\
vaadin.jar

View File

@ -60,6 +60,7 @@
pageContext.setAttribute("vlabList", vlabList);
%>
<div class="virtual-labs-widget">
<c:forEach var="vlab" items="${vlabList}" varStatus="st">
@ -87,7 +88,7 @@
<div id="${preId}">
<c:choose>
<c:when test="${fn:length(vlab.content) > abstractCharsLengthMax}">
${fn:substring(vlab.content, 0, abstractCharsLengthMax)} ...
<%= HtmlUtil.stripHtml((String)pageContext.findAttribute("vlab")==null?"":((java.util.Map)pageContext.findAttribute("vlab")).get("content").toString().substring(0, abstractCharsLengthMax) + " ...") %>
<div>
<a href="javascript:switchView('#${preId}', '#${contentId}');">Read More »</a>
</div>
@ -109,3 +110,4 @@
</div>
</c:if>
</c:forEach>
</div>