Modified to look for recipes.db in user's home directory

This commit is contained in:
Tim Holloway 2022-01-05 14:13:13 -05:00
parent 7acedbb6dd
commit dddd36dfd5
3 changed files with 23 additions and 13 deletions

View File

@ -5,7 +5,7 @@ joinfaces.primefaces.theme=bluesky
spring.thymeleaf.enabled=false
server.error.whitelabel.enabled=false
spring.datasource.url=jdbc:sqlite:/home/timh/foo/bazz/recipes.db
spring.datasource.url=jdbc:sqlite:${home}/recipes.db
#spring.datasource.username=dbuser
#pring.datasource.password=dbpass
spring.datasource.driverClassName=org.sqlite.JDBC

View File

@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:sqlite:/home/timh/foo/bazz/recipes.db
url: jdbc:sqlite:${home}/recipes.db
jpa:
hibernate:
ddl-auto: none

View File

@ -259,12 +259,13 @@
</p:column>
<p:column style="width: 13em">
<f:facet name="header">
Ing. Key
Ingredient Key
</f:facet>
<p:inputText id="ingKey"
value="#{item.ingkey}"
size="20"
rendered="#{not item.ingGroup}"
title="Ingredient key selects Shopping Category"
>
<f:ajax
event="change"
@ -273,23 +274,30 @@
/>
</p:inputText>
</p:column>
<p:column>
<p:column
style="width: 2em"
>
<f:facet name="header">
Shop. Cat.
E
</f:facet>
<h:outputText
id="shopCat"
value="#{item.shopCat}"
rendered="#{not item.ingGroup}"
/>
<p:commandButton
id="eShopcat"
value="E"
action="#{recipeDetailBean.ajaxEditShopcat(item)}"
update="editShopcatDlg"
oncomplete="PF('editShopcatDlg').show()"
>
</p:commandButton>
title="Edit the shopping category for ing. key"
/>
</p:column>
<p:column>
<f:facet name="header">
Shopping Cat.
</f:facet>
<h:outputText
id="shopCat"
value="#{item.shopCat}"
rendered="#{not item.ingGroup}"
/>
</p:column>
</p:dataTable>
<h:panelGroup id="pnlIng">
@ -351,7 +359,9 @@
/>
</h:form>
</p:panel>
<p:dialog id="editShopcatDlg" widgetVar="editShopcatDlg">
<p:dialog id="editShopcatDlg"
widgetVar="editShopcatDlg"
>
<ui:include src="editShopcat.xhtml" />
</p:dialog>
</ui:define>