Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  3.     xmlns:h="http://java.sun.com/jsf/html"
  4.     xmlns:f="http://java.sun.com/jsf/core"
  5.     xmlns:c="http://java.sun.com/jsp/jstl/core"
  6.     xmlns:ice="http://www.icesoft.com/icefaces/component"
  7.     xmlns:icecore="http://www.icefaces.org/icefaces/core"
  8.     xmlns:ace="http://www.icefaces.org/icefaces/components"
  9.     xmlns:ui="http://java.sun.com/jsf/facelets">
  10.  
  11.     <ice:form id="form">
  12.         <ace:dataTable id="peopleList" value="#{peopleModel.people}"
  13.             var="person">
  14.  
  15.             <!-- First column is name -->
  16.             <ace:column id="name" headerText="Name">
  17.                 <h:outputText id="nameCell" value="#{person.name}" />
  18.             </ace:column>
  19.  
  20.             <!--  second column is if I like him/her -->
  21.             <ace:column id="like" headerText="Like">
  22.  
  23.                 <!--  this header contains the input selection for the like filter -->
  24.                 <f:facet name="header">
  25.                     <h:outputText value="Like" />
  26.                     <br />
  27.                     <ice:selectOneMenu value="#{peopleModel.liked}"
  28.                         partialSubmit="true">
  29.                         <f:selectItem value="true" label="only liked" />
  30.                         <f:selectItem value="false" label="only not liked" />
  31.                         <f:selectItem value="" label="doesn't care" />
  32.                     </ice:selectOneMenu>
  33.                 </f:facet>
  34.  
  35.                 <!--  show if person is liked  -->
  36.                 <h:outputText id="likeCell" value="#{person.like}" />
  37.             </ace:column>
  38.         </ace:dataTable>
  39.     </ice:form>
  40.  
  41. </ui:composition>