Skip to content

Commit

Permalink
LPS-60742 Adds lexicon view to PanelContainerTag
Browse files Browse the repository at this point in the history
  • Loading branch information
ealonso authored and brianchandotcom committed Nov 25, 2015
1 parent 107ebc5 commit 5de4b3a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 8 deletions.
19 changes: 19 additions & 0 deletions portal-web/docroot/html/taglib/ui/panel_container/lexicon/end.jsp
@@ -0,0 +1,19 @@
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>

<%@ include file="/html/taglib/ui/panel_container/init.jsp" %>

</div>
@@ -0,0 +1,19 @@
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>

<%@ include file="/html/taglib/ui/panel_container/init.jsp" %>

<div aria-multiselectable="true" class="panel-group <%= cssClass %>" id="<%= id %>" role="tablist">
5 changes: 5 additions & 0 deletions util-taglib/src/META-INF/liferay-ui.tld
Expand Up @@ -3794,6 +3794,11 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>markupView</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Whether to remember the component's state and persist it to the database. The default value is <![CDATA[<code>false</code>]]>.</description>
<name>persistState</name>
Expand Down
25 changes: 17 additions & 8 deletions util-taglib/src/com/liferay/taglib/ui/PanelContainerTag.java
Expand Up @@ -136,6 +136,10 @@ public void setId(String id) {
_id = id;
}

public void setMarkupView(String markupView) {
_markupView = markupView;
}

public void setPersistState(boolean persistState) {
_persistState = persistState;
}
Expand All @@ -156,7 +160,12 @@ protected void cleanUp() {

protected String getEndPage() {
if (Validator.isNull(_endPage)) {
return _END_PAGE;
if (Validator.isNotNull(_markupView)) {
return "/html/taglib/ui/panel_container/" + _markupView +
"/end.jsp";
}

return "/html/taglib/ui/panel_container/end.jsp";
}
else {
return _endPage;
Expand All @@ -165,24 +174,24 @@ protected String getEndPage() {

protected String getStartPage() {
if (Validator.isNull(_startPage)) {
return _START_PAGE;
if (Validator.isNotNull(_markupView)) {
return "/html/taglib/ui/panel_container/" + _markupView +
"/start.jsp";
}

return "/html/taglib/ui/panel_container/start.jsp";
}
else {
return _startPage;
}
}

private static final String _END_PAGE =
"/html/taglib/ui/panel_container/end.jsp";

private static final String _START_PAGE =
"/html/taglib/ui/panel_container/start.jsp";

private boolean _accordion;
private String _cssClass;
private String _endPage;
private Boolean _extended;
private String _id;
private String _markupView;
private boolean _persistState;
private String _startPage;

Expand Down

0 comments on commit 5de4b3a

Please sign in to comment.