Commit a12193d8 by Antti Tönkyrä

rousk

1 parent 5a281a03
......@@ -2,13 +2,12 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"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"
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>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:event type="preRenderView" listener="#{foodWaveView.initEditTemplate()}" />
<f:viewParam name="id" value="#{userView.templateId}" />
<f:viewParam name="id" value="#{foodWaveView.templateId}" />
</f:metadata>
<ui:define name="title">
......@@ -17,18 +16,24 @@
<ui:define name="content">
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="name" value="#{i18n['foodwavetemplate.name']}" />
<h:inputText id="name" value="#{foodWaveView.template.name}" />
<h:message for="name" />
</h:panelGrid>
<div>
<h:inputTextarea value="#{foodWaveView.template.description}" />
</div>
<h:commandButton action="#{foodWaveView.saveTemplate()}" value="#{i18n['foowavetemplate.save']}" />
<h:commandButton action="#{foodWaveView.createFoodwave()}" value="#{i18n['foodwavetemplate.createFoodwave']}" />
<p:panel header="#{i18n['foodwavetemplate.edit']}">
<h:panelGrid columns="3">
<h:outputLabel for="name" value="#{i18n['foodwavetemplate.name']}" />
<h:inputText id="name" value="#{foodWaveView.template.name}" />
<h:message for="name" />
<h:outputLabel for="desc" value="#{i18n['foodwavetemplate.description']}" />
<h:inputText id="desc" value="#{foodWaveView.template.description}" />
<h:message for="desc" />
<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>
<ui:fragment>
......
......@@ -24,7 +24,7 @@
<h:outputText value="#{templ.name}" />
</h:column>
<h:column>
<h:link outcome="/foodadmin/editTemplate">
<h:link value="LOL" outcome="/foodadmin/editTemplate">
<f:param value="#{templ.id}" />
</h:link>
</h:column>
......
package fi.insomnia.bortal.web.cdiview.shop;
import java.util.ArrayList;
import java.util.Date;
import java.util.TreeSet;
import java.util.Vector;
......@@ -40,6 +41,8 @@ public class FoodWaveView extends GenericCDIView {
private FoodWave selectedFoodWave = null;
private Date startDate;
private Product currentProduct;
public void initTemplateList() {
......@@ -181,4 +184,12 @@ public class FoodWaveView extends GenericCDIView {
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!