Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem when running in jetty server but not tomcat6.0

 
Dharmendra Yadav
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing this problem in jetty server.

I am using tomcat 6.0 which supports servlet2.5 and my jetty version is 6.1.26 which also supports servlet2.5.

I am calling one java script function defined in .js file in jsp tag.

I am attaching the jsp, js and tag file.

Please suggest any idea to rectify this error.

bellow is the error log.

HTTP ERROR 500

Problem accessing /gtind/quicksurveyHome. Reason:

ServletException including path '/WEB-INF/tiles/layout.jsp'.
Caused by:

org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/tiles/layout.jsp'.
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:691)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:643)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:626)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1157)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:927)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.ansell.industrial.aspects.LoginFilter.doFilter(LoginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at com.ansell.industrial.aspects.LoginFilter.doFilter(LoginFilter.java:70)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.tiles.util.TilesIOException: ServletException including path '/WEB-INF/tiles/layout.jsp'.
at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:243)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:689)
... 63 more
Caused by: org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/jsp/quicksurvey.jsp'.
at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:234)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337)
at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234)
at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211)
at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)
at org.apache.jsp.WEB_002dINF.tiles.layout_jsp._jspx_meth_tiles_insertAttribute_3(org.apache.jsp.WEB_002dINF.tiles.layout_jsp:293)
at org.apache.jsp.WEB_002dINF.tiles.layout_jsp._jspService(org.apache.jsp.WEB_002dINF.tiles.layout_jsp:153)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
... 68 more
Caused by: org.apache.jasper.JasperException: /WEB-INF/jsp/quicksurvey.jsp(266,1) PWC6297: The function loadSizes cannot be located with the specified prefix
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:62)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:185)
at org.apache.jasper.compiler.Validator$ValidateVisitor$1FVVisitor.visit(Validator.java:1588)
at org.apache.jasper.compiler.ELNode$Function.accept(ELNode.java:148)
at org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:219)
at org.apache.jasper.compiler.ELNode$Visitor.visit(ELNode.java:286)
at org.apache.jasper.compiler.ELNode$Root.accept(ELNode.java:79)
at org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:219)
at org.apache.jasper.compiler.Validator$ValidateVisitor.validateFunctions(Validator.java:1597)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1340)
at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1117)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:854)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
at org.apache.jasper.compiler.Validator.validate(Validator.java:1837)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:997)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:682)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)
... 93 more

jsp file content:



<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="rnd" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />

<script type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${contextPath}/resources/js/jqgrid/grid.locale-en.js" ></script>
<script type="text/javascript" src="${contextPath}/resources/js/jqgrid/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/themes/custom-theme/minified/jquery.ui.autocomplete.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/quicksurvey.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/customerSearch.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/validation/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/validation/jquery.validationEngine.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/editableCombo/jquery.eComboBox.min.js"></script>
<link href="${contextPath}/resources/css/jqgrid/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<link href="${contextPath}/resources/css/validation/validationEngine.jquery.css" rel="stylesheet" type="text/css" />


<div class="content">
<sf:form name="formQuickSurvey" id="formQuickSurvey" method="post" modelAttribute="saveSurvey">

<h1>Quick Application Assessment</h1>
<div id="accordion">
<!--tab1--><div class="ui-accordion_content" >
<div class="ui-accordion-header accordian_pad">
<a href="#">Survey Details</a>
</div>
<input id="hiddenSaveStatus" type="hidden"/>

<div id="surveyDteatisDiv">
<table class="input_field wd100 wdth70">
<tr><td class="padright">
<table border="0" align="right" >
<tr>
<th width="46%"><span class="red">*</span> <input
id="customerNameButton" type="button" class="label pointer"
value="Customer Name"
title="<spring:message code="tooltip.selectSearchCustomer"/>" /></th>
<td width="46%"><sf:input path="custName" name="" type="text"
class="sf-fieldbg disabled-state validate[required]" id="txtCustName" readonly="true"
title="Click on Customer Name" /></td>
<sf:hidden path="custName" id="txtCustNameHid" />
<sf:hidden path="customerId" id="txtCustId" />
<td width="8%"><img src="./resources/img/icon-img.gif"
onclick="openDetails()"
title="<spring:message code="tooltip.details"/>" />
<div id="fieldDiv">
<div class="validation-txt" id="custReq">This field is
required!</div>
</div>
</td>
</tr>
<!-- <tr>
<td> </td>
<td colspan="2">
<div id="ShowErrorDiv" style="display: none"></div>
</td>
</tr>-->
<tr>
<th>Assessment Type:</th>
<td><sf:select path="assessmentType" name="assessmentType"
class="sf-drpdn02 disabled-state" title="Select assessmentType">

<!--<option value="">Select</option>
--><c:forEach var="solutionValues" items="${surveySolution}">
<option value=${solutionValues.id}>${solutionValues.value}</option>
</c:forEach>
</sf:select></td>
<td> </td>
</tr>
<tr>
<th>Description:</th>
<td><sf:textarea path="surveyDescription" id="textarea" maxlength="500" cols="45" rows="5" class="disabled-state"></sf:textarea></td>
<td> </td>
</tr>
</table></td>
<td><table border="0" align="left" class="wd49">
<tr>



<th width="45%"><input id="contactButton"
title="<spring:message code="tooltip.selectSearchContact"/>"
type="button" class="label pointer" value="Contact Name" /> <input
type="hidden" id="textAreaContact" name="textAreaContact"

class="sf-fieldbg sf-fieldbg"></input></th>
<td width="47%"><sf:input id="contactSelect"
path="" name="contactSelect" class="height30" readonly="true"
title="Click On Contact Name"></sf:input>
</td>
<sf:hidden path="contactId" id="txtContactId" />

<td width="8%"><img src="./resources/img/icon-img.gif"
onclick="openContactDetails()"
title="<spring:message code="tooltip.details"/>" /></td>
</tr>
<tr>
<th>Survey Type:</th>

<td><sf:select path="refSurveyTemplateId"
title="Select Survey Template" class="disabled-state">
<option value="">Select</option>
<c:forEach var="surveyTemplate" items="${surveyTemplate}">
<option value=${surveyTemplate.id}>${surveyTemplate.value}</option>
</c:forEach>
</sf:select></td>
<td> </td>
</tr>
<tr>
<th><span class="red">*</span>Vertical:</th>

<td><sf:select path="verticalId" title="Select Vertical" class="disabled-state validate[required]">
<option value="">Select</option>
<c:forEach var="vertical" items="${vertical}">
<option value=${vertical.id}>${vertical.value}</option>
</c:forEach>
</sf:select></td>
<td> </td>
</tr>
<tr>
<th>Activity:</th>

<td><sf:select path="activityId" title="Select Activity" class="disabled-state">
<option value="">Select</option>
</sf:select></td>
<td> </td>
</tr>
</table></td></tr>
</table>

<div class="clr float_r" id="saveButtonDiv">
<!--<input name="continue" value="Save"
title="<spring:message code="tooltip.save"/>" class="form_button"
type="button" onclick="saveAssessmentData()" />
<input type="button" name="cancelSurvey" id="cancelSurvey" value="Cancel" class="form_button" title="<spring:message code="tooltip.close"/>" />
</div>-->
</div>
<div class="clr"></div>
</div>
<!-- tab2-->

<div id="applicationSectionDiv" class="ui-accordion_content">
<div class="ui-accordion-header accordian_pad float_l"><a
href="#">Application Details</a></div>
<div class="float_l blue_heading input_field pad3">Applications <sf:select
path="applicationData.applicationId" name="selectApplication"
class="disabled-state" id="selectApplication">
<!--<sf:option value="" label="Select"/>-->
</sf:select></div>
<div class="float_r pad3"><img
src="${contextPath}/resources/img/reports.png" width="15" height="18"
class="pointer" id="reports" name=""
title="<spring:message code="tooltip.report"/>" /> <img
src="${contextPath}/resources/img/quicknotes.png" width="15"
height="18" class="underconstruction pointer" id="" name=""
title="<spring:message code="tooltip.quicknotes"/>" /> <img
src="${contextPath}/resources/img/add.png" width="16" height="16"
id="imgNewApplication" name="imgNewApplication" class="pointer"
title="<spring:message code="tooltip.addnewapplication"/>" /> <img
src="${contextPath}/resources/img/delete.png" width="16" height="16"
id="imgDeleteApplication" class="displayMessageCreateApp pointer"
name="imgDeleteApplication" title=" <spring:message code="tooltip.deleteapplication"/>" />
<img src="${contextPath}/resources/img/copy.png" width="16" height="16"
id="imgCopyApplication" class="displayMessageCreateApp pointer"
name="imgCopyApplication" title=" <spring:message code="tooltip.copyapplication"/>"/>

</div>
<!-- samrat disable application section -->
<div id="applicationSection">

<div class="clr"></div>
<div id="applicationDetailsDiv" style="display: none;">

<table class="wd100 bordtop" cellpadding="0" cellspacing="0" style="margin-top:20px;">
<tr>

<td width="48%">


<table border="0" align="right" class="input_field mar1">

<tr>
<th>Name:</th>
<td><label for="textfield4"></label> <sf:input type="text" path="applicationData.applicationName"
id="textApplicationName" class="disabled-state applicationfield" /></td>
</tr>
<tr>
<th>Department:</th>
<td><label for="select3"></label> <sf:select path="applicationData.departmentId" name="selectDepartment" id="selectDepartment" itemValue="applicationData.departmentId" itemLabel="applicationData.departmentName" class="disabled-state applicationfield">
<!--<sf:option value="" label="Select"/>-->
</sf:select><sf:hidden path="applicationData.departmentName" id="selectDepartmentName" /></td>
</tr>
<tr>
<th>Process:</th>
<td><label for="select4"></label> <sf:select path="applicationData.processId" name="selectProcess" id="selectProcess" itemValue="applicationData.processId" itemLabel="applicationData.processName" class="disabled-state applicationfield">
<sf:option value="" label="Select"/>
</sf:select></td>
</tr>
<tr>
<th>Application Profile:</th>
<td><label for="select5"></label> <sf:select path="applicationData.applicationProfileId" name="selectApplicationProfile" id="selectApplicationProfile" itemValue="applicationData.applicationProfileId" itemLabel="applicationData.applicationProfileName" class="disabled-state applicationfield">
<sf:option value="" label="Select"/>
</sf:select>
</td>
</tr>
<tr>
<th>Description:</th>
<td><label for="textarea3"></label> <sf:textarea name="textareaApplicationComments" maxlength="2000" path="applicationData.applicationComments" class="disabled-state applicationfield"
id="textareaApplicationComments" cols="45" rows="5"></sf:textarea></td>
</tr>
</table>

</td><td>
<!-- ##################Shift Details Table#############################33 -->
<!--<jsp:include page="shiftDetails.jsp" flush="true">
<jsp:param value="100001655" name="applicationId"/>
<jsp:param value="100000516" name="surveyId"/>
</jsp:include>

-->

<div>

<input type="hidden" id="dynIdGrid" value="shiftDetailsGrid"/>

<rnd:ShiftGrid sortOrder="desc"
gridId="shiftDetailsGrid" loadUrl="loadShiftDetailsGrid" sortIndex="firstName" gridTitle="Shift Table"
colModel="[{name:'shiftName',editable:true,index:'shiftName',
editrules:{required: true,custom:true,custom_func:checkShiftName}}
,{name:'workingHours',editable:true,index:'workingHours',align:'right', editrules:{number:true,maxValue:24}}
,{name:'workingDaysInYear',editable:true,index:'workingDaysInYear',align:'right', editrules:{number:true,maxValue:366}}
,{name:'totalNumWorkers',editable:true,index:'totalNumWorkers',align:'right', editrules:{number:true,maxValue:9999999}}
,{name:'shiftId',index:'shiftId',editable:true,align:'right',hidden:true}
,{name:'surveyId',index:'surveyId',editable:true,align:'right',hidden:true}
,{name:'applicationId',index:'applicationId',editable:true,align:'right',hidden:true}
]"
colNames="['Shift Name','Working Hours/Duration in a Shift','Working Days in Year','Total No. Of Workers','Shift Id','Survey Id','Application Id']"
tableCaption=""
customParam="applicationId: function() { return $('#selectApplication option:selected').val(); }"

additonalGridParams=",loadComplete:function (data){calcTotolEmp();},editurl:'editShiftRow'"
fn="onSelShift" > </rnd:ShiftGrid>
</div>
<div style="display:none"> <table width="100%">
<tr>
<td>
<div class="">
<div class="float_r">
Total No. Of Workers:
<input id ="noOfWorkers" type="text" disabled="disabled" value="0" class="rightAlignNumeric"/>
</div>
</div>
</td>
</tr>
</table> </div>

<!-- ###################Shift Details Table ends##############################################33 -->

</td></tr>

</table> <div class="clr"></div>
<rnd:CustomFormInlineEditableGrid
addUrl="editsurveyppe" sortOrder="desc" gridWidth="gridWidth()"
deleteUrl="editsurveyppe" editUrl="editsurveyppe"
gridId="curruntppeGrid" loadUrl="getcostperformancecurreuntPPE" gridTitle="Current PPE"
sortIndex=""
colModel="[{name:'id',index:'id',hidden:true,key:true},
{name:'surveyId',index:'surveyId',hidden:true,editable:true},
{name:'applicationId',index:'applicationId',hidden:true,editable:true},
{name:'categoryId',index:'categoryId',hidden:true,editable:true},
{name:'manufacturerId',index:'manufacturerId',hidden:true,editable:true},
{name:'styleId',index:'styleId',hidden:true,editable:true},
{name:'uomId',index:'uomId',hidden:true,editable:true},
{name:'averagelifetimeselectId',index:'averagelifetimeselectId',hidden:true,editable:true},
{name:'sizesId',index:'sizesId',hidden:true,editable:true},
{name:'vp2Id',index:'vp2Id',hidden:true,editable:true},
{name:'gridId',index:'gridId',hidden:true,editable:true,editoptions:{defaultValue:'current'}},
{name:'recordId',index:'recordId',hidden:true,editable:true},

{name:'category',index:'category',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + catList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'manufacturer',index:'manufacturer',align:'center', editable: true, hidden: false, edittype: 'select',
editoptions: { value:eval('(' + manufList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'style',index:'style',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('('+styleList+')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
var data= fn:loadSizes(elem);
jQuery('#curruntppeGridgrid').setColProp('sizes',{editoptions:{multiple:true,value:data}});
}
},
dataEvents: [{
type: 'change',
fn:function(e){
loadCategoryAndManufacturer(e);
}}]

},
editrules: { required: true,custom:true,custom_func:categorycheck}},
{name:'uom',index:'uom',align:'center', editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + uomfList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenUom(e);
}}]
},
editrules: { required: false }},

{name:'averagelifetime',index:'averagelifetime',editable:true,align:'center',sortable:false,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
},
{
type: 'change',
fn:function(e){
setQty(e);
}
}
]}
},

{name:'averagelifetimeselect',index:'averagelifetimeselect',editable:true,align:'center',edittype: 'select',
editoptions:{ multiple: false, value: eval('(' + avglifetimelist + ')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
jQuery('#curruntppeGridgrid').setColProp('averagelifetimeselectId', { editoptions: { defaultValue:v}} );
}
},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenaveragelifetimeselect(e);
setQty(e);
}}]
},
editrules: { required: false }},

{name:'qty',index:'qty',align:'center',editable:true,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'change',
fn:function(e){
calculateannualCost(e);
}
},{
type:'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}]
}
},
{name:'cost',index:'cost',align:'center',editable:true,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'change',
fn:function(e){
calculateannualCost(e);
}
},{
type:'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}]
}
},
{name:'sizes',index:'sizes',align:'center',edittype:'select',editable:true,editoptions:{multiple:true,value:{},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddensizes(e);
}}]
}
},
{name:'annualCost',index:'annualCost',align:'center',editable: true, editoptions: { readonly: 'readonly' }},
{name:'vp2',index:'vp2',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + vp2fList + ')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
jQuery('#curruntppeGridgrid').setColProp('vp2Id', { editoptions: { defaultValue:v}} );
}
},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenvp2(e);
}}]
},
editrules: { required: false }}
]"
colNames="['Action','surveyId','applicationId','CategoryId','ManufacturerId','StyleId','UOMId','averagelifetimeselectId','sizesId','vp2Id','gridid',
'recordId','Category','Manufacturer','Style','UOM','Count','Unit','Qty','Cost','Sizes','Annual Cost','VP2']"
additonalGridParams=",ajaxSelectOptions: { cache: false }"
customInitMethod="jQuery('#curruntppeGridgrid').jqGrid('setGroupHeaders',{
useColSpanStyle: true,
groupHeaders:[{
startColumnName: 'averagelifetime',
numberOfColumns: 2,
titleText: '<em>Average Lifetime</em>'
}
]});"
fn="onSelectRow"
deleteParams="mtype:'POST',reloadAfterSubmit:true,
serializeDelData: function (postdata) {
var row = jQuery('#curruntppeGridgrid').getRowData(postdata.id);
// append postdata with extra information
return {id: postdata.id, oper: postdata.oper,
surveyId:row.surveyId,applicationId:row.applicationId,
category:row.category,manufacturer:row.manufacturer,style:row.style,uom:row.uom,
annualCost:row.annualCost,averagelifetime:row.averagelifetime,
averagelifetimeselect:row.averagelifetimeselect,cost:row.cost,qty:row.qty,
sizes:row.sizes,vp2:row.vp2,categoryId:row.categoryId,manufacturerId:row.manufacturerId,styleId:row.styleId,
uomId:row.uomId,averagelifetimeselectId:row.averagelifetimeselectId,sizesId:row.sizesId,vp2Id:row.vp2Id,gridId:'current',recordId:row.recordId
};
}"

>
</rnd:CustomFormInlineEditableGrid>

<rnd:CustomFormInlineEditableGrid
gridId="reccurruntppeGrid" editUrl="editsurveyppe" gridWidth="gridWidth()"
loadUrl="getcostperformancerecommendedPPE" gridTitle="Recommended PPE"
colModel="[{name:'id',index:'id',hidden:true,key:true},
{name:'surveyId',index:'surveyId',hidden:true,editable:true},
{name:'applicationId',index:'applicationId',hidden:true,editable:true},
{name:'categoryId',index:'categoryId',hidden:true,editable:true},
{name:'manufacturerId',index:'manufacturerId',hidden:true,editable:true},
{name:'styleId',index:'styleId',hidden:true,editable:true},
{name:'uomId',index:'uomId',hidden:true,editable:true},
{name:'averagelifetimeselectId',index:'averagelifetimeselectId',hidden:true,editable:true},
{name:'sizesId',index:'sizesId',hidden:true,editable:true},
{name:'vp2Id',index:'vp2Id',hidden:true,editable:true},
{name:'gridId',index:'gridId',hidden:true,editable:true,editoptions:{value:'rec'}},
{name:'recordId',index:'recordId',hidden:true,editable:true},

{name:'category',index:'category',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + catList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'manufacturer',index:'manufacturer',align:'center', editable: true, hidden: false, edittype: 'select',
editoptions: { value:eval('(' + manufList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'style',index:'style',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('('+styleList+')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
var data=loadSizes(elem);
jQuery('#reccurruntppeGridgrid').setColProp('sizes',{editoptions:{multiple:true,value:data}});
}
},
dataEvents: [{
type: 'change',
fn:function(e){
loadCategoryAndManufacturer(e);
}}]

},
editrules: { required: true,custom:true,custom_func:categorycheck}},
{name:'uom',index:'uom',align:'center', editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + uomfList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenUom(e);
}}]
},
editrules: { required: false }},

{name:'averagelifetime',index:'averagelifetime',editable:true,align:'center',sortable:false,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
},
{
type: 'change',
fn:function(e){
setQty(e);
}
}
]}
},

{name:'averagelifetimeselect',index:'averagelifetimeselect',editable:true,align:'center',edittype: 'select',
editoptions:{ multiple: false, value: eval('(' + avglifetimelist + ')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
jQuery('#reccurruntppeGridgrid').setColProp('averagelifetimeselectId', { editoptions: { value:v}} );
}
},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenaveragelifetimeselect(e);
setQty(e);
}
}]
},
editrules: { required: false }},

{name:'qty',index:'qty',align:'center',editable:true,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'change',
fn:function(e){
calculateannualCost(e);
}
},{
type:'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}]
}
},
{name:'cost',index:'cost',align:'center',editable:true,editrules:{integer:true},
editoptions:{class:'validate[custom[numbersOnly]]',
dataEvents: [{
type: 'change',
fn:function(e){
calculateannualCost(e);
}
},{
type:'click',
fn:function(e){
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}]
}
},
{name:'sizes',index:'sizes',align:'center',edittype:'select',editable:true,editoptions:{multiple:true,value:{},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddensizes(e);
}}]
}
},
{name:'annualCost',index:'annualCost',align:'center',editable: true, editoptions: { readonly: 'readonly' }},
{name:'vp2',index:'vp2',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + vp2fList + ')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
jQuery('#reccurruntppeGridgrid').setColProp('vp2Id', { editoptions: { value:v}} );
}
},
dataEvents: [{
type: 'change',
fn:function(e){
setHiddenvp2(e);
}}]
},
editrules: { required: false }}
]"
colNames="['Action','surveyId','applicationId','CategoryId','ManufacturerId','StyleId','UOMId','averagelifetimeselectId','sizesId','vp2Id','gridid',
'recordId','Category','Manufacturer','Style','UOM','Count','Unit','Qty','Cost','Sizes','Annual Cost','VP2']"
customInitMethod="jQuery('#reccurruntppeGridgrid').jqGrid('setGroupHeaders',{
useColSpanStyle: true,
groupHeaders:[{
startColumnName: 'averagelifetime',
numberOfColumns: 2,
titleText: '<em>Average Lifetime</em>'
}
]});
jQuery('#reccurruntppeGridgrid').jqGrid('navGrid','#reccurruntppeGridpager').jqGrid('navButtonAdd',
'#reccurruntppeGridpager',{caption:'', buttonicon:'ui-icon-newwin',
onClickButton:function(e){
copycurrenttorecoppe(e);
}, position: 'last', title:'copy selected row', cursor:'pointer'});
"
fn="onSelectRow"
deleteParams="mtype:'POST',reloadAfterSubmit:true,
serializeDelData: function (postdata) {
var row = jQuery('#reccurruntppeGridgrid').getRowData(postdata.id);
// append postdata with extra information
return {id: postdata.id, oper: postdata.oper,
surveyId:row.surveyId,applicationId:row.applicationId,
category:row.category,manufacturer:row.manufacturer,style:row.style,uom:row.uom,
annualCost:row.annualCost,averagelifetime:row.averagelifetime,
averagelifetimeselect:row.averagelifetimeselect,cost:row.cost,qty:row.qty,
sizes:row.sizes,vp2:row.vp2,categoryId:row.categoryId,manufacturerId:row.manufacturerId,styleId:row.styleId,
uomId:row.uomId,averagelifetimeselectId:row.averagelifetimeselectId,sizesId:row.sizesId,vp2Id:row.vp2Id,gridId:row.gridId
};
}"

>
</rnd:CustomFormInlineEditableGrid>

<rnd:CustomFormInlineEditableGrid addUrl="" sortOrder="desc" gridWidth="gridWidth()"
editUrl="saveInjuryDetail"
gridId="surveyInjuryGrid" loadUrl="getInjuryDetail" gridTitle="Injuries"
sortIndex=""
colModel="[
{name:'surveyId',index:'surveyId',hidden:true,editable:true},
{name:'applicationId',index:'applicationId',hidden:true,editable:true},
{name:'injuryParticularId',index:'injuryParticularId',hidden:true,editable:true},
{name:'injuryId',index:'injuryId',hidden:true,editable:true},
{name:'deleteInjuryId',index:'deleteInjuryId',hidden:true,editable:true},
{name:'deleteInjuryParticularId',index:'deleteInjuryParticularId',hidden:true,editable:true},
{name:'injuryName',index:'injuryName',align:'center',editable:true,edittype:'select',editrules:{required:true},
editoptions:{value: eval('(' + injuryBodyPartlist + ')'),
dataInit: function (elem) {
var v = $(elem).val();
// var applicationid = $('#selectApplication').val();
// alert(applicationid);
// jQuery('#curruntppeGridgrid').setColProp('applicationId', { editoptions: { value:applicationid}} );

if(v!=''){
var data = initInjuryPerticularBodypart(elem);
jQuery('#surveyInjuryGridgrid').setColProp('injuryParticularName', { editoptions: { value:data }} );
}
},
dataEvents: [{
type: 'change',
fn:function(e){
loadInjuryPerticularBodypart(e);
}}]}
},
{name:'injuryParticularName',index:'injuryParticularName',align:'center',editable:true,edittype:'select',editrules:{required:true},
editoptions:{value: ':Select'}},
{name:'noOfSeriousInjuries',index:'noOfSeriousInjuries',align:'center',editable:true,edittype:'text',editrules:{integer:true,maxValue:2147483647,custom:true,custom_func:validateNoOfSeriousInjuries},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueExceeds]]',validationfor:'noOfPreventableSeriousInjuries',message:'# of Serious Injuries should be greater than or equal to # Preventable',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
},
{name:'noOfPreventableSeriousInjuries',index:'noOfPreventableSeriousInjuries',align:'center',editable:true,edittype:'text',editrules:{integer:true,maxValue:2147483647,custom:true,custom_func:validateNoOfPreventableSeriousInjuries},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueDoesNotExceeds]]',validationfor:'noOfSeriousInjuries',message:'# Preventable should be less than or equal to # of Serious Injuries',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
},
{name:'noOfLostAndRestrictedDays',index:'noOfLostAndRestrictedDays',align:'center',editable:true,edittype:'text',editrules:{number:true,maxValue:2147483647,custom:true,custom_func:validateNoOfLostAndRestrictedDays},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueExceeds]]',validationfor:'noOfPreventableLostAndRestrictedDays',message:'# of Lost Days should be greater than or equal to # Preventable',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
},
{name:'noOfPreventableLostAndRestrictedDays',index:'noOfPreventableLostAndRestrictedDays',align:'center',editable:true,edittype:'text',editrules:{number:true,maxValue:2147483647,custom:true,custom_func:validateNoOfPreventableLostAndRestrictedDays},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueDoesNotExceeds]]',validationfor:'noOfLostAndRestrictedDays',message:'# Preventable should be less than or equal to # of Lost Days',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
},
{name:'noOfFirstAidInjuries',index:'noOfFirstAidInjuries',align:'center',editable:true,edittype:'text',editrules:{number:true,maxValue:2147483647,custom:true,custom_func:validateNoOfFirstAidInjuries},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueExceeds]]',validationfor:'noOfFirstAidInjuriesPreventable',message:'# of First Aid should be greater than or equal to # Preventable',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
},
{name:'noOfFirstAidInjuriesPreventable',index:'noOfFirstAidInjuriesPreventable',align:'center',editable:true,edittype:'text',editrules:{number:true,maxValue:2147483647,custom:true,custom_func:validateNoOfFirstAidInjuriesPreventable},
editoptions:{'class':'validate[custom[numbersOnly],funcCall[checkValueDoesNotExceeds]]',validationfor:'noOfFirstAidInjuries',message:'# Preventable should be less than or equal to # of First Aid',dataEvents: [
{ type: 'click', fn: function(e)
{
$('#formQuickSurvey').validationEngine({promptPosition:'bottomLeft',validationEventTrigger:'keyup'});
}
}
]}
}
]"
colNames="['surveyId','applicationId','injuryParticularId','injuryId','deleteInjuryId','deleteInjuryParticularId','Body Part','Particular Injury','# of Serious Injuries','# Preventable','# of Lost Days','# Preventable','# of First Aid','# Preventable']"
tableCaption="Search Result" customParam="customerId:'${custId}'"
additonalGridParams="" fn="onSurveySel"
deleteParams="mtype:'POST',reloadAfterSubmit:true,
serializeDelData: function (postdata) {
var rowdata = jQuery('#surveyInjuryGridgrid').getRowData(postdata.id);
// append postdata with extra information
return {id: postdata.id, oper: postdata.oper, surveyId: rowdata.surveyId, applicationId:rowdata.applicationId,injuryName:rowdata.injuryName, injuryParticularName:rowdata.injuryParticularName,injuryParticularId:rowdata.injuryParticularId,injuryId:rowdata.injuryId };
//return data;
}"

>
</rnd:CustomFormInlineEditableGrid>
<!--samrat -->
<div class="pad7">


<table class="critical wd100">
<tr class="heading">
<td class="text font11" colspan="2">
Critical Factor Categories

<div style="float:right"><a href="#" style="float:right" id="showCAFbtn" class="dwn-arw"></a></div>
<div style="float:right"><a href="#" style="float:right; display:none" id="HideCAFbtn" class="dwn-arw" ></a></div>
<input id='hiddenIsCAFloaded' type="hidden" value="0"/>
<!--<input id='showCAFbtn' type="button" onclick="showCAF()" value="Save"/>
<input id='HideCAFbtn' style="display:none" type="button" onclick="hideCAF()" value="hide"/>

--></td>
</tr>
</table>
<!--#############################Added Dynamic generation of Critical application Factors in save###################################################################### -->

<div id="criticalAppFactorDiv" style="display:hidden"></div>

<!-- ################################################################################################### -->

<input onclick="expandAll()" type="button" value="Expand all" style="display:none"/>
<input onclick="collapseAll()" type="button" value="Collapse all" style="display:none"/>
</div>


<!--Application details section disable -->
</div>
<div class="pstn1 bordtop txt_right">
<div id="applicationButtons" class="float_r" >
<input onclick="" id="fullsurvey" type="button" value="Full Survey" class="form_button" title="<spring:message code="tooltip.fullsurvey"/>" />
<input id="save" type="button" value="Save" class="form_button" title="<spring:message code="tooltip.save"/>" />
<input type="button" value="Close" id="close" class="form_button" title="<spring:message code="tooltip.close"/>" />
</div>
<!--<div id="SurveyCloseDiv" class="float_r">
<input type="button" value="Close" id="SurveyClose" class="form_button" title="<spring:message code="tooltip.close"/>" />
</div>
--><div class="clr"></div>

</div>
</div>

</div>
</div>
<div class="push"></div>

<sf:hidden path="cont" id="hiddenContactId" />
<sf:hidden path="surveyId" id="surveyId"/>
<sf:hidden path="createdBy" id="createdBy"/>

<!--Variable to be set for application saving -->
<sf:hidden path="levelNumber" id="levelNumber"/>
<sf:hidden path="levelName" id="levelName"/>
<sf:hidden path="levelMarketSegment" id="levelMarketSegment"/>
<sf:hidden path="safetynetGuid" id="safetynetGuid"/>
<sf:hidden path="applicationComments" id="applicationComments"/>
<sf:hidden path="isCostCenter" id="isCostCenter"/>
<sf:hidden path="nodeSequenceNumber" id="nodeSequenceNumber"/>
<sf:hidden path="nodeId" id="nodeId"/>


</sf:form>

<!-- ################################ -->


<div id='customerModalDialog'></div>
<div id='contactModalDialog'></div>
<div id="customerDetailsDialog"></div>
<div id="customerContactDetailsDialog"></div>
<div id="criticalFactorDetailsDialog"></div>
<div id="surveyCopyDialog"></div>
<input type="hidden" id="totalusage" value="2485"/>
</div>

Tag file content:

<%@ tag isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ attribute name="gridId" required="true"%>
<%@ attribute name="colModel" required="true"%>
<%@ attribute name="colNames" required="true"%>
<%@ attribute name="tableCaption" required="false"%>
<%@ attribute name="sortIndex" required="false"%>
<%@ attribute name="sortOrder" required="false"%>
<%@ attribute name="loadUrl" required="true"%>
<%@ attribute name="addUrl" required="false"%>
<%@ attribute name="editUrl" required="false"%>
<%@ attribute name="deleteParams" required="false"%>
<%@ attribute name="editExtraData" required="false"%>
<%@ attribute name="deleteUrl" required="false"%>
<%@ attribute name="additonalGridParams"%>
<%@ attribute name="customFormId" required="false"%>
<%@ attribute name="customInitMethod"%>
<%@ attribute name="customAddButtonId" required="false"%>
<%@ attribute name="customEditButtonId" required="false"%>
<%@ attribute name="customFormContainerId"%>
<%@ attribute name="customBackButtonId" required="false"%>
<%@ attribute name="customSortColMethod" %>
<%@ attribute name="addValidateMethod" %>
<%@ attribute name="editValidateMethod" %>
<%@ attribute name="gridTitle" required="true"%>
<%@ attribute name="customParam" rtexprvalue="true"%>
<%@ attribute name="fn" rtexprvalue="true" %>
<%@ attribute name="gridWidth" rtexprvalue="true" %>

<script language="javascript" type="text/javascript">
var i = 1;
var lastSelection=0;
$(function()
{
$("#${gridId}grid").jqGrid({
url:'${loadUrl}',
datatype: "json",
jsonReader:{"repeatitems":false,unformat:Unformat_Select},
colNames:${colNames},
colModel:${colModel},
cmTemplate:{sortable:false},
width: eval('${gridWidth}'),
pgbuttons:false,
pginput:false,
viewrecords:false,
pager: '#${gridId}pager',
multiselect:true,
editurl: '${editUrl}',
caption: '${gridTitle}',
//forceFit:true,
hiddengrid:true,
hidegrid:true,
headertitles:true,
loadComplete: function() {
$('#del_${gridId}grid').removeClass('ui-state-disabled');//this is added to enable delete button after record reload
/* if($("#${gridId}grid").getGridParam("records")==0 || $("#${gridId}grid").getGridParam("records")==false)
{
$('#del_${gridId}grid').addClass('ui-state-disabled');
$('#${gridId}grid_iledit').addClass('ui-state-disabled');
}
else
{
$('#del_${gridId}grid').removeClass('ui-state-disabled');
$('#${gridId}grid_iledit').removeClass('ui-state-disabled');
};*/
},
afterInsertRow:function(){//this is added to disable delete button while adding record
$('#del_${gridId}grid').addClass('ui-state-disabled');

/*if($('#del_${gridId}grid').hasClass('ui-state-disabled'))
{

}*/
}
${additonalGridParams}

});

jQuery("#${gridId}grid").jqGrid('navGrid',"#${gridId}pager",{edit:false,add:false,del:true,search:false,refresh:false,pgbuttons:false},
{},{},{${deleteParams}},{});

jQuery("#${gridId}grid").jqGrid('inlineNav',"#${gridId}pager",
{editParams : {aftersavefunc:function()
{
$("#${gridId}grid").jqGrid().trigger("reloadGrid");
$('#del_${gridId}grid').removeClass('ui-state-disabled');//this is added to enable delete button after saveing record
},oneditfunc: function() {
$('#del_${gridId}grid').addClass('ui-state-disabled');//this is added to disable delete button while editing record
},
afterrestorefunc :function() {
$('#del_${gridId}grid').removeClass('ui-state-disabled');//this is added to enable delete button while cancelling record
/*if($("#${gridId}grid").getGridParam("records")==0 || $("#${gridId}grid").getGridParam("records")==false)
{
$('#del_${gridId}grid').addClass('ui-state-disabled');
$('#${gridId}grid_iledit').addClass('ui-state-disabled');
}
else
{
$('#del_${gridId}grid').removeClass('ui-state-disabled');
$('#${gridId}grid_iledit').removeClass('ui-state-disabled');
};*/
}
,extraparam:{
currentApplicationId: function() { return $("#selectApplication option:selected").val(); }
}
},

"restoreAfterSelect":false
});
${customInitMethod}

});
</script>

<div id="${gridId}Container" class="pad7">
<table id="${gridId}grid" ></table>
<div id="${gridId}pager" class="scroll" style="text-align:center;"></div>
</div>

<div id="${gridId}dialog" title="Feature not supported"
style="display:none">
<p>
That feature is not supported.
</p>
</div>

<div id="${gridId}dialogSelectRow" title="Warning" style="display:none">
<p>
Please select row
</p>
</div>

Js file:

function loadSizes(element)
{
//rowId=elem.id.substring(0,elem.id.length-5);
var styleId=$(element).val();
if(styleId!=00 && styleId!="00" && styleId!="" ){
var sizedata = $.ajax({
type: 'GET',
url: 'retrivesizecategorymanufacture',
contentType: "application/json",
data: {"styleId":styleId},
dataType: 'json',
async: false,
cache:false,
success: function(data, result) {
if (!result)
alert('Failure to retrieve the Alert related lookup data.');
}
}).responseText;

var sizeObj = eval('(' + sizedata + ')');
var res = '';
$(sizeObj.result).each(function() {
res += this.productSizeId +
':"' + this.productSizeName + '",';
});
return eval('({' + res + '})');
}
}

 
Junilu Lacar
Bartender
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

I doubt you'll find someone who will take the time to sift through all that. Narrow down the problem and come back with more specific questions. We expect folks to ShowSomeEffort (<--click) before they ask questions; if you're expecting someone to do your work for you, this is not the right place.

Good luck!
 
Dharmendra Yadav
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion.

error is coming while parsing the jsp file.

Error is:
Caused by: org.apache.jasper.JasperException: /WEB-INF/jsp/quicksurvey.jsp(266,1) PWC6297: The function loadSizes cannot be located with the specified prefix

I am using JQGrid in jsp using jsp tag.

this is the tag in which i am calling the javascript function 'loadSizes'
i am highlighting the function here.

<rnd:CustomFormInlineEditableGrid
addUrl="editsurveyppe" sortOrder="desc" gridWidth="gridWidth()"
deleteUrl="editsurveyppe" editUrl="editsurveyppe"
gridId="curruntppeGrid" loadUrl="getcostperformancecurreuntPPE" gridTitle="Current PPE"
sortIndex=""
colModel="[{name:'category',index:'category',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('(' + catList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'manufacturer',index:'manufacturer',align:'center', editable: true, hidden: false, edittype: 'select',
editoptions: { value:eval('(' + manufList + ')'),
dataEvents: [{
type: 'change',
fn:function(e){
loadStyle(e);
}}]},
editrules: {required:false}
},
{name:'style',index:'style',align:'center',editable: true, hidden: false, edittype: 'select',
editoptions: { multiple: false, value: eval('('+styleList+')'),
dataInit: function (elem) {
var v = $(elem).val();
if(v!=''){
var data= loadSizes(elem);
jQuery('#curruntppeGridgrid').setColProp('sizes',{editoptions:{multiple:true,value:data}});
}
}
,
dataEvents: [{
type: 'change',
fn:function(e){
loadCategoryAndManufacturer(e);
}}]

},
editrules: { required: true,custom:true,custom_func:categorycheck}}]"
colNames="['Action','surveyId','applicationId','CategoryId','ManufacturerId','StyleId','UOMId','averagelifetimeselectId','sizesId','vp2Id','gridid',
'recordId','Category','Manufacturer','Style','UOM','Count','Unit','Qty','Cost','Sizes','Annual Cost','VP2']"
>
</rnd:CustomFormInlineEditableGrid>
i have imported the js file in which loadSizes is defined.

In previous post i posted complete jsp file sorry for that, i wanted to attach this file but it was not allowing to upload.

if you need any other information please let me know.

Thanks for you support dude.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic