Web implementation of the Gourmet Recipe Manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

69 lines
2.5 KiB

<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/layout/layout.xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
>
<ui:define name="title">Gourmet Recipe Manager</ui:define>
<ui:define name="content">
<h:form id="form1">
<p:panelGrid label="Find a Recipe" columns="1">
<p:panelGrid columns="3">
<p:focus for="@next"/>
<p:inputText id="searchFor"
placeholder="Recipe title (todo) cuisine, etc."
styleClass="redBox"
accesskey="f"
value="#{adminMainBean.searchText}"
/>
<p:button id="find" value="Find"
defaultCommand="true"
action="#{adminMainBean.doFind}"
>
</p:button>
<p:button value="New Recipe"
action="#{adminMainBean.doNewRecipe}"
>
</p:button>
</p:panelGrid>
</p:panelGrid>
</h:form>
<p:dataTable id="table1" rows="30"
value="#{adminMainBean.searchResults}" var="row"
>
<p:column headerText="Icon">
<img height="40"
src="/img/thumb/#{row.id}"
/>
</p:column>
<p:column headerText="Recipe" style="width: 600px">
<h:commandLink action="#{adminMainBean.showRecipe}"
value="#{row.title}"
/>
</p:column>
<p:column headerText="Category">
<h:outputText
value="#{adminMainBean.formatCategories(row)}"
/>
</p:column>
<p:column headerText="Cuisine">
<h:outputText value="#{row.cuisine}" />
</p:column>
<p:column headerText="Rating">
<p:rating value="#{row.rating}" readonly="true" />
</p:column>
<p:column headerText="Source">
<h:outputText value="#{row.source}" />
</p:column>
<p:column headerText="Prep Time">
<h:outputText
value="#{adminMainBean.formatPreptime(row.preptime)}"
/>
</p:column>
</p:dataTable>
</ui:define>
</ui:composition>