68 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<?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="http://xmlns.jcp.org/jsf/html"
 | 
						|
      xmlns:f="http://xmlns.jcp.org/jsf/core"
 | 
						|
      xmlns:p="http://primefaces.org/ui">
 | 
						|
    <h:head>
 | 
						|
        <title>Facelet Title</title>
 | 
						|
    </h:head>
 | 
						|
    <h:body>
 | 
						|
        <h:form>
 | 
						|
         <p:growl id="globalgrowl" showDetail="false" showSummary="true"  life="2000"/>
 | 
						|
 | 
						|
            <h:dataTable  var="supplier"  
 | 
						|
                          value="#{supplierBean.getSuppliers()}"  >
 | 
						|
            <f:facet name="header"> <h:outputText value="Suppliers Table" style="font-size: 1.2em"/></f:facet>                
 | 
						|
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="snumber" /></f:facet>                
 | 
						|
 | 
						|
                    <h:inputText disabled ="true" value="#{supplier.snumber}"/>
 | 
						|
                        
 | 
						|
                </h:column>
 | 
						|
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="sname" /></f:facet>                
 | 
						|
 | 
						|
                    <h:inputText disabled ="#{!supplier.modify}"  value="#{supplier.sname}">
 | 
						|
                        <f:validateLength minimum="3" maximum="20" />
 | 
						|
                    </h:inputText>
 | 
						|
                </h:column>
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="birthday" /></f:facet>                
 | 
						|
 | 
						|
                    <p:calendar disabled ="#{!supplier.modify}" value="#{supplier.birthday}" pattern="yyy/MM/dd HH:mm:ss"/>
 | 
						|
                    
 | 
						|
                </h:column>
 | 
						|
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="status"/></f:facet>                
 | 
						|
 | 
						|
                    <h:inputText disabled ="#{!supplier.modify}"  value="#{supplier.status}" validator="numericValidator"/>
 | 
						|
                </h:column>
 | 
						|
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="city" /></f:facet>                
 | 
						|
 | 
						|
                    <h:inputText disabled ="#{!supplier.modify}"  value="#{supplier.city}">
 | 
						|
                        <f:validateLength minimum="3" maximum="20" />
 | 
						|
                    </h:inputText>
 | 
						|
                </h:column>  
 | 
						|
 | 
						|
 | 
						|
                <h:column> 
 | 
						|
                    <f:facet name="header"> <h:outputText value="update" /></f:facet>                
 | 
						|
                    <h:selectBooleanCheckbox  onclick="submit()"
 | 
						|
                                              value="#{supplier.modify}">
 | 
						|
                    </h:selectBooleanCheckbox >
 | 
						|
                </h:column>  
 | 
						|
            <h:column>
 | 
						|
                <h:commandButton value="Delete" action="#{supplierBean.deleteRow()}"/>
 | 
						|
            </h:column>
 | 
						|
            </h:dataTable>
 | 
						|
            <h:commandButton value="Save" action="#{supplierBean.saveFromUpdate()}" />
 | 
						|
        </h:form>
 | 
						|
    </h:body>
 | 
						|
</html>
 |