Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2614d907
authored
Oct 26, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create list edit templates
1 parent
00cde394
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
148 deletions
code/LanBortalWeb/WebContent/foodadmin/createTemplate.xhtml
code/LanBortalWeb/WebContent/foodadmin/editTemplate.xhtml
code/LanBortalWeb/WebContent/foodadmin/listTemplates.xhtml
code/LanBortalWeb/WebContent/foodadmin/createTemplate.xhtml
View file @
2614d90
...
@@ -23,101 +23,102 @@
...
@@ -23,101 +23,102 @@
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:form>
<h:form>
<p:wizard>
<!-- <p:wizard>
<p:tab
id=
"basicinfo"
title=
"#{i18n['foodwavetemplate.basicinfo']}"
>
<p:tab id="basicinfo" title="#{i18n['foodwavetemplate.basicinfo']}"> -->
<h:panelGrid
columns=
"3"
>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"name"
<h:outputLabel
for=
"name"
value=
"#{i18n['foodwavetemplate.name']}"
/>
value=
"#{i18n['foodwavetemplate.name']}"
/>
<h:inputText
id=
"name"
value=
"#{foodWaveView.template.name}"
<h:inputText
id=
"name"
value=
"#{foodWaveView.template.name}"
required=
"true"
requiredMessage=
"Name required"
/>
required=
"true"
requiredMessage=
"Name required"
/>
<h:message
for=
"name"
/>
<h:message
for=
"name"
/>
<h:outputLabel
for=
"description"
<h:outputLabel
for=
"description"
value=
"#{i18n['foodwavetemplate.description']}"
/>
value=
"#{i18n['foodwavetemplate.description']}"
/>
<h:inputText
id=
"description"
<h:inputText
id=
"description"
value=
"#{foodWaveView.template.description}"
required=
"true"
value=
"#{foodWaveView.template.description}"
required=
"true"
requiredMessage=
"Description required"
/>
requiredMessage=
"Description required"
/>
<h:message
for=
"description"
/>
<h:message
for=
"description"
/>
</h:panelGrid>
</h:panelGrid>
</p:tab>
<!--
</p:tab>
<p:tab id="selectproducts"
<p:tab id="selectproducts"
title=
"#{i18n['foodwavetemplate.selectproducts']}"
>
title="#{i18n['foodwavetemplate.selectproducts']}">
-->
<h:messages
/>
<h:messages
/>
<h:panelGrid
columns=
"4"
>
<h:panelGrid
columns=
"4"
>
<h:outputText
value=
"#{i18n['foodwavetemplate.productname']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.productname']}"
/>
<h:outputText
<h:outputText
value=
"#{i18n['foodwavetemplate.productdescription']}"
/>
value=
"#{i18n['foodwavetemplate.productdescription']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.price']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.price']}"
/>
<h:outputText
value=
" "
/>
<h:outputText
value=
" "
/>
<h:inputText
id=
"productname"
<h:inputText
id=
"productname"
value=
"#{foodWaveView.currentProduct.name}"
/>
value=
"#{foodWaveView.currentProduct.name}"
/>
<h:inputText
id=
"productdescription"
<h:inputText
id=
"productdescription"
value=
"#{foodWaveView.currentProduct.description}"
/>
value=
"#{foodWaveView.currentProduct.description}"
/>
<h:inputText
id=
"price"
<h:inputText
id=
"price"
value=
"#{foodWaveView.currentProduct.price}"
/>
value=
"#{foodWaveView.currentProduct.price}"
/>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
update=
"productTable"
/>
</h:panelGrid>
</h:panelGrid>
<p:dataTable
name=
"productTable"
id=
"productTable"
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<p:cellEditor>
<f:facet
name=
"output"
>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.name}"
/>
<h:outputText
value=
"#{product.name}"
/>
</f:facet>
</f:facet>
<f:facet
name=
"input"
>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Name required"
/>
required=
"true"
requiredMessage=
"Name required"
/>
</f:facet>
</f:facet>
</p:cellEditor>
</p:cellEditor>
</p:column>
</p:column>
<p:column
<p:column
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:cellEditor>
<p:cellEditor>
<f:facet
name=
"output"
>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.description}"
/>
<h:outputText
value=
"#{product.description}"
/>
</f:facet>
</f:facet>
<f:facet
name=
"input"
>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Description required"
/>
required=
"true"
requiredMessage=
"Description required"
/>
</f:facet>
</f:facet>
</p:cellEditor>
</p:cellEditor>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:cellEditor>
<p:cellEditor>
<f:facet
name=
"output"
>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.price}"
/>
<h:outputText
value=
"#{product.price}"
/>
</f:facet>
</f:facet>
<f:facet
name=
"input"
>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Price required"
/>
required=
"true"
requiredMessage=
"Price required"
/>
</f:facet>
</f:facet>
</p:cellEditor>
</p:cellEditor>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
style=
"width:20px"
>
style=
"width:20px"
>
<p:rowEditor
/>
<p:rowEditor
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
style=
"width:20px;"
>
<p:commandButton
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
update=
"productTable"
/>
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
value=
"#{i18n['foodwavetemplate.savetemplate']}"
>
</p:tab>
<f:param
value=
"#{foodWaveView.templateId}"
name=
"id"
/>
</h:commandButton>
>
<!-- </p:tab> -->
<
/p:wizard
>
<
!-- </p:wizard> --
>
</h:form>
</h:form>
...
...
code/LanBortalWeb/WebContent/foodadmin/editTemplate.xhtml
View file @
2614d90
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
<ui:composition
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:metadata>
<f:viewParam
name=
"id"
value=
"#{foodWaveView.templateId}"
/>
<f:event
type=
"preRenderView"
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initEditTemplate()}"
/>
listener=
"#{foodWaveView.initEditTemplate()}"
/>
<f:viewParam
name=
"id"
value=
"#{foodWaveView.templateId}"
/>
</f:metadata>
</f:metadata>
<ui:define
name=
"title"
>
<ui:define
name=
"title"
>
...
@@ -43,11 +43,12 @@
...
@@ -43,11 +43,12 @@
</h:panelGrid>
</h:panelGrid>
<h:selectOneMenu
value=
"#{foodWaveView.currentProduct}"
<h:selectOneMenu
value=
"#{foodWaveView.currentProduct}"
converter=
"#{productConverter}"
>
converter=
"#{productConverter}"
>
<f:selectItems
value=
"#{foodWaveView.products}"
var=
"product"
itemLabel=
"#{product.name}"
></f:selectItems>
<f:selectItems
value=
"#{foodWaveView.products}"
var=
"product"
itemLabel=
"#{product.name}"
></f:selectItems>
</h:selectOneMenu>
</h:selectOneMenu>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
update=
"productTable"
/>
<!-- <h:panelGrid columns="4">
<!-- <h:panelGrid columns="4">
<h:outputText value="#{i18n['foodwavetemplate.productname']}" />
<h:outputText value="#{i18n['foodwavetemplate.productname']}" />
...
@@ -68,58 +69,62 @@
...
@@ -68,58 +69,62 @@
update="productTable" />
update="productTable" />
</h:panelGrid>
</h:panelGrid>
-->
<p:dataTable
name=
"productTable"
id=
"productTable"
-->
value=
"#{foodWaveView.template.products}"
var=
"product"
<p:dataTable
name=
"productTable"
id=
"productTable"
editable=
"true"
>
value=
"#{foodWaveView.template.products}"
var=
"product"
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
editable=
"true"
>
<p:cellEditor>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<f:facet
name=
"output"
>
<p:cellEditor>
<h:outputText
value=
"#{product.name}"
/>
<f:facet
name=
"output"
>
</f:facet>
<h:outputText
value=
"#{product.name}"
/>
<f:facet
name=
"input"
>
</f:facet>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
<f:facet
name=
"input"
>
required=
"true"
requiredMessage=
"Name required"
/>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
</f:facet>
required=
"true"
requiredMessage=
"Name required"
/>
</p:cellEditor>
</f:facet>
</p:column>
</p:cellEditor>
<p:column
</p:column>
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:column
<p:cellEditor>
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<f:facet
name=
"output"
>
<p:cellEditor>
<h:outputText
value=
"#{product.description}"
/>
<f:facet
name=
"output"
>
</f:facet>
<h:outputText
value=
"#{product.description}"
/>
<f:facet
name=
"input"
>
</f:facet>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
<f:facet
name=
"input"
>
required=
"true"
requiredMessage=
"Description required"
/>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
</f:facet>
required=
"true"
requiredMessage=
"Description required"
/>
</p:cellEditor>
</f:facet>
</p:column>
</p:cellEditor>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
</p:column>
<p:cellEditor>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<f:facet
name=
"output"
>
<p:cellEditor>
<h:outputText
value=
"#{product.price}"
/>
<f:facet
name=
"output"
>
</f:facet>
<h:outputText
value=
"#{product.price}"
/>
<f:facet
name=
"input"
>
</f:facet>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
<f:facet
name=
"input"
>
required=
"true"
requiredMessage=
"Price required"
/>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
</f:facet>
required=
"true"
requiredMessage=
"Price required"
/>
</p:cellEditor>
</f:facet>
</p:column>
</p:cellEditor>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
</p:column>
style=
"width:20px"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
<p:rowEditor
/>
style=
"width:20px"
>
</p:column>
<p:rowEditor
/>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
</p:column>
style=
"width:20px;"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
<p:commandButton
style=
"width:20px;"
>
value=
"#{i18n['foodwavetemplate.removeFromList']}"
<p:commandButton
action=
"#{foodWaveView.removeProductFromList(product)}"
value=
"#{i18n['foodwavetemplate.removeFromList']}"
update=
"productTable"
/>
action=
"#{foodWaveView.removeProductFromList(product)}"
</p:column>
update=
"productTable"
/>
</p:dataTable>
</p:column>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
</p:dataTable>
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
<!-- -->
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
<!-- -->
</p:panel>
</p:panel>
</h:form>
<h:form>
<p:panel
header=
"#{i18n['foodwavetemplate.createwave']}"
>
<p:panel
header=
"#{i18n['foodwavetemplate.createwave']}"
>
<h:panelGrid
columns=
"3"
>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"waveName"
<h:outputLabel
for=
"waveName"
...
@@ -145,11 +150,6 @@
...
@@ -145,11 +150,6 @@
value=
"#{i18n['foodwavetemplate.createFoodwave']}"
/>
value=
"#{i18n['foodwavetemplate.createFoodwave']}"
/>
</p:panel>
</p:panel>
</h:form>
</h:form>
<ui:fragment>
</ui:fragment>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
</h:body>
</h:body>
...
...
code/LanBortalWeb/WebContent/foodadmin/listTemplates.xhtml
View file @
2614d90
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</h:column>
</h:column>
<h:column>
<h:column>
<h:link
value=
"LOL"
outcome=
"/foodadmin/editTemplate"
>
<h:link
value=
"LOL"
outcome=
"/foodadmin/editTemplate"
>
<f:param
value=
"#{food
waveTemplate.i
d}"
name=
"id"
/>
<f:param
value=
"#{food
WaveView.templateI
d}"
name=
"id"
/>
</h:link>
</h:link>
</h:column>
</h:column>
</h:dataTable>
</h:dataTable>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment