Converted recipe description tab grid

This commit is contained in:
tim holloway 2024-09-21 14:39:35 -04:00
parent 91cefd5002
commit bea1cfa485
2 changed files with 127 additions and 73 deletions

View File

@ -7,7 +7,7 @@
<groupId>com.mousetech.gourmet</groupId>
<artifactId>gourmetj</artifactId>
<version>2.0.23</version>
<version>2.0.28</version>
<packaging>jar</packaging>
<name>GourmetJ</name>

View File

@ -13,80 +13,134 @@
columnClasses="deDescl, deDescr"
>
<f:facet name="header">Description</f:facet>
<p:outputLabel for="@next" value="Title" />
<p:inputText id="rtitle" size="45"
required="true"
placeholder="A recipe title is required."
value="#{recipeDetailBean.recipe.title}"
>
<p:focus />
<f:ajax execute="rtitle" render="editorPanel" />
</p:inputText>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Title" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rtitle" size="45"
required="true"
placeholder="A recipe title is required."
value="#{recipeDetailBean.recipe.title}"
>
<p:focus />
<f:ajax execute="rtitle"
render="editorPanel" />
</p:inputText>
</p:column>
</p:row>
<!-- -->
<p:panel id="catPanel" styleClass="noBorders"
style="display: flex; flex-direction: row; align-items: center;"
>
<p:outputLabel for="rcategory"
value="Category" />
</p:panel>
<p:panel id="catEdit" styleClass="noBorders">
<p:inputText id="rcategory"
label="Category"
value="#{recipeDetailBean.category}"
tip="One or more categories, separated by commas (ex: Entree, Soup)" />
<p:commandButton
value="&lt;- Suggest"
>
<f:ajax execute="rcategory bxCat"
listener="#{recipeDetailBean.ajaxSuggestCategory}"
render="rcategory" />
</p:commandButton>
<p:selectOneMenu id="bxCat"
value="#{recipeDetailBean.catToAdd}"
tip="Recipe category suggestions, based on previous selections"
>
<f:selectItems
value="#{recipeDetailBean.suggestCategory}" />
</p:selectOneMenu>
</p:panel>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Category" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rcategory"
label="Category"
value="#{recipeDetailBean.category}"
tip="One or more categories, separated by commas (ex: Entree, Soup)" />
<p:commandButton
value="&lt;- Suggest"
>
<f:ajax execute="rcategory bxCat"
listener="#{recipeDetailBean.ajaxSuggestCategory}"
render="rcategory" />
</p:commandButton>
<p:selectOneMenu id="bxCat"
value="#{recipeDetailBean.catToAdd}"
tip="Recipe category suggestions, based on previous selections"
>
<f:selectItems
value="#{recipeDetailBean.suggestCategory}" />
</p:selectOneMenu>
</p:column>
</p:row>
<!-- -->
<p:outputLabel for="@next" value="Cuisine" />
<p:autoComplete id="rcuisine"
value="#{recipeDetailBean.recipe.cuisine}"
completeMethod="#{recipeDetailBean.cuisineSuggestions}" />
<p:outputLabel for="@next"
value="Prep Time" />
<p:inputText id="rpreptime" max="10"
value="#{recipeDetailBean.recipe.preptime}"
>
<f:converter
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
</p:inputText>
<p:outputLabel for="@next"
value="Cooking Time" />
<p:inputText id="rcooktime" max="10"
value="#{recipeDetailBean.recipe.cooktime}"
>
<f:converter
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
</p:inputText>
<p:outputLabel for="@next" value="Servings" />
<p:inputText id="rserves" max="10"
value="#{recipeDetailBean.recipe.servings}" />
<p:outputLabel for="@next" value="Rating" />
<p:rating id="rrating" max="10"
value="#{recipeDetailBean.recipe.rating}" />
<p:outputLabel for="@next" value="Source" />
<p:inputText id="rsource" size="45"
value="#{recipeDetailBean.recipe.source}" />
<p:outputLabel for="@next" value="URL" />
<p:inputText id="rurl" size="45"
value="#{recipeDetailBean.recipe.link}" />
<p:outputLabel for="@next"
value="Description" />
<p:inputTextarea id="description"
rows="10" cols="45"
value="#{recipeDetailBean.recipe.description}" />
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Cuisine" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:autoComplete id="rcuisine"
value="#{recipeDetailBean.recipe.cuisine}"
completeMethod="#{recipeDetailBean.cuisineSuggestions}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescr" colspan="3">
<p:outputLabel value="Prep Time" />
<p:inputText id="rpreptime" max="10"
value="#{recipeDetailBean.recipe.preptime}"
>
<f:converter
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
</p:inputText>
</p:column>
</p:row>
<!-- -->
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Cooking Time" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rcooktime" max="10"
value="#{recipeDetailBean.recipe.cooktime}"
>
<f:converter
converterId="com.mousetech.gourmetj.utils.TimeConverter" />
</p:inputText>
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Servings" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rserves" max="10"
value="#{recipeDetailBean.recipe.servings}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Rating" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:rating id="rrating" max="10"
value="#{recipeDetailBean.recipe.rating}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Source" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rsource" size="45"
value="#{recipeDetailBean.recipe.source}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="URL" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rurl" size="45"
value="#{recipeDetailBean.recipe.link}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl" colspan="3">
<p:outputLabel value="Description" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputTextarea id="description"
rows="10" cols="45"
value="#{recipeDetailBean.recipe.description}" />
</p:column>
</p:row>
</p:panelGrid>
<p:panel id="picPanel">
<img id="bigPix"