craigmcc 2003/06/04 10:37:02
Modified: contrib/struts-faces/web/example logon.jsp registration.jsp
subscription.jsp
contrib/struts-faces/web/example/WEB-INF web.xml
Log:
Update the web portion of the Struts-Faces example app for the new
EA4 release of JavaServer Faces.
Revision Changes Path
1.2 +2 -2 jakarta-struts/contrib/struts-faces/web/example/logon.jsp
Index: logon.jsp
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-faces/web/example/logon.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- logon.jsp 7 Mar 2003 03:22:45 -0000 1.1
+++ logon.jsp 4 Jun 2003 17:37:02 -0000 1.2
@@ -39,14 +39,14 @@
</h:output_label>
<h:input_text id="username" size="16"
- modelReference="logonForm.map.username"/>
+ valueRef="logonForm.username"/>
<h:output_label for="password">
<s:message key="prompt.password"/>
</h:output_label>
<h:input_secret id="password" size="16"
- modelReference="logonForm.map.password"/>
+ valueRef="logonForm.password"/>
<h:command_button id="submit" type="SUBMIT"
commandClass="command-single"
1.2 +34 -28 jakarta-struts/contrib/struts-faces/web/example/registration.jsp
Index: registration.jsp
===================================================================
RCS file:
/home/cvs/jakarta-struts/contrib/struts-faces/web/example/registration.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- registration.jsp 7 Mar 2003 03:22:45 -0000 1.1
+++ registration.jsp 4 Jun 2003 17:37:02 -0000 1.2
@@ -35,7 +35,7 @@
<s:form action="/saveRegistration" focus="username"
onsubmit="return validateRegistrationForm(this);">
- <h:input_hidden id="action" modelReference="registrationForm.action"/>
+ <h:input_hidden id="action" valueRef="registrationForm.action"/>
<h:panel_grid
columns="2"
@@ -71,14 +71,14 @@
<c:choose>
<c:when test="${registrationForm.action == 'Create'}">
<h:input_text id="username" size="16"
- modelReference="registrationForm.username"/>
+ valueRef="registrationForm.username"/>
</c:when>
<c:when test="${registrationForm.action == 'Edit'}">
<h:panel_group id="usernameGroup">
<s:write filter="true"
- modelReference="registrationForm.username"/>
+ valueRef="registrationForm.username"/>
<h:input_hidden id="username"
- modelReference="registrationForm.username"/>
+ valueRef="registrationForm.username"/>
</h:panel_group>
</c:when>
<c:otherwise>
@@ -92,35 +92,35 @@
</h:output_label>
<h:input_text id="password"
- size="16" modelReference="registrationForm.password"/>
+ size="16" valueRef="registrationForm.password"/>
<h:output_label for="password2">
<s:message key="prompt.password2"/>
</h:output_label>
<h:input_text id="password2"
- size="16" modelReference="registrationForm.password2"/>
+ size="16" valueRef="registrationForm.password2"/>
<h:output_label for="fullName">
<s:message key="prompt.fullName"/>
</h:output_label>
<h:input_text id="fullName"
- size="50" modelReference="registrationForm.fullName"/>
+ size="50" valueRef="registrationForm.fullName"/>
<h:output_label for="fromAddress">
<s:message key="prompt.fromAddress"/>
</h:output_label>
<h:input_text id="fromAddress"
- size="50" modelReference="registrationForm.fromAddress"/>
+ size="50" valueRef="registrationForm.fromAddress"/>
<h:output_label for="replyToAddress">
<s:message key="prompt.replyToAddress"/>
</h:output_label>
<h:input_text id="replyToAddress"
- size="50" modelReference="registrationForm.replyToAddress"/>
+ size="50" valueRef="registrationForm.replyToAddress"/>
<h:command_button id="submit" type="SUBMIT" commandName="submit"
commandClass="command-single"
@@ -160,29 +160,35 @@
<%-- List Data --%>
<h:panel_data id="data" var="subscription"
- modelReference="user.subscriptions">
- <h:output_text id="subhost" modelReference="subscription.host"/>
- <h:output_text id="subusername" modelReference="subscription.username"/>
- <h:output_text id="subtype" modelReference="subscription.type"/>
- <h:output_text id="subconn" modelReference="subscription.autoConnect"/>
- <s:body id="subactions">
- <a:linkSubscription page="/editSubscription.do?action=Delete">
- <s:message key="registration.deleteSubscription"
- styleClass="command-multiple"/>
- </a:linkSubscription>
- <a:linkSubscription page="/editSubscription.do?action=Edit">
- <s:message key="registration.editSubscription"
- styleClass="command-multiple"/>
- </a:linkSubscription>
- </s:body>
+ valueRef="user.subscriptions">
+ <h:output_text id="subhost" valueRef="subscription.host"/>
+ <h:output_text id="subusername" valueRef="subscription.username"/>
+ <h:output_text id="subtype" valueRef="subscription.type"/>
+ <h:output_text id="subconn" valueRef="subscription.autoConnect"/>
+ <h:panel_group id="subactions">
+ <h:command_hyperlink id="delete" label="Delete"
+ commandClass="command-multiple"
+ href="editSubscription.do">
+ <f:parameter name="action" value="Delete"/>
+ <f:parameter name="username" valueRef="subscription.user.username"/>
+ <f:parameter name="host" valueRef="subscription.host"/>
+ </h:command_hyperlink>
+ <h:command_hyperlink id="edit" label="Edit"
+ commandClass="command-multiple"
+ href="editSubscription.do">
+ <f:parameter name="action" value="Edit"/>
+ <f:parameter name="username" valueRef="subscription.user.username"/>
+ <f:parameter name="host" valueRef="subscription.host"/>
+ </h:command_hyperlink>
+ </h:panel_group>
</h:panel_data>
</h:panel_list>
- <h:command_hyperlink id="add" label="Create New Mail Subscription"
- href="editSubscription.do?action=Create">
- <f:parameter id="foo" name="username"
- modelReference="registrationForm.username"/>
+ <h:command_hyperlink id="add" label="Create New Mail Subscription"
+ href="editSubscription.do">
+ <f:parameter name="action" value="Create"/>
+ <f:parameter name="username" valueRef="registrationForm.username"/>
</h:command_hyperlink>
</c:if>
1.2 +9 -9 jakarta-struts/contrib/struts-faces/web/example/subscription.jsp
Index: subscription.jsp
===================================================================
RCS file:
/home/cvs/jakarta-struts/contrib/struts-faces/web/example/subscription.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- subscription.jsp 7 Mar 2003 03:22:45 -0000 1.1
+++ subscription.jsp 4 Jun 2003 17:37:02 -0000 1.2
@@ -33,7 +33,7 @@
<s:form action="/saveSubscription" focus="host">
- <h:input_hidden id="action" modelReference="subscriptionForm.action"/>
+ <h:input_hidden id="action" valueRef="subscriptionForm.action"/>
<h:panel_grid
columns="2"
@@ -69,7 +69,7 @@
</h:output_label>
<s:write id="user" filter="true"
- modelReference="user.username"/>
+ valueRef="user.username"/>
<h:output_label for="host">
<s:message key="prompt.mailHostname"/>
@@ -78,13 +78,13 @@
<c:choose>
<c:when test="${subscriptionForm.action == 'Create'}">
<h:input_text id="host" size="50"
- modelReference="subscriptionForm.host"/>
+ valueRef="subscriptionForm.host"/>
</c:when>
<c:otherwise>
<h:panel_group id="hostGroup">
<s:write id="hostDisplay" filter="true"
- modelReference="subscriptionForm.host"/>
- <h:input_hidden id="host" modelReference="subscriptionForm.host"/>
+ valueRef="subscriptionForm.host"/>
+ <h:input_hidden id="host" valueRef="subscriptionForm.host"/>
</h:panel_group>
</c:otherwise>
</c:choose>
@@ -94,21 +94,21 @@
</h:output_label>
<h:input_text id="username"
- size="50" modelReference="subscriptionForm.username"/>
+ size="50" valueRef="subscriptionForm.username"/>
<h:output_label for="password">
<s:message key="prompt.mailPassword"/>
</h:output_label>
<h:input_text id="password"
- size="50" modelReference="subscriptionForm.password"/>
+ size="50" valueRef="subscriptionForm.password"/>
<h:output_label for="type">
<s:message key="prompt.mailServerType"/>
</h:output_label>
<h:selectone_menu id="type"
- modelReference="subscriptionForm.type">
+ valueRef="subscriptionForm.type">
<h:selectitem itemValue="imap" itemLabel="IMAP Protocol"/>
<h:selectitem itemValue="pop3" itemLabel="POP3 Protocol"/>
</h:selectone_menu>
@@ -118,7 +118,7 @@
</h:output_label>
<h:selectboolean_checkbox id="autoConnect"
- modelReference="subscriptionForm.autoConnect"/>
+ valueRef="subscriptionForm.autoConnect"/>
<c:choose>
<c:when test="${subscriptionForm.action == 'Delete'}">
1.2 +1 -0 jakarta-struts/contrib/struts-faces/web/example/WEB-INF/web.xml
Index: web.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-faces/web/example/WEB-INF/web.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- web.xml 7 Mar 2003 03:22:45 -0000 1.1
+++ web.xml 4 Jun 2003 17:37:02 -0000 1.2
@@ -6,6 +6,7 @@
<web-app>
+ <display-name>Struts-Faces Integration Library Example</display-name>
<!-- JavaServer Faces Servlet Configuration -->
<servlet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]