I hate Java ServerFaces

This commit is contained in:
2023-10-30 13:36:10 -05:00
parent 793435fc23
commit 45656bf9ed
24 changed files with 1015 additions and 3 deletions

View File

@@ -0,0 +1,58 @@
<?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}"/>
</h:column>
<h:column>
<f:facet name="header"> <h:outputText value="birthday" /></f:facet>
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.birthday}"/>
</h:column>
<h:column>
<f:facet name="header"> <h:outputText value="status" /></f:facet>
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.status}"/>
</h:column>
<h:column>
<f:facet name="header"> <h:outputText value="city" /></f:facet>
<h:inputText disabled ="#{!supplier.modify}" value="#{supplier.city}"/>
</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:dataTable>
<h:commandButton value="Save" action="#{supplierBean.saveFromUpdate()}" />
</h:form>
</h:body>
</html>