Cleaned up POM, views

This commit is contained in:
tim holloway 2024-02-17 13:39:52 -05:00
parent a4e70a0739
commit 34645fc8da
7 changed files with 24 additions and 46 deletions

32
pom.xml
View File

@ -7,7 +7,7 @@
<groupId>com.mousetech.gourmet</groupId>
<artifactId>gourmetj</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>
<packaging>jar</packaging>
<name>GourmetJ</name>
@ -84,10 +84,6 @@
<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>
@ -96,14 +92,6 @@
<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>
@ -129,21 +117,11 @@
<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 -->
@ -158,7 +136,6 @@
</dependency>
<!--
https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-webp -->
<!-- In Core??? -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
@ -166,7 +143,6 @@
<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>
@ -184,12 +160,6 @@
<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

@ -721,7 +721,7 @@ public class RecipeDetailBean implements Serializable {
if (recipeService.save(this.getRecipe())) {
userSession.setRecipe(null);
return "recipeDetails";
return "recipeDetails?faces-redirect=true";
} else {
JSFUtils.addErrorMessage("Save recipe failed");
return null;

View File

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

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,28 +372,34 @@
>
<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"
action="recipePrint.jsf?faces-redirect=true"
styleClass="ui-button-print"
immediate="true"
/>

View File

@ -50,7 +50,7 @@
/>
</p:panelGrid>
<!-- -->
<p:panelGrid id="ingredientsc">
<p:panelGrid id="ingredientsc" columns="1">
<f:facet name="header">
<h:outputText styleClass="subtitle"
value="Ingredients"
@ -61,6 +61,7 @@
showDirectLinksArrows="true"
value="#{recipeDetailBean.ingredients}"
var="ingredient"
style="width: 100%"
>
<p:column
style="text-align: right; width: 2em"
@ -100,9 +101,7 @@
</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"
@ -126,6 +125,9 @@
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: 40em"
style="width: 60em"
value="#{shoppingListBean.recipeList}"
var="item"
>
@ -87,7 +87,7 @@
>
<p:dataTable id="tblShopIngredients"
value="#{shoppingListBean.ingredientList}"
style="width: 40em;"
style="width: 60em;"
sortBy="#{item.shopCat}" var="item"
>
<f:facet name="header">