liferay configuration.jsp 添加tabs

xiaoxiao2026-05-27  1

configuration.jsp与普通的页面加tabs有区别,搞了半天终于弄出来了

代码:

configuration.jsp:

<%     String tabs = ParamUtil.getString(request, "tabs", "tab1"); %> <liferay-portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="portletURL" portletConfiguration="true">     <portlet:param name="tabs" value="<%= tabs %>" /> </liferay-portlet:renderURL> <form action="<liferay-portlet:actionURL portletConfiguration="true" />" method="post" name="<portlet:namespace />fm"> <input name="<portlet:namespace /><%= Constants.CMD %>" type="hidden" value="<%= Constants.UPDATE %>" /> <input name="<portlet:namespace />tabs" type="hidden" value="<%= HtmlUtil.escape(tabs) %>" /> <liferay-ui:tabs     names="user-setup,add-definition"     param="tabs" tabsValues="tab1,tab2"     url="<%= portletURL%>" />

<c:choose>     <c:when test='<%= tabs.equals("tab1") %>'>

            tab1

    </c:when>     <c:when test='<%= tabs.equals("tab2") %>'>

           tab2

   </c:when>

</c:choose>

 

主要是url的生成方式

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5049458.html

最新回复(0)