This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | jsonReader : { | |
| root: "rows", | |
| page: "page", | |
| total: "total", | |
| records: "records", | |
| repeatitems: false, | |
| cell: "cell", | |
| id: "id" | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package org.krams.tutorial.dto; | |
| import java.util.List; | |
| /** | |
| * A POJO representing a jQgrid's jsonReader property. | |
| * This is mainly used as a DTO for the presentation layer. | |
| * | |
| * @see <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data">JSON Data</a> | |
| * | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package org.krams.tutorial.controller; | |
| import java.util.List; | |
| import org.krams.tutorial.domain.Event; | |
| import org.krams.tutorial.dto.JqgridTableDto; | |
| import org.krams.tutorial.dto.ResponseDto; | |
| import org.krams.tutorial.service.IEventService; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.cache.annotation.CacheEvict; | |
| import org.springframework.cache.annotation.Cacheable; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
| <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> | |
| <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> | |
| <c:url value="/" var="rootUrl"/> | |
| <c:url value="/resources" var="resourcesUrl"/> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- CSS Imports--> | |
| <link rel="stylesheet" type="text/css" media="screen" href="${resourcesUrl}/css/jquery/dark-hive/jquery-ui-1.8.6.custom.css"/> | |
| <link rel="stylesheet" type="text/css" media="screen" href="${resourcesUrl}/css/datatables/custom.css"/> | |
| <link rel="stylesheet" type="text/css" media="screen" href="${resourcesUrl}/css/main/main.css"/> | |
| <!-- JS Imports --> | |
| <script type="text/javascript" src="${resourcesUrl}/js/jquery/jquery-1.5.2.min.js"></script> | |
| <script type="text/javascript" src="${resourcesUrl}/js/jquery/jquery-ui-1.8.12.custom.min.js"></script> | |
| <script type="text/javascript" src="${resourcesUrl}/js/datejs/date.js"></script> | |
| <script type="text/javascript" src="${resourcesUrl}/js/datatables/jquery.dataTables.min.js"></script> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <h3 class="title">Events - DataTables Version</h3> | |
| <table id='eventTable'> | |
| <thead> | |
| <tr> | |
| <th></th> | |
| <th>Id</th> | |
| <th>Name</th> | |
| <th>Description</th> | |
| <th>Participants</th> | |
| <th>Date</th> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <jsp:include page="/WEB-INF/jsp/dialogs/addDialog.jsp"/> | |
| <jsp:include page="/WEB-INF/jsp/dialogs/editDialog.jsp"/> | |
| <jsp:include page="/WEB-INF/jsp/dialogs/deleteDialog.jsp"/> | |
| <jsp:include page="/WEB-INF/jsp/dialogs/genericDialog.jsp"/> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(function() { | |
| // Convert links to buttons | |
| $('#addLink, #editLink, #deleteLink').button(); | |
| ... | |
| ... | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(function() { | |
| ... | |
| ... | |
| // Assign a function to addLink | |
| // Displays a dialog form for adding a new record | |
| $("#addLink").click(function() { | |
| // Show the dialog | |
| $( "#addDialog" ).dialog({ | |
| modal: true, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(function() { | |
| ... | |
| ... | |
| // Retrieve all records for the first time | |
| // Converts table to DataTable as well | |
| $.getRecords('#eventTable', '${rootUrl}event/getall', | |
| ['id', 'name', 'description', 'participants', 'date'], | |
| function() { | |
| $('#eventTable').dataTable( { |