• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Problem's in display table

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Use code tags to make your code readable. Also if possible, post the screen shots of web application.
     
    If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
    Garden Master Course kickstarter
    https://coderanch.com/t/754577/Garden-Master-kickstarter
    reply
      Bookmark Topic Watch Topic
    • New Topic