Advertisement
Guest User

Untitled

a guest
Apr 24th, 2012
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.99 KB | None | 0 0
  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
  4. xmlns:h="http://java.sun.com/jsf/html"
  5. xmlns:f="http://java.sun.com/jsf/core"
  6. xmlns:ui="http://java.sun.com/jsf/facelets">
  7. <h:head>
  8. <ui:insert name="header">
  9. <ui:include src="header.xhtml"/>
  10. </ui:insert>
  11. <script type="text/javascript" src="resources/js/jquery-1.7.2.min.js"></script>
  12. </h:head>
  13. <h:body>
  14.  
  15. <h1><img src="resources/css/images/icon.png" alt="DX-57" /> History Center</h1>
  16. <!-- layer for black background of the buttons -->
  17. <div id="toolbar" style="margin: 0 auto; width:1180px; height:30px; position:relative; background-color:black">
  18. <!-- Include page Navigation -->
  19. <ui:insert name="Navigation">
  20. <ui:include src="Navigation.xhtml"/>
  21. </ui:insert>
  22.  
  23. </div>
  24.  
  25. <div id="logodiv" style="position:relative; top:35px; left:0px;">
  26. <h:graphicImage alt="Dashboard" style="position:relative; top:-20px; left:9px;" value="resources/images/logo_sessions.png" />
  27. </div>
  28. <div id="main" style="margin: 0 auto; width:1190px; height:700px; position:absolute; background-color:transparent; top:105px">
  29.  
  30. <div id="mainpage" style="margin: 0 auto; width:1190px; height:500px; position:absolute; background-color:transparent; top:80px">
  31.  
  32. <div id="settingsHashMap" style="width:750px; height:400px; position:absolute; background-color:r; top:20px; left:1px">
  33.  
  34. <h:form id="form">
  35.  
  36.  
  37. <!-- The sortable data table -->
  38. <h:dataTable id="dataTable" value="#{SessionsController.dataList}" binding="#{table}" var="item">
  39. <!-- Check box -->
  40. <h:column>
  41. <f:facet name="header">
  42. <h:outputText value="Select" />
  43. </f:facet>
  44. <h:selectBooleanCheckbox onclick="highlight(this)" value="#{SessionsController.selectedIds[dataItem.id]}" />
  45. </h:column>
  46. <!-- row count -->
  47. <h:column>
  48. <f:facet name="header">
  49. <h:commandLink value="No" actionListener="#{SessionsController.sort}">
  50. <f:attribute name="No" value="No" />
  51. </h:commandLink>
  52. </f:facet>
  53. <h:outputText value="#{table.rowIndex + SessionsController.firstRow + 1}" />
  54. </h:column>
  55. <h:column>
  56. <f:facet name="header">
  57. <h:commandLink value="Account Session ID" actionListener="#{SessionsController.sort}">
  58. <f:attribute name="sortField" value="Account Session ID" />
  59. </h:commandLink>
  60. </f:facet>
  61. <h:outputText value="#{item.aSessionID}" />
  62. </h:column>
  63. <h:column>
  64. <f:facet name="header">
  65. <h:commandLink value="User ID" actionListener="#{SessionsController.sort}">
  66. <f:attribute name="sortField" value="User ID" />
  67. </h:commandLink>
  68. </f:facet>
  69. <h:outputText value="#{item.userID}" />
  70. </h:column>
  71. <h:column>
  72. <f:facet name="header">
  73. <h:commandLink value="Activity Start Time" actionListener="#{SessionsController.sort}">
  74. <f:attribute name="sortField" value="Activity Start Time" />
  75. </h:commandLink>
  76. </f:facet>
  77. <h:outputText value="#{item.activityStart}" />
  78. </h:column>
  79. <h:column>
  80. <f:facet name="header">
  81. <h:commandLink value="Activity End Time" actionListener="#{SessionsController.sort}">
  82. <f:attribute name="sortField" value="Activity End Time" />
  83. </h:commandLink>
  84. </f:facet>
  85. <h:outputText value="#{item.activityEnd}" />
  86. </h:column>
  87. <h:column>
  88. <f:facet name="header">
  89. <h:commandLink value="Activity" actionListener="#{SessionsController.sort}">
  90. <f:attribute name="sortField" value="Activity" />
  91. </h:commandLink>
  92. </f:facet>
  93. <h:outputText value="#{item.activity}" />
  94. </h:column>
  95. </h:dataTable>
  96.  
  97. <f:verbatim><br/><hr /><br/></f:verbatim>
  98.  
  99.  
  100. <table>
  101. <tr>
  102. <td>№</td>
  103. <td>Select</td>
  104. <td>Account Session ID</td>
  105. <td>User ID</td>
  106. <td>Activity Start Time</td>
  107. <td>Activity End Time</td>
  108. <td>Activity</td>
  109. </tr>
  110.  
  111. <ui:repeat value="#{SessionsController.dataList}" var="i" varStatus="status">
  112. <tr>
  113. <td>#{status.index + 1 + i.firstRow}</td>
  114. <td><h:selectBooleanCheckbox value="#{i.selected}" /></td>
  115. <td><h:outputText value="#{i.aSessionID}" /></td>
  116. <td><h:outputText value="#{i.userID}" /></td>
  117. <td><h:outputText value="#{i.activityStart}" /></td>
  118. <td><h:outputText value="#{i.activityEnd}" /></td>
  119. <td><h:outputText value="#{i.activity}" /></td>
  120. </tr>
  121. </ui:repeat>
  122. </table>
  123. <!-- The paging buttons -->
  124. <h:commandButton value="first" action="#{SessionsController.pageFirst}"
  125. disabled="#{SessionsController.firstRow == 0}" />
  126. <h:commandButton value="prev" action="#{SessionsController.pagePrevious}"
  127. disabled="#{SessionsController.firstRow == 0}" />
  128. <h:commandButton value="next" action="#{SessionsController.pageNext}"
  129. disabled="#{SessionsController.firstRow + SessionsController.rowsPerPage >= SessionsController.totalRows}" />
  130. <h:commandButton value="last" action="#{SessionsController.pageLast}"
  131. disabled="#{SessionsController.firstRow + SessionsController.rowsPerPage >= SessionsController.totalRows}" />
  132. <h:outputText value="Page #{SessionsController.currentPage} / #{SessionsController.totalPages}" />
  133. <br />
  134.  
  135. <!-- The paging links -->
  136. <ui:repeat value="#{SessionsController.pages}" var="page">
  137. <h:commandLink value="#{page}" actionListener="#{SessionsController.page}"
  138. rendered="#{page != SessionsController.currentPage}" />
  139. <h:outputText value="#{page}" escape="false"
  140. rendered="#{page == SessionsController.currentPage}" />
  141. </ui:repeat>
  142. <br />
  143.  
  144. <!-- Set rows per page -->
  145. <h:outputLabel for="rowsPerPage" value="Rows per page" />
  146. <h:inputText id="rowsPerPage" value="#{SessionsController.rowsPerPage}" size="3" maxlength="3" />
  147. <h:commandButton value="Set" action="#{SessionsController.pageFirst}" />
  148. <h:message for="rowsPerPage" errorStyle="color: red;" />
  149.  
  150. </h:form>
  151.  
  152. </div>
  153.  
  154. <div id="settingsdivb" style="width:350px; height:400px; position:absolute; background-color:transparent; top:20px; left:800px">
  155.  
  156. </div>
  157. </div>
  158. </div>
  159.  
  160. <script type="text/javascript">
  161. $("tr").not(':first').hover(
  162. function () {
  163. $(this).css("background","#707070");
  164. },
  165. function () {
  166. $(this).css("background","");
  167. }
  168. );
  169.  
  170. function highlight(param) {
  171. var row = jQuery(param).parent().parent().children();
  172. row.toggleClass('highlited');
  173. }
  174. </script>
  175.  
  176. </h:body>
  177. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement