2
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <html>
    <head>
    <!-- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -->
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
    <title>Validation Process</title>
    <link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/css/style1.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}js/jquery-1.4.3.min.js"></script>
    <!-- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> -->
    <script src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery-ui.js"></script>
    
    <script type="text/javascript">
        $(document).ready(function() {
             function refreshDiv(){
                    
                    if ($("#isComplete").val() == 'false'){
                        
                         $("#validationSetBody").empty();
                         
                         $.ajax({
                            url : 'Controller?actionName=validationStatus&validtionSetId= '+ $("#validationSetId").val() ,
                            cache : false,
                              type: 'post',
                              success :function(result){
                                
                                 $("#validationSetBody").html(result.data);
                                     $("#isComplete").val(result.status);
                                     if(result.status == 'true'){
                                         $("#message").text("Message returned from SP " + result.message);
                                     }
                                window.setTimeout(refreshDiv, 5000);
                              } 
                          });  
                    }
                };
             window.setTimeout(refreshDiv, 5000);
        }); 
    </script>
    </head>
    
    <body style="border-color: #FF00FF">
        <div id="outer">
            <jsp:include page="/WEB-INF/jsp/header.jsp"></jsp:include>
            <div id="nav">
                <jsp:include page="/menu.jsp"/>
            </div>
            <div id="main">
            
                <form method="POST" action="Controller?actionName=''">
                <!--  <input type="hidden" id="validation" name="validation" value="" /> -->
                <input type="hidden" id="validationSetId" name="validationSetId" value="<%=session.getAttribute("validationSetId")%>">
                <input type="hidden" id="isComplete" name="isComplete" value="<%=session.getAttribute("isComplete")%>">
                    <h3>Running Validation..</h3>
                    <table id="validationTable" border='1'>
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Description</th>
                                <th>Message</th>
                                <th>Status</th>
                            </tr>
                        </thead>
                        <tbody id="validationSetBody">
                            <c:forEach var="data" items="${checkedList}" varStatus="Srno">
                                <tr>
                                    <td id="name_${Srno.count}">${data.name}</td>
                                    <td id="description_${Srno.count}">${data.description}</td>
                                    <td id="message_${Srno.count}">${data.message}</td>
                                    <td id="status_${Srno.count}">${data.status}
                                        <img src="${pageContext.request.contextPath}/images/${data.status}.gif">
                                    </td>
                                </tr>
                            </c:forEach>
                            <c:if test="${empty checkedList}">
                                <tr>
                                    <td colspan="7">No Records Found</td>
                                </tr>
                            </c:if>
                            <tr>
    <!--                            <td id="message"></td> -->
                                <p id="message"></p>
                             </tr>
                        </tbody>
                    </table>
                </form>
            </div>
            <jsp:include page="/WEB-INF/jsp/footer.jsp"></jsp:include>
        </div>
    </body>
    
    </html>

Note : I m getting success result of ajax as bean how to retrive the bean value in ajax success i have attached the result returned as bean in the image attached below. I want to bind the data from the bean to the #validationSetBody and so on...enter image description here

Community
  • 1
  • 1
Chag Vaibhav P
  • 93
  • 1
  • 2
  • 12
  • Hey BalusC i dont find this kind of question anywhere that's y i have asked this question can u plz post the link over here for the similar kind of question...! – Chag Vaibhav P Aug 19 '15 at 05:43

0 Answers0