1
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
3
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
4
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
5
<%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
9
Copyright 2002,2004 The Apache Software Foundation.
11
Licensed under the Apache License, Version 2.0 (the "License");
12
you may not use this file except in compliance with the License.
13
You may obtain a copy of the License at
15
http://www.apache.org/licenses/LICENSE-2.0
17
Unless required by applicable law or agreed to in writing, software
18
distributed under the License is distributed on an "AS IS" BASIS,
19
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
See the License for the specific language governing permissions and
21
limitations under the License.
27
<s:loadMessages var="messages"/>
28
<s:html locale="true">
31
<c:when test="${registrationForm.action == 'Create'}">
32
<s:message key="registration.title.create"/>
34
<c:when test="${registrationForm.action == 'Edit'}">
35
<s:message key="registration.title.edit"/>
42
<s:stylesheet path="/stylesheet.css"/>
48
<s:form id="registration"
49
action="/saveRegistration"
51
onsubmit="return validateRegistrationForm(this);"
52
styleClass="center form">
54
<h:inputHidden id="action"
55
value="#{registrationForm.action}"/>
57
<h:panelGrid columns="2"
59
headerClass="grid header"
60
columnClasses="grid column0,grid column1">
62
<%-- Grid header element --%>
64
<f:facet name="header">
67
<c:when test="${registrationForm.action == 'Create'}">
68
<s:message key="registration.header.create"/>
70
<c:when test="${registrationForm.action == 'Edit'}">
71
<s:message key="registration.header.edit"/>
75
id="unknownActionTitle"
76
value="UNKNOWN ACTION"/>
82
<%-- Grid data elements --%>
84
<h:outputLabel for="username"
86
<s:message key="prompt.username"/>
91
<c:when test="${registrationForm.action == 'Create'}">
92
<h:inputText id="username"
95
value="#{registrationForm.username}"/>
97
<c:when test="${registrationForm.action == 'Edit'}">
103
value="#{registrationForm.username}"/>
106
value="#{registrationForm.username}"/>
111
id="unknownActionMessage"
113
value="UNKNOWN ACTION"/>
118
<h:outputLabel for="password"
120
<s:message key="prompt.password"/>
123
<h:inputText id="password"
126
value="#{registrationForm.password}"/>
128
<h:outputLabel for="password2"
130
<s:message key="prompt.password2"/>
133
<h:inputText id="password2"
136
value="#{registrationForm.password2}"/>
138
<h:outputLabel for="fullName"
140
<s:message key="prompt.fullName"/>
143
<h:inputText id="fullName"
146
value="#{registrationForm.fullName}"/>
148
<h:outputLabel for="fromAddress"
150
<s:message key="prompt.fromAddress"/>
153
<h:inputText id="fromAddress"
156
value="#{registrationForm.fromAddress}"/>
158
<h:outputLabel for="replyToAddress"
160
<s:message key="prompt.replyToAddress"/>
163
<h:inputText id="replyToAddress"
166
value="#{registrationForm.replyToAddress}"/>
168
<h:commandButton id="submit"
171
value="#{messages['button.save']}"/>
174
<h:commandButton id="reset"
177
value="#{messages['button.reset']}"/>
178
<h:commandButton id="cancel"
181
onclick="bCancel=true;"
182
value="#{messages['button.cancel']}"/>
189
<c:if test="${registrationForm.action == 'Edit'}">
191
<h:form id="subscriptions">
193
<h:dataTable id="table"
194
binding="#{registrationBacking.table}"
195
columnClasses="list column left,list column left,list column center,
196
list column center,list column center"
197
headerClass="list header"
198
styleClass="wide list"
199
rowClasses="list row even,list row odd"
200
value="#{user.subscriptions}"
203
<h:column id="hostColumn">
204
<f:facet name="header">
205
<s:message id="hostHeader"
208
<h:outputText id="subhost"
210
value="#{subscription.host}"/>
213
<h:column id="usernameColumn">
214
<f:facet name="header">
215
<s:message id="usernameHeader"
218
<h:outputText id="subusername"
220
value="#{subscription.username}"/>
223
<h:column id="typeColumn">
224
<f:facet name="header">
225
<s:message id="typeHeader"
228
<h:selectOneMenu id="type"
230
value="#{subscription.type}">
233
itemLabel="IMAP Protocol"/>
236
itemLabel="POP3 Protocol"/>
239
<h:outputText id="subtype"
241
value="#{subscription.type}"/>
245
<h:column id="autoConnectColumn">
246
<f:facet name="header">
247
<s:message id="autoConnectHeader"
248
key="heading.autoConnect"/>
250
<h:selectBooleanCheckbox
253
value="#{subscription.autoConnect}"/>
256
<h:column id="actionColumn">
257
<f:facet name="header">
258
<s:message id="actionHeader"
259
key="heading.action"/>
261
<h:commandButton id="delete"
264
action="#{registrationBacking.delete}"
265
value="#{messages['button.delete']}"/>
266
<h:commandButton id="edit"
269
action="#{registrationBacking.edit}"
270
value="#{messages['button.edit']}"/>
275
<h:commandButton id="create"
277
action="#{registrationBacking.create}"
279
value="#{messages['button.add']}"/>
281
<h:commandButton id="update"
283
action="#{registrationBacking.update}"
285
value="#{messages['button.update']}"/>
291
<s:javascript formName="registrationForm"
292
dynamicJavascript="true"
293
staticJavascript="false"/>
294
<script language="Javascript1.1" src="staticJavascript.jsp"></script>