aspose file tools*
The moose likes Struts and the fly likes Problem's in display table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem Watch "Problem New topic
Author

Problem's in display table

Meenatchi Sundar
Greenhorn

Joined: Jan 31, 2011
Posts: 12
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>




























    Sunny Bhandari
    Ranch Hand

    Joined: Dec 06, 2010
    Posts: 448

    Use code tags to make your code readable. Also if possible, post the screen shots of web application.


    Java Experience
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Problem's in display table