Delete image

This commit is contained in:
Tim Holloway 2022-01-01 21:24:35 -05:00
parent e15ad6dc62
commit 7ba345413d

View File

@ -24,7 +24,7 @@
text-align: left;
}
</style>
<h:messages id="messages"/>
<h:messages id="messages" />
<p:panel id="editorPanel"
header="#{recipeDetailBean.recipe.title}"
>
@ -99,7 +99,8 @@
value="Description"
/>
<p:inputTextarea id="description"
rows="10" cols="30" escape="false"
rows="10" cols="30"
escape="false"
value="#{recipeDetailBean.recipe.description}"
/>
<p:panel id="picPanel">
@ -110,21 +111,21 @@
<p:fileUpload id="ctlUpload"
label="Upload Image"
fileUploadListener="#{recipeDetailBean.ajaxUploadImage}"
global="true"
mode="advanced" multiple="false"
global="true" mode="advanced"
multiple="false"
update=":messages picPanel"
auto="true" sizeLimit="1000000"
allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
/>
<p:button id="ctlDelImg"
<p:commandButton id="ctlDelImg"
value="Delete Image"
>
<!-- <f:ajax
listener="recipeDetailBean.ajaxDeleteImage"
execute="ctlDelImg"
immediate="true" render="picture"
/> -->
</p:button>
<f:ajax
listener="#{recipeDetailBean.ajaxDeleteImage}"
render="picPanel"
immediate="true"
/>
</p:commandButton>
</p:panelGrid>
</p:tab>
<p:tab id="ingredientsTab"