summaryrefslogtreecommitdiffstats
path: root/WebContent/pages/product.xhtml
diff options
context:
space:
mode:
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" />