WebDev Hell
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?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="part"
|
||||
value="#{partsBean.getParts()}" >
|
||||
<f:facet name="header"> <h:outputText value="Parts Table" style="font-size: 1.2em"/></f:facet>
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="pnumber" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="true" value="#{part.pnumber}"/>
|
||||
|
||||
</h:column>
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="pname" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!part.modify}" value="#{part.pname}">
|
||||
<f:validateLength minimum="0" maximum="20" />
|
||||
</h:inputText>
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="color" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!part.modify}" value="#{part.color}">
|
||||
<f:validateLength minimum="0" maximum="20" />
|
||||
</h:inputText>
|
||||
</h:column>
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="city" /></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!part.modify}" value="#{part.city}">
|
||||
<f:validateLength minimum="0" maximum="20" />
|
||||
</h:inputText>
|
||||
</h:column>
|
||||
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="update" /></f:facet>
|
||||
<h:selectBooleanCheckbox onclick="submit()"
|
||||
value="#{part.modify}">
|
||||
</h:selectBooleanCheckbox >
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
<h:commandButton value="Save" action="#{partsBean.saveFromUpdate()}" />
|
||||
</h:form>
|
||||
</h:body>
|
||||
</html>
|
||||
@@ -19,29 +19,34 @@
|
||||
<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}"/>
|
||||
<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>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.birthday}"/>
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.birthday}" validator="dateValidator"/>
|
||||
</h:column>
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header"> <h:outputText value="status" /></f:facet>
|
||||
<f:facet name="header"> <h:outputText value="status"/></f:facet>
|
||||
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.status}"/>
|
||||
<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}"/>
|
||||
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.city}">
|
||||
<f:validateLength minimum="3" maximum="20" />
|
||||
</h:inputText>
|
||||
</h:column>
|
||||
|
||||
|
||||
@@ -51,6 +56,9 @@
|
||||
value="#{supplier.modify}">
|
||||
</h:selectBooleanCheckbox >
|
||||
</h:column>
|
||||
<h:column>
|
||||
<h:commandButton value="Delete" action="#{supplierBean.}"
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
<h:commandButton value="Save" action="#{supplierBean.saveFromUpdate()}" />
|
||||
</h:form>
|
||||
|
||||
Reference in New Issue
Block a user