无法从选项卡中获取参数 ui

Can't get param from tabs ui

当无法点击一个选项卡时出现此选项卡,因为 wabValue 始终为红色,我无法获取该值,当点击 _redirectorportlet_WAR_redirectorportlet_tabValue 的值更改但我无法获取它时: /.我怎样才能得到这个值并显示用户点击的选项卡?

我有一个这样的标签:

<liferay-ui:tabs names="red,white" param="tabValue" tabsValues="red,white" value="<%=tabValue %>">
<c:if test="<%= tabValue.equals("red") %>">
<%@ include file ="red/view.jsp" %> 
</c:if>

<c:if test="<%= tabValue.equals("white") %>">
<%@ include file ="white/view.jspf" %> 
</c:if>

</liferay-ui:tabs>

向上我得到参数

String tabValue = ParamUtil.getString(request, "_redirectorportlet_WAR_redirectorportlet_tabValue", "Red");

总是 return 红色但是在 url 我可以看到你把这个:

http://localhost:8080/group/rercer/administracion?_rercerorportlet_WAR_rercerportlet_tabValue=Red

发生了什么事? :(

您不必一直手动检查选项卡参数。 请参阅下面的代码片段示例。 liferay-ui 标签将负责持久化标签 value/display.

<portlet:renderURL var="portletURL"></portlet:renderURL><br> <liferay-ui:tabs param="currTAB" names="tab1,tab2,tab3" refresh="<%= true %>" url="<%=portletURL.toString( ) %>"><br> <liferay-ui:部分><br> <%@ 包含文件="tab1.jsp" %><br> </liferay-ui:section><br> <liferay-ui:部分><br> <%@ 包含文件="tab2.jsp" %><br> </liferay-ui:section><br> <liferay-ui:部分><br> <%@ 包含文件="tab3.jsp" %><br> </liferay-ui:section><br> </liferay-ui:tabs>