Commit a12193d8 by Antti Tönkyrä

rousk

1 parent 5a281a03
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:products="http://java.sun.com/jsf/composite/cditools/products" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:c="http://java.sun.com/jsp/jstl/core"> xmlns:products="http://java.sun.com/jsf/composite/cditools/products" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui">
<h:body> <h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml"> <ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata> <f:metadata>
<f:event type="preRenderView" listener="#{foodWaveView.initEditTemplate()}" /> <f:event type="preRenderView" listener="#{foodWaveView.initEditTemplate()}" />
<f:viewParam name="id" value="#{userView.templateId}" /> <f:viewParam name="id" value="#{foodWaveView.templateId}" />
</f:metadata> </f:metadata>
<ui:define name="title"> <ui:define name="title">
...@@ -17,18 +16,24 @@ ...@@ -17,18 +16,24 @@
<ui:define name="content"> <ui:define name="content">
<h:form> <h:form>
<h:panelGrid columns="3"> <p:panel header="#{i18n['foodwavetemplate.edit']}">
<h:outputLabel for="name" value="#{i18n['foodwavetemplate.name']}" /> <h:panelGrid columns="3">
<h:inputText id="name" value="#{foodWaveView.template.name}" /> <h:outputLabel for="name" value="#{i18n['foodwavetemplate.name']}" />
<h:message for="name" /> <h:inputText id="name" value="#{foodWaveView.template.name}" />
</h:panelGrid> <h:message for="name" />
<div>
<h:inputTextarea value="#{foodWaveView.template.description}" /> <h:outputLabel for="desc" value="#{i18n['foodwavetemplate.description']}" />
</div> <h:inputText id="desc" value="#{foodWaveView.template.description}" />
<h:commandButton action="#{foodWaveView.saveTemplate()}" value="#{i18n['foowavetemplate.save']}" /> <h:message for="desc" />
<h:commandButton action="#{foodWaveView.createFoodwave()}" value="#{i18n['foodwavetemplate.createFoodwave']}" />
<h:outputText value=" " />
<h:commandButton action="#{foodWaveView.saveTemplate()}" value="#{i18n['foodwavetemplate.save']}" />
</h:panelGrid>
</p:panel>
<p:panel header="#{i18n['foodwavetemplate.createwave']}">
<p:calendar value="#{foodWaveView.startDate}" pattern="dd.MM.yyyy HH:mm" />
<h:commandButton action="#{foodWaveView.createFoodwave()}" value="#{i18n['foodwavetemplate.createFoodwave']}" />
</p:panel>
</h:form> </h:form>
<ui:fragment> <ui:fragment>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<h:outputText value="#{templ.name}" /> <h:outputText value="#{templ.name}" />
</h:column> </h:column>
<h:column> <h:column>
<h:link outcome="/foodadmin/editTemplate"> <h:link value="LOL" outcome="/foodadmin/editTemplate">
<f:param value="#{templ.id}" /> <f:param value="#{templ.id}" />
</h:link> </h:link>
</h:column> </h:column>
......
package fi.insomnia.bortal.web.cdiview.shop; package fi.insomnia.bortal.web.cdiview.shop;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.Vector; import java.util.Vector;
...@@ -40,6 +41,8 @@ public class FoodWaveView extends GenericCDIView { ...@@ -40,6 +41,8 @@ public class FoodWaveView extends GenericCDIView {
private FoodWave selectedFoodWave = null; private FoodWave selectedFoodWave = null;
private Date startDate;
private Product currentProduct; private Product currentProduct;
public void initTemplateList() { public void initTemplateList() {
...@@ -181,4 +184,12 @@ public class FoodWaveView extends GenericCDIView { ...@@ -181,4 +184,12 @@ public class FoodWaveView extends GenericCDIView {
template.getProducts().remove(product); template.getProducts().remove(product);
} }
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!