Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 23999 invoked from network); 31 May 2007 09:57:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 May 2007 09:57:48 -0000 Received: (qmail 61004 invoked by uid 500); 31 May 2007 09:57:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 60978 invoked by uid 500); 31 May 2007 09:57:52 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 60969 invoked by uid 99); 31 May 2007 09:57:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 02:57:52 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 02:57:40 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 5FC9E1A9879; Thu, 31 May 2007 02:56:27 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r543102 [17/32] - in /harmony/enhanced/buildtest/branches/2.0: adaptors/struts_test/ tests/struts_test/ tests/struts_test/resources/ tests/struts_test/resources/showcase/ tests/struts_test/src/ tests/struts_test/src/org/ tests/struts_test/s... Date: Thu, 31 May 2007 09:56:07 -0000 To: commits@harmony.apache.org From: smishura@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070531095627.5FC9E1A9879@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-981166308.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-981166308.html?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-981166308.html (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-981166308.html Thu May 31 02:55:56 2007 @@ -0,0 +1,207 @@ + + + + + + + + + + View Sources + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +

View Sources

+ + + +
+ +
+ +

/ajax/remotediv/example5.jsp

+
+
+1: <%@ page contentType="text/html;charset=UTF-8" language="java" %>
+2: <%@ taglib prefix="s" uri="/struts-tags" %>
+3: 
+4: <html>
+5: <head>
+6:     <title>Ajax Examples</title>
+7:     <jsp:include page="/ajax/commonInclude.jsp"/>
+8: </head>
+9: 
+10: <body>
+11: 
+12: <s:url id="ajaxNoUrl" value="/AjaxNoUrl.jsp" />
+13: 
+14: <s:div
+15:         id="error"
+16:         cssStyle="border: 1px solid yellow;"
+17:         href="/AjaxNoUrl.jsp"
+18:         theme="ajax"
+19:         delay="1000"
+20:         errorText="Could not contact server"
+21:         loadingText="reloading">loading now</s:div>
+22: 
+23: 
+24: <s:include value="../footer.jsp"/>
+25: 
+26: </body>
+27: </html>
+
+
+ +
+ +

Unknown configuration

+
+
+
+
+
+ +
+ +

Unknown or unavailable Action class

+
+
+
+
+ + +
+ + + +
+ +
+

+ View Sources +

+
+ +

+ +

+ + + Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-981166308.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-983365538.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-983365538.html?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-983365538.html (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-983365538.html Thu May 31 02:55:56 2007 @@ -0,0 +1,224 @@ + + + + + + + + + + View Sources + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +

View Sources

+ + + +
+ +
+ +

/validation/storeErrorsAcrossRequestExample.jsp

+
+
+1: <%@ page language="java" contentType="text/html; charset=UTF-8"
+2:     pageEncoding="UTF-8"%>
+3: <%@taglib prefix="s" uri="/struts-tags" %>
+4: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+5: <html>
+6: <head>
+7: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+8: <title>Showcase - Validation - Store Errors Across Request Example</title>
+9: </head>
+10: <body>
+11: 	<p>
+12: 	This is an example demonstrating the use of MessageStoreInterceptor.
+13: 	When this form is submited a redirect is issue both when there's a validation
+14: 	error or not. Normally, when a redirect is issue the action messages / errors and
+15: 	field errors stored in the action will be lost (due to an action lives 
+16: 	only as long as a request). With a MessageStoreInterceptor in place and 
+17: 	configured, the action errors / messages / field errors will be store and 
+18: 	remains retrieveable even after a redirect.
+19: 	</p>
+20: 
+21:     <table border="1">
+22:         <tr><td>ActionMessages: </td><td></td><s:actionmessage/></tr>
+23:        <tr><td>ActionErrors: </td><td><s:actionerror/></td></tr>
+24:     </table>
+25: 
+26:     <p>
+27:     <s:form action="submitApplication" namespace="/validation">
+28: 		<s:textfield name="name" label="Name" />
+29: 		<s:textfield name="age" label="Age" />
+30: 		<s:submit />
+31: 		<s:submit action="cancelApplication" value="%{'Cancel'}" />
+32: 	</s:form>
+33:     </p>
+34:     <p>
+35:         Try submitting with an invalid age value,
+36:         and note that the browser location changes,
+37:         but validation messages are retained.
+38:         Because of the redirect,
+39:         the input values are not retained. 
+40:     </p>
+41: 
+42: </body>
+43: </html>
+44: 
+
+
+ +
+ +

Unknown configuration

+
+
+
+
+
+ +
+ +

Unknown or unavailable Action class

+
+
+
+
+ + +
+ + + +
+ +
+

+ View Sources +

+
+ +

+ +

+ + + Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-983365538.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-99058551.plain URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-99058551.plain?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-99058551.plain (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file-99058551.plain Thu May 31 02:55:56 2007 @@ -0,0 +1,53 @@ +/* + * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.showcase.conversion; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import com.opensymphony.xwork2.ActionSupport; + +/** + * + * @version $Date$ $Id$ + */ +public class OperationsEnumAction extends ActionSupport { + + private static final long serialVersionUID = -2229489704988870318L; + + private List selectedOperations = new LinkedList(); + + public List getSelectedOperations() { return this.selectedOperations; } + public void setSelectedOperations(List selectedOperations) { + this.selectedOperations = selectedOperations; + } + + + public List getAvailableOperations() { + return Arrays.asList(OperationsEnum.values()); + } + + public String input() throws Exception { + return SUCCESS; + } + public String submit() throws Exception { + return SUCCESS; + } +} + Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file0.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file0.html?view=auto&rev=543102 ============================================================================== (empty) Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file0.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1019812867.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1019812867.html?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1019812867.html (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1019812867.html Thu May 31 02:55:56 2007 @@ -0,0 +1,112 @@ + + + + + + + + + + Execute and Wait Examples + + + + + + + + + + + + + + +
+
+ +
+ +
+ +

Execute and Wait Examples

+ + These examples illustrate Struts build in support for execute and wait. +

+ When you have a process that takes a long time your users can be impatient and starts to submit/click again. +
A good solution is to show the user a progress page (wait page) while the process takes it time. + +
+
Example 1 (no delay) +
Example 2 (with delay) +
Example 2 (with longer check delay) + +

+ +
+ +
+

+ View Sources +

+
+ +

+ +

+ + + Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1019812867.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1020471525.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1020471525.html?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1020471525.html (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1020471525.html Thu May 31 02:55:56 2007 @@ -0,0 +1,353 @@ + + + + + + + + + + View Sources + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +

View Sources

+ + + +
+ +
+ +

/empmanager/listEmployees.jsp

+
+
+1: <%@ taglib prefix="s" uri="/struts-tags" %>
+2: 
+3: <%@ page contentType="text/html;charset=UTF-8" language="java" %>
+4: <html>
+5: <head><title>Available Employees</title></head>
+6: 
+7: <body>
+8: <h1>Available Employees</h1>
+9: <table>
+10:     <tr>
+11:         <th>Id</th>
+12:         <th>First Name</th>
+13:         <th>Last Name</th>
+14:     </tr>
+15:     <s:iterator value="availableItems">
+16:         <tr>
+17:             <td><a href="<s:url action="edit-%{empId}" />"><s:property value="empId"/></a></td>
+18:             <td><s:property value="firstName"/></td>
+19:             <td><s:property value="lastName"/></td>
+20:         </tr>
+21:     </s:iterator>
+22: </table>
+23: <p><a href="<s:url action="edit-" includeParams="none"/>">Create new Employee</a></p>
+24: <p><a href="<s:url action="showcase" namespace="/" includeParams="none"/>">Back to Showcase Startpage</a></p>
+25: </body>
+26: </html>
+
+
+ +
+ +

file:/C:/mol/tools/jakarta-tomcat-5.0.30/webapps/struts2-showcase-2.0.6/WEB-INF/classes/struts.xml

+
+
+
+85:         </action>
+86:         <action name="delete" class="org.apache.struts2.showcase.action.SkillAction" method="delete">
+87:             <result name="error">/empmanager/editSkill.jsp</result>
+88:             <result type="redirect">edit.action?skillName=${currentSkill.name}</result>
+89:         </action>
+90:     </package>
+91: 
+92:     <package name="employee" extends="default" namespace="/employee">
+93:         <default-interceptor-ref name="crudStack"/>
+94: 
+95:         <action name="list" class="org.apache.struts2.showcase.action.EmployeeAction" method="list">
+96:             <result>/empmanager/listEmployees.jsp</result>
+97:             <interceptor-ref name="basicStack"/>
+98:         </action>
+99:         <action name="edit-*" class="org.apache.struts2.showcase.action.EmployeeAction">
+100:       <param name="empId">{1}</param>
+101:             <result>/empmanager/editEmployee.jsp</result>
+102:             <interceptor-ref name="crudStack"><param name="validation.excludeMethods">execute</param></interceptor-ref>
+103:         </action>
+104:         <action name="save" class="org.apache.struts2.showcase.action.EmployeeAction" method="save">
+105:             <result name="input">/empmanager/editEmployee.jsp</result>
+
+
+ +
+ +

/org/apache/struts2/showcase/action/EmployeeAction.java

+
+
+1: /*
+2:  * $Id: EmployeeAction.java 476710 2006-11-19 05:05:14Z mrdon $
+3:  *
+4:  * Licensed to the Apache Software Foundation (ASF) under one
+5:  * or more contributor license agreements.  See the NOTICE file
+6:  * distributed with this work for additional information
+7:  * regarding copyright ownership.  The ASF licenses this file
+8:  * to you under the Apache License, Version 2.0 (the
+9:  * "License"); you may not use this file except in compliance
+10:  * with the License.  You may obtain a copy of the License at
+11:  *
+12:  *  http://www.apache.org/licenses/LICENSE-2.0
+13:  *
+14:  * Unless required by applicable law or agreed to in writing,
+15:  * software distributed under the License is distributed on an
+16:  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+17:  * KIND, either express or implied.  See the License for the
+18:  * specific language governing permissions and limitations
+19:  * under the License.
+20:  */
+21: package org.apache.struts2.showcase.action;
+22: 
+23: import java.util.ArrayList;
+24: import java.util.Arrays;
+25: import java.util.Iterator;
+26: import java.util.List;
+27: 
+28: import org.apache.log4j.Logger;
+29: import org.apache.struts2.showcase.application.TestDataProvider;
+30: import org.apache.struts2.showcase.dao.Dao;
+31: import org.apache.struts2.showcase.dao.EmployeeDao;
+32: import org.apache.struts2.showcase.model.Employee;
+33: import org.apache.struts2.showcase.model.Skill;
+34: 
+35: import com.opensymphony.xwork2.Preparable;
+36: 
+37: /**
+38:  * JsfEmployeeAction.
+39:  */
+40: 
+41: public class EmployeeAction extends AbstractCRUDAction implements Preparable {
+42: 
+43:     private static final long serialVersionUID = 7047317819789938957L;
+44: 
+45:     private static final Logger log = Logger.getLogger(EmployeeAction.class);
+46: 
+47:     private Long empId;
+48:     protected EmployeeDao employeeDao;
+49:     private Employee currentEmployee;
+50:     private List selectedSkills;
+51: 
+52:     public Long getEmpId() {
+53:         return empId;
+54:     }
+55: 
+56:     public void setEmpId(Long empId) {
+57:         this.empId = empId;
+58:     }
+59: 
+60:     public Employee getCurrentEmployee() {
+61:         return currentEmployee;
+62:     }
+63: 
+64:     public void setCurrentEmployee(Employee currentEmployee) {
+65:         this.currentEmployee = currentEmployee;
+66:     }
+67: 
+68:     public String[] getAvailablePositions() {
+69:         return TestDataProvider.POSITIONS;
+70:     }
+71: 
+72:     public List getAvailableLevels() {
+73:         return Arrays.asList(TestDataProvider.LEVELS);
+74:     }
+75: 
+76:     public List getSelectedSkills() {
+77:         return selectedSkills;
+78:     }
+79: 
+80:     public void setSelectedSkills(List selectedSkills) {
+81:         this.selectedSkills = selectedSkills;
+82:     }
+83: 
+84:     protected Dao getDao() {
+85:         return employeeDao;
+86:     }
+87: 
+88:     public void setEmployeeDao(EmployeeDao employeeDao) {
+89:         if (log.isDebugEnabled()) {
+90:             log.debug("JsfEmployeeAction - [setEmployeeDao]: employeeDao injected.");
+91:         }
+92:         this.employeeDao = employeeDao;
+93:     }
+94: 
+95:     /**
+96:      * This method is called to allow the action to prepare itself.
+97:      *
+98:      * @throws Exception thrown if a system level exception occurs.
+99:      */
+100:     public void prepare() throws Exception {
+101:         Employee preFetched = (Employee) fetch(getEmpId(), getCurrentEmployee());
+102:         if (preFetched != null) {
+103:             setCurrentEmployee(preFetched);
+104:         }
+105:     }
+106: 
+107:     public String execute() throws Exception {
+108:         if (getCurrentEmployee() != null && getCurrentEmployee().getOtherSkills() != null) {
+109:             setSelectedSkills(new ArrayList());
+110:             Iterator it = getCurrentEmployee().getOtherSkills().iterator();
+111:             while (it.hasNext()) {
+112:                 getSelectedSkills().add(((Skill) it.next()).getName());
+113:             }
+114:         }
+115:         return super.execute();
+116:     }
+117: 
+118:     public String save() throws Exception {
+119:         if (getCurrentEmployee() != null) {
+120:             setEmpId((Long) employeeDao.merge(getCurrentEmployee()));
+121:             employeeDao.setSkills(getEmpId(), getSelectedSkills());
+122:         }
+123:         return SUCCESS;
+124:     }
+125: 
+126: }
+
+
+ + +
+ + + +
+ +
+

+ View Sources +

+
+ +

+ +

+ + + Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1020471525.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1034897760.javascript URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1034897760.javascript?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1034897760.javascript (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1034897760.javascript Thu May 31 02:55:56 2007 @@ -0,0 +1,11 @@ + + + + +dojo.event.topic.publish("children_1"); +var d = document.getElementById("children_1"); +if (d.style.display != "none") { + d.style.display = "none"; +} else { + d.style.display = ""; +} Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1044304741.html URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1044304741.html?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1044304741.html (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1044304741.html Thu May 31 02:55:56 2007 @@ -0,0 +1,1040 @@ + + + + + + + + + + Action information + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + + + + + + +
+ + +
+
+

Action information

+
+
+

Action information - example5

+ + + + + + + + + + +
Action name:example5
Namespace:
Action class: org.apache.struts2.showcase.ajax.Example5Action
Action method:
Parameters:
Default location: + /struts2-showcase-2.0.6/example5.action + +
+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeParameters
inputorg.apache.struts2.dispatcher.ServletDispatcherResult + location = /ajax/tabbedpanel/example5.jsp
+
successorg.apache.struts2.dispatcher.ServletDispatcherResult + location = /ajax/tabbedpanel/example5Ok.jsp
+
+ + +
+
+
+ + + + +
+ +
+

+ View Sources +

+
+ +

+ +

+ + + Propchange: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1044304741.html ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1046565275.plain URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1046565275.plain?view=auto&rev=543102 ============================================================================== --- harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1046565275.plain (added) +++ harmony/enhanced/buildtest/branches/2.0/tests/struts_test/resources/showcase/file1046565275.plain Thu May 31 02:55:56 2007 @@ -0,0 +1,44 @@ +/* + * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.showcase.conversion; + +import java.util.LinkedHashSet; +import java.util.Set; + +import com.opensymphony.xwork2.ActionSupport; + +/** + * @version $Date$ $Id$ + */ +public class AddressAction extends ActionSupport { + + private Set addresses = new LinkedHashSet(); + + public Set getAddresses() { return addresses; } + public void setAddresses(Set addresses) { this.addresses = addresses; } + + + public String input() throws Exception { + return SUCCESS; + } + + public String submit() throws Exception { + System.out.println(addresses); + return SUCCESS; + } +}