summaryrefslogtreecommitdiffstats
path: root/WebContent/pages/product.xhtml
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-12-13 22:07:46 +0100
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-12-13 23:35:23 +0100
commit5f30a827fc84af1e54f0716a49995e98a044ebd6 (patch)
tree27a68fbd5640c445f549e696af8141aeba6e9769 /WebContent/pages/product.xhtml
parenta14734c965fd7aaf6485bb2bb2a72a68bdb5d14d (diff)
downloadJCatalog-5f30a827fc84af1e54f0716a49995e98a044ebd6.tar.gz
JCatalog-5f30a827fc84af1e54f0716a49995e98a044ebd6.zip
Add editing capabilities
Diffstat (limited to 'WebContent/pages/product.xhtml')
-rw-r--r--WebContent/pages/product.xhtml7
1 files changed, 4 insertions, 3 deletions
diff --git a/WebContent/pages/product.xhtml b/WebContent/pages/product.xhtml
index 84b49f6..d5f3f41 100644
--- a/WebContent/pages/product.xhtml
+++ b/WebContent/pages/product.xhtml
@@ -17,19 +17,20 @@
<h:form>
<div class="row">
<label for="name">Name:</label>
- <span class="formw"><h:inputText id="name" disabled="true" value="#{ProductManager.current.name}" accesskey="n" size="40" /></span>
+ <span class="formw"><h:inputText id="name" disabled="#{not UserManager.loggedIn}" value="#{ProductManager.current.name}" accesskey="n" size="40" /></span>
</div>
<div class="row">
<label for="price">Price:</label>
- <span class="formw"><h:inputText id="price" disabled="true" value="#{ProductManager.current.price}" accesskey="p" size="40" /></span>
+ <span class="formw"><h:inputText id="price" disabled="#{not UserManager.loggedIn}" value="#{ProductManager.current.price}" accesskey="p" size="40" /></span>
</div>
<div class="row">
<label for="description">Description:</label>
- <span class="formw"><h:inputTextarea rows="20" cols="40" id="description" disabled="true" value="#{ProductManager.current.description}" accesskey="d" /></span>
+ <span class="formw"><h:inputTextarea rows="20" cols="40" id="description" disabled="#{not UserManager.loggedIn}" value="#{ProductManager.current.description}" accesskey="d" /></span>
</div>
<div class="row">
<span class="formw">
<h:commandButton action="products" id="back" value="Back" type="submit" accesskey="b" />
+ <h:commandButton action="#{ProductManager.saveCurrentProduct}" rendered="#{UserManager.loggedIn}" disabled="#{not UserManager.loggedIn}" id="save" value="Save" type="submit" accesskey="s" />
</span>
</div>
<div class="spacer" />