Compare commits

..

No commits in common. "e7f373f6630862208422642ea06f5ed91f6e83a8" and "a4e70a0739ff58f625f44ca6fae291af189f081e" have entirely different histories.

7 changed files with 49 additions and 27 deletions

32
pom.xml
View File

@ -7,7 +7,7 @@
<groupId>com.mousetech.gourmet</groupId>
<artifactId>gourmetj</artifactId>
<version>0.2.7</version>
<version>0.2.5</version>
<packaging>jar</packaging>
<name>GourmetJ</name>
@ -84,6 +84,10 @@
<artifactId>gson</artifactId>
<scope>runtime</scope>
</dependency>
<!-- <dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
@ -92,6 +96,14 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
https://mvnrepository.com/artifact/jakarta.persistence/jakarta.persistence-api -->
<!-- <dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>-->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
@ -117,11 +129,21 @@
<scope>provided</scope>
</dependency>
<!-- <dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
-->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<!-- <dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
</dependency>
-->
<!--
https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core -->
@ -136,6 +158,7 @@
</dependency>
<!--
https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-webp -->
<!-- In Core??? -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
@ -143,6 +166,7 @@
<scope>compile</scope>
</dependency>
<!-- Needed only if you deploy ImageIO plugins as part of a web app.
Make sure you add the IIOProviderContextListener to your web.xml.
-->
<dependency>
<groupId>com.twelvemonkeys.servlet</groupId>
@ -160,6 +184,12 @@
<version>8.0.30</version>
</dependency>
<!-- <dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
<version>${com.sun.faces.version}</version>
</dependency>-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>

View File

@ -206,8 +206,8 @@ public class RecipeDetailBean implements Serializable {
/**
* After construction and injection, we obtain the recipe ID
* passed to us, if any, and load the recipe. It's also stored
* in @see UserSession for the detail editor.
* passed to us, if any and load the recipe. It's also stored
* in @see UserSession for the detail editor and
*
* @see PictureController.
*/
@ -720,8 +720,8 @@ public class RecipeDetailBean implements Serializable {
}
if (recipeService.save(this.getRecipe())) {
////////////userSession.setRecipe(null);
return "recipeDetails?faces-redirect=true";
userSession.setRecipe(null);
return "recipeDetails";
} else {
JSFUtils.addErrorMessage("Save recipe failed");
return null;

View File

@ -136,6 +136,6 @@ public class SpringSecurityConfig {
"/recipeDetails.jsf",
"/recipeDetails.xhtml",
"/shoppingList.jsf",
"/recipePrint.xhtml");
"/recipePrint.jsf");
}
}

View File

@ -62,12 +62,12 @@
<p:outputLabel for="@next"
value="Title"
/>
<p:focus/>
<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"
/>
@ -372,34 +372,28 @@
>
<p:panel header="Instructions">
<div id="insection">
<p:focus/>
<h:inputTextarea
id="ctlInstructions"
rows="30" cols="120"
escape="false"
value="#{recipeDetailBean.recipe.instructions}"
>
<p:focus />
</h:inputTextarea>
/>
</div>
</p:panel>
</p:tab>
<p:tab id="notesTab" title="Notes">
<p:panel header="Notes">
<p:focus/>
<h:inputTextarea id="ctlNotes"
rows="30" cols="120"
escape="false"
value="#{recipeDetailBean.recipe.modifications}"
>
<p:focus/>
</h:inputTextarea>
/>
</p:panel>
</p:tab>
</p:tabView>
<p:commandButton id="doSave" value="Save"
icon="ui-icon-pencil" ajax="false"
disabled="{not recipeDetailBean.dirty}"
action="#{recipeDetailBean.doSave}"
/>
<p:commandButton id="doSave" value="Save" icon="ui-icon-pencil" ajax="false" disabled="{not recipeDetailBean.dirty}" action="#{recipeDetailBean.doSave}" />
<p:commandButton id="doCancel" value="Cancel"
ajax="false" immediate="true"
action="recipeDetails.jsf"

View File

@ -54,7 +54,7 @@
<p:commandButton ajax="false"
value="Print"
icon="ui-icon-print"
action="recipePrint.jsf?faces-redirect=true"
action="recipePrint.jsf"
styleClass="ui-button-print"
immediate="true"
/>

View File

@ -50,7 +50,7 @@
/>
</p:panelGrid>
<!-- -->
<p:panelGrid id="ingredientsc" columns="1">
<p:panelGrid id="ingredientsc">
<f:facet name="header">
<h:outputText styleClass="subtitle"
value="Ingredients"
@ -61,7 +61,6 @@
showDirectLinksArrows="true"
value="#{recipeDetailBean.ingredients}"
var="ingredient"
style="width: 100%"
>
<p:column
style="text-align: right; width: 2em"
@ -101,7 +100,9 @@
</p:dataTable>
</p:column>
</p:panelGrid>
<!-- -->
<h:outputText
value="Recipe ID: #{recipeDetailBean.recipe.id}"
/>
<p:panelGrid columns="1" style="width: 100%">
<f:facet name="header">
<h:outputText styleClass="subtitle"
@ -125,9 +126,6 @@
value="#{recipeDetailBean.modifications}"
/>
</p:panelGrid>
<h:outputText
value="Recipe ID: #{recipeDetailBean.recipe.id}"
/>
</h:form>
</ui:define>
</ui:composition>

View File

@ -42,7 +42,7 @@
<p:tab id="overviewTab" title="Shopping List">
<h:form id="form1">
<p:dataTable id="tblRecipes"
style="width: 60em"
style="width: 40em"
value="#{shoppingListBean.recipeList}"
var="item"
>
@ -87,7 +87,7 @@
>
<p:dataTable id="tblShopIngredients"
value="#{shoppingListBean.ingredientList}"
style="width: 60em;"
style="width: 40em;"
sortBy="#{item.shopCat}" var="item"
>
<f:facet name="header">