Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem's in display table

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Im meenatchi Sundar.Im new to struts.I have an ReportLeavehistPreview.jsp page in which display table was applied..My problem is that when i click the new link(ie First Previous 1,2,3,4 Next,Last)..It is displayed in separate page..But before it was displayed in an page which supposed to be viewed.can anyone solve the issues..
ReportLeavehistPreview.jsp:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>;
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%@ page import="com.rooster.hcmone.vo.LeaveReqsApprovalVO"%>
<%@ page import="com.rooster.hcmone.vo.LeaveHistoryVO"%>
<html>
<head>
<jsp:include page="common/css.jsp" flush="true"/>
<title><s:text name="label.title.reports.name"/></title>
<sx:head cache="true"/>
</head>
<body>
<div id="report_LeaveResult_div">


<s:if test="#session.USER_NAME==null"><%try{response.sendRedirect("doLogout.action");}catch(Exception e){e.printStackTrace();}%></s:if>
<jsp:include page="common/messages.jsp" flush="true"/>

<div class="informationMessageSingle">
  • <span><s:text name="label.title.lhist.reportList"/></span>
  • </div>
    <s:set name="NO_OF_RECORDS" value="#session.NO_OF_RECORDS"></s:set>
    <s:text name="label.header.common.empName" var="HEmployeeName"></s:text>
    <s:text name="label.header.leaveType.leaveType" var="HLeaveTypeName"/>
    <s:text name="label.header.common.dateApplied" var="HDateApplied"></s:text>
    <s:text name="label.header.leaveHistory.leaveStatus" var="HLeaveStatus"></s:text>
    <s:text name="label.header.common.comments" var="HComments"></s:text>

    <display:table class="tableborder" id="leaveListId" name="leaveList" pagesize="${NO_OF_RECORDS}" requestURI="getLeaveHistoryReportsPreview.action" sort="list" defaultsort="1" defaultorder="ascending">
    <display:column property="empIdObj.empFirstName" title="${HEmployeeName}" sortable="true" headerClass="sortable"/>
    <display:column property="leaveTypeIdObj.leaveTypeName" title="${HLeaveTypeName}" sortable="true" headerClass="sortable"/>
    <display:column property="leaveDate" title="${HDateApplied}" format="{0,date,MM-dd-yyyy}" sortable="false" headerClass="sortable"/>
    <display:column property="leaveStatus" title="${HLeaveStatus}" sortable="true" headerClass="sortable"/>
    <display:column property="leaveComments" title="${HComments}" maxLength="10"/>
    </display:table>
    </div>
    </body>
    </html>

    And also i pasted the form:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
    <%@ page contentType="text/html; charset=UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
    <html>
    <head>
    <jsp:include page="common/css.jsp" flush="true"/>
    <title><s:text name="label.title.reports.name"/></title>
    <sx:head cache="true"/>
    </head>
    <body>
    <div id="report_Leave_div">
    <s:if test="#session.USER_NAME==null"><%try{response.sendRedirect("doLogout.action");}catch(Exception e){e.printStackTrace();}%></s:if>
    <jsp:include page="common/messages.jsp" flush="true"/>
    <s:form action="reportsLeave" id="reports_form_id">
    <table class="maintable">
    <tr>
    <td ><table class="formouter">
    <tr>
    <td><table class="employeeformiinertable">
    <tr>
    <td class="formtitle">
    <s:text name="label.title.reports.leaveForm"/>
    </td>
    </tr>
    <tr>
    <td class="forminner"><table class="tablealign">
    <tr>
    <td class="inputtext"><s:text name="label.form.fields.reports.fromDate"/></td>
    <td class="employeeinputtd">
    <sx:datetimepicker name="report.fromDate" displayFormat="MM/dd/yyyy" type="date" cssClass="employeeinput"/>
    <s:text name="label.date.format"/>
    </td>
    <td></td>
    </tr>
    <tr>
    <td class="inputtext"><s:text name="label.form.fields.reports.toDate"/></td>
    <td class="employeeinputtd">
    <sx:datetimepicker name="report.toDate" displayFormat="MM/dd/yyyy" type="date" cssClass="employeeinput"/>
    <s:text name="label.date.format"/>
    </td>
    </tr>
    <s:if test="#session.ROLE == 'Admin' || #session.ROLE == 'admin' || #session.ROLE == 'ADMIN'">
    <tr>
    <td class="inputtext"><s:text name="label.header.common.empName"/></td>
    <td class="employeeinputtd">
    <s:select
    headerKey=""
    list="#application.APPL_EMPLOYEE_LIST"
    listKey="employeeId"
    listValue="empFirstName"
    name="report.empIdObjList.employeeId"
    cssClass="employeeselect"
    multiple="true"
    size="3"
    />
    </td>
    </tr>
    </s:if>
    <s:elseif test="#session.LEAVE_APPROVER == 'BOTH'">
    <tr>
    <td class="inputtext"><s:text name="label.header.common.empName"/></td>
    <td class="employeeinputtd">
    <s:select
    headerKey=""
    list="#request.leaveSubEmpListReport"
    listKey="employeeId"
    listValue="empFirstName"
    name="report.empIdObjList.employeeId"
    cssClass="employeeselect"
    multiple="true"
    size="3"
    />
    </td>
    </tr>
    </s:elseif>
    </table></td></tr></table></td></tr></table></td></tr></table>


    <table >
    <tr>
    <td>
    <div class="button-comments">
    <div class="button-left"></div>
    <s:submit key="button.label.generatereports" cssClass="button-midle"/>
    <div class="button-right"></div>
    </div>
    </td>
    <td>
    <s:url var="LeaveHistoryReportsPreview" action="getLeaveHistoryReportsPreview"/>
    <sx:submit formId="reports_form_id" targets="preview_leaveHistReports_div" href="%{#LeaveHistoryReportsPreview}" key="button.label.preview" cssClass="resetbutton117" indicator="indicatorReportLeaveHistForm"/>

    </td>
    <td>
    <s:reset key="button.label.reset" cssClass="resetbutton117"/> 
    </td>
    </tr>
    </table>
    </s:form>
    <div id="preview_leaveHistReports_div">
    </div>

    </div>
    </body>
    </html>




























     
    Ranch Hand
    Posts: 448
    Eclipse IDE Firefox Browser Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Use code tags to make your code readable. Also if possible, post the screen shots of web application.
     
    When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
      Bookmark Topic Watch Topic
    • New Topic