Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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">
- <h:head>
- <title>Facelet Title</title>
- </h:head>
- <f:event listener="#{productManagedBean.loadProductsPreRender}"
- type="preRenderView">
- </f:event>
- <h:body>
- <h:form>
- <h:outputText value="No products." rendered="#{productManagedBean.products.size()==0}"/>
- <h:dataTable value="#{productManagedBean.products}" var="item" rendered="#{productManagedBean.products.size()>0}">
- <h:column>
- <f:facet name="header">
- <h:outputText value="ID"/>
- </f:facet>
- <h:outputText value="#{item.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="NAME"/>
- </f:facet>
- <h:outputText value="#{item.name}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="CATEGORY"/>
- </f:facet>
- <h:outputText value="#{item.category.name}"/>
- </h:column>
- </h:dataTable>
- <h:commandButton value="Create new product" action="#{productManagedBean.prepareCreateProduct()}"/>
- </h:form>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement