Ajax Smajax
This commit is contained in:
		@@ -0,0 +1,40 @@
 | 
			
		||||
<?xml version='1.0' encoding='UTF-8' ?>
 | 
			
		||||
<!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"
 | 
			
		||||
      xmlns:h="jakarta.faces.html"
 | 
			
		||||
      xmlns:f="jakarta.faces.core"
 | 
			
		||||
      xmlns:p="http://primefaces.org/ui">
 | 
			
		||||
    <h:head>
 | 
			
		||||
        <title>Facelet Title</title>
 | 
			
		||||
    </h:head>
 | 
			
		||||
    <h:body>
 | 
			
		||||
        <h:form>
 | 
			
		||||
            <p:growl id="messages" showDetail="true" />
 | 
			
		||||
            <h:dataTable value="#{passengerBean.getPassengers()}" var="currentValue" border="1">
 | 
			
		||||
                <f:facet name="header">
 | 
			
		||||
                    pid
 | 
			
		||||
                </f:facet>
 | 
			
		||||
                <f:facet name="header">
 | 
			
		||||
                    pname
 | 
			
		||||
                </f:facet>
 | 
			
		||||
                <f:facet name="header">
 | 
			
		||||
                    birthday
 | 
			
		||||
                </f:facet>
 | 
			
		||||
                <h:column>
 | 
			
		||||
                    #{currentValue.pid}
 | 
			
		||||
                </h:column>
 | 
			
		||||
                <h:column>
 | 
			
		||||
                    #{currentValue.pname}
 | 
			
		||||
                </h:column>
 | 
			
		||||
                <h:column>
 | 
			
		||||
                    #{currentValue.birthday}
 | 
			
		||||
                </h:column>
 | 
			
		||||
            </h:dataTable>
 | 
			
		||||
            <h:selectOneMenu id="select-birthday" value="#{passengerBean.selectedPassenger}">
 | 
			
		||||
                <f:selectItems value="#{passengerBean.getPassengers()}" />
 | 
			
		||||
            </h:selectOneMenu>
 | 
			
		||||
 | 
			
		||||
            <p:commandButton value="Show Birthday info" action="#{passengerBean.showMessage}" update="messages" />
 | 
			
		||||
        </h:form>
 | 
			
		||||
    </h:body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user