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.
66 lines
2.4 KiB
66 lines
2.4 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:inputText id="searchFor" focus="true"
|
|
placeholder="Recipe title (todo) cuisine, etc."
|
|
value="#{adminMainBean.searchText}"
|
|
/>
|
|
<p:button id="find" label="Find"
|
|
defaultCommand="true"
|
|
action="#{adminMainBean.doFind}"
|
|
>
|
|
</p:button>
|
|
<p:button label="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">
|
|
<image width="64" height="64"
|
|
value="/gourmetj/img/thumb/#{row.id}"
|
|
/>
|
|
</p:column>
|
|
<p:column headerText="Recipe">
|
|
<h:commandLink action="#{adminMainBean.showRecipe}"
|
|
label="#{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>
|
|
|