EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: gelector on June 13, 2014, 06:42:00 AM



Title: datagrid renders two times in portlet
Post by: gelector on June 13, 2014, 06:42:00 AM
Hi

i am using datagrid in liferay portlet with spring MVC. i have two portlets and two JSPs one for each portlet. in both JSP i have datagrid
my problem is that when portlet renders it shows datagrid's header two times.

JSP 1 code:

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>

<portlet:resourceURL id="loadTaskListURL" var="loadTaskListURL"/>

<h3 align="center">Activiti Task List</h3>

<table id="dg3" title="Task List" class="easyui-datagrid1" style="width:400px;height:150px"
url="${loadTaskListURL}"
        singleSelect="true" iconCls="icon-save">
        <thead>
            <tr>
                <th data-options="field:'id'">Process ID</th>
                <th data-options="field:'name'">Process Name</th>
                <th data-options="field:'description'">Description</th>
                <th data-options="field:'status'">Status</th>
            </tr>
        </thead>
    </table>


JSP 2 code:

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>

<portlet:resourceURL id="loadProcessListURL" var="loadProcessListURL"/>

<h3 align="center">Activiti Process List</h3>

<table id="dg2" title="Process List" class="easyui-datagrid" style="width:400px;height:150px"
url="${loadProcessListURL}"
        singleSelect="true" iconCls="icon-save">
        <thead>
            <tr>
                <th data-options="field:'id'">Process ID</th>
                <th data-options="field:'name'">Process Name</th>
                <th data-options="field:'description'">Description</th>
                <th data-options="field:'status'">Status</th>
            </tr>
        </thead>
    </table>

i have also attached sceenshot for reference.
thanks in advance