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 @@
<ui:define
name=
"content"
>
<h:form>
<p:wizard>
<p:tab
id=
"basicinfo"
title=
"#{i18n['foodwavetemplate.basicinfo']}"
>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"name"
value=
"#{i18n['foodwavetemplate.name']}"
/>
<h:inputText
id=
"name"
value=
"#{foodWaveView.template.name}"
required=
"true"
requiredMessage=
"Name required"
/>
<h:message
for=
"name"
/>
<!-- <p:wizard>
<p:tab id="basicinfo" title="#{i18n['foodwavetemplate.basicinfo']}"> -->
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"name"
value=
"#{i18n['foodwavetemplate.name']}"
/>
<h:inputText
id=
"name"
value=
"#{foodWaveView.template.name}"
required=
"true"
requiredMessage=
"Name required"
/>
<h:message
for=
"name"
/>
<h:outputLabel
for=
"description"
value=
"#{i18n['foodwavetemplate.description']}"
/>
<h:inputText
id=
"description"
value=
"#{foodWaveView.template.description}"
required=
"true"
requiredMessage=
"Description required"
/>
<h:message
for=
"description"
/>
</h:panelGrid>
</p:tab>
<h:outputLabel
for=
"description"
value=
"#{i18n['foodwavetemplate.description']}"
/>
<h:inputText
id=
"description"
value=
"#{foodWaveView.template.description}"
required=
"true"
requiredMessage=
"Description required"
/>
<h:message
for=
"description"
/>
</h:panelGrid>
<!--
</p:tab>
<p:tab id="selectproducts"
title=
"#{i18n['foodwavetemplate.selectproducts']}"
>
<h:messages
/>
<h:panelGrid
columns=
"4"
>
title="#{i18n['foodwavetemplate.selectproducts']}">
-->
<h:messages
/>
<h:panelGrid
columns=
"4"
>
<h:outputText
value=
"#{i18n['foodwavetemplate.productname']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.productdescription']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.price']}"
/>
<h:outputText
value=
" "
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.productname']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.productdescription']}"
/>
<h:outputText
value=
"#{i18n['foodwavetemplate.price']}"
/>
<h:outputText
value=
" "
/>
<h:inputText
id=
"productname"
value=
"#{foodWaveView.currentProduct.name}"
/>
<h:inputText
id=
"productdescription"
value=
"#{foodWaveView.currentProduct.description}"
/>
<h:inputText
id=
"price"
value=
"#{foodWaveView.currentProduct.price}"
/>
<h:inputText
id=
"productname"
value=
"#{foodWaveView.currentProduct.name}"
/>
<h:inputText
id=
"productdescription"
value=
"#{foodWaveView.currentProduct.description}"
/>
<h:inputText
id=
"price"
value=
"#{foodWaveView.currentProduct.price}"
/>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
</h:panelGrid>
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.name}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Name required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.description}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Description required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.price}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Price required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
style=
"width:20px"
>
<p:rowEditor
/>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
</p:column>
</p:dataTable>
</h:panelGrid>
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.name}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Name required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.description}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Description required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.price}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Price required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
style=
"width:20px"
>
<p:rowEditor
/>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
</p:column>
</p:dataTable>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
</p:tab>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
>
<f:param
value=
"#{foodWaveView.templateId}"
name=
"id"
/>
</h:commandButton>
>
<!-- </p:tab> -->
<
/p:wizard
>
<
!-- </p:wizard> --
>
</h:form>
...
...
code/LanBortalWeb/WebContent/foodadmin/editTemplate.xhtml
View file @
2614d90
...
...
@@ -13,9 +13,9 @@
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:viewParam
name=
"id"
value=
"#{foodWaveView.templateId}"
/>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initEditTemplate()}"
/>
<f:viewParam
name=
"id"
value=
"#{foodWaveView.templateId}"
/>
</f:metadata>
<ui:define
name=
"title"
>
...
...
@@ -43,11 +43,12 @@
</h:panelGrid>
<h:selectOneMenu
value=
"#{foodWaveView.currentProduct}"
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>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTable"
/>
<!-- <h:panelGrid columns="4">
<h:outputText value="#{i18n['foodwavetemplate.productname']}" />
...
...
@@ -68,58 +69,62 @@
update="productTable" />
</h:panelGrid>
-->
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.name}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Name required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.description}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Description required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.price}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Price required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
style=
"width:20px"
>
<p:rowEditor
/>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
</p:column>
</p:dataTable>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
<!-- -->
-->
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.name}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.name}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Name required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.productdescription']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.description}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.description}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Description required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.price']}"
>
<p:cellEditor>
<f:facet
name=
"output"
>
<h:outputText
value=
"#{product.price}"
/>
</f:facet>
<f:facet
name=
"input"
>
<p:inputText
value=
"#{product.price}"
style=
"width:100%"
required=
"true"
requiredMessage=
"Price required"
/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.editRow']}"
style=
"width:20px"
>
<p:rowEditor
/>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
</p:column>
</p:dataTable>
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
<!-- -->
</p:panel>
</h:form>
<h:form>
<p:panel
header=
"#{i18n['foodwavetemplate.createwave']}"
>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"waveName"
...
...
@@ -145,11 +150,6 @@
value=
"#{i18n['foodwavetemplate.createFoodwave']}"
/>
</p:panel>
</h:form>
<ui:fragment>
</ui:fragment>
</ui:define>
</ui:composition>
</h:body>
...
...
code/LanBortalWeb/WebContent/foodadmin/listTemplates.xhtml
View file @
2614d90
...
...
@@ -24,7 +24,7 @@
</h:column>
<h:column>
<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:column>
</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