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.
 
 
 
 

67 lines
2.6 KiB

<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/layout/layout.xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:tc="http://myfaces.apache.org/tobago/component"
>
<ui:define name="title">Gourmet Recipe Manager</ui:define>
<ui:define name="content">
<tc:messages />
<tc:form id="form1">
<tc:section label="Find a Recipe" level="2">
<tc:gridLayout id="gfinder"
columns="60em auto auto"
>
<tc:in id="searchFor" focus="true"
placeholder="Recipe title (todo) cuisine, etc."
value="#{adminMainBean.searchText}"
/>
<tc:button id="find" label="Find"
defaultCommand="true"
action="#{adminMainBean.doFind}"
>
<tc:style minWidth="58px" height="40px" />
</tc:button>
<tc:button label="New Recipe"
action="#{adminMainBean.doNewRecipe}"
>
<tc:style minWidth="58px" height="40px" />
</tc:button>
</tc:gridLayout>
</tc:section>
</tc:form>
<tc:sheet id="table1" rows="30"
value="#{adminMainBean.searchResults}" var="row"
>
<tc:column label="Icon">
<tc:image width="64" height="64"
value="/gourmetj/img/thumb/#{row.id}"
/>
</tc:column>
<tc:column label="Recipe">
<tc:link action="#{adminMainBean.showRecipe}"
label="#{row.title}"
/>
</tc:column>
<tc:column label="Category">
<tc:out
value="#{adminMainBean.formatCategories(row)}"
/>
</tc:column>
<tc:column label="Cuisine">
<tc:out value="#{row.cuisine}" />
</tc:column>
<tc:column label="Rating">
<tc:stars value="#{row.rating}" readonly="true" />
</tc:column>
<tc:column label="Source">
<tc:out value="#{row.source}" />
</tc:column>
<tc:column label="Prep Time">
<tc:out
value="#{adminMainBean.formatPreptime(row.preptime)}"
/>
</tc:column>
</tc:sheet>
</ui:define>
</ui:composition>