Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43D36D09A for ; Fri, 19 Oct 2012 18:50:50 +0000 (UTC) Received: (qmail 88453 invoked by uid 500); 19 Oct 2012 18:50:49 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 88341 invoked by uid 500); 19 Oct 2012 18:50:49 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 88232 invoked by uid 99); 19 Oct 2012 18:50:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 18:50:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 18:50:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3838C2388B43 for ; Fri, 19 Oct 2012 18:50:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1400220 [1/9] - in /struts/struts2/trunk/apps/showcase: ./ src/main/java/org/apache/struts2/showcase/ src/main/java/org/apache/struts2/showcase/action/ src/main/java/org/apache/struts2/showcase/actionchaining/ src/main/java/org/apache/stru... Date: Fri, 19 Oct 2012 18:49:48 -0000 To: commits@struts.apache.org From: jogep@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121019185001.3838C2388B43@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jogep Date: Fri Oct 19 18:49:39 2012 New Revision: 1400220 URL: http://svn.apache.org/viewvc?rev=1400220&view=rev Log: WW-3900 Refactor the Struts2 Showcase Removed: struts/struts2/trunk/apps/showcase/src/main/webapp/continuations/ struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray-success.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList-success.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanMenu.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/validationExamplesStyles.css Modified: struts/struts2/trunk/apps/showcase/pom.xml struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/SkillAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain1.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain2.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/actionchaining/ActionChain3.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AjaxTestAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example4ShowPanelAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/Example5Action.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/Category.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/GetCategory.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/tree/Toggle.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/application/MemoryStorage.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/application/Storage.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/application/TestDataProvider.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatAuthenticationInterceptor.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatInterceptor.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLoginAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatLogoutAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatMessage.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatService.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatServiceImpl.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatSessionListener.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/Constants.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/CrudRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/DateConverter.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/EnterRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ExitRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/MessagesAvailableInRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/Room.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/User.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Address.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/EnumTypeConverter.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnum.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Person.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/AbstractDao.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/Dao.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/EmployeeDao.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/SkillDao.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/CreateException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DeleteException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DuplicateKeyException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/StorageException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/UpdateException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManagerUtil.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanConstants.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanException.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanService.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/PropertiesVocabSource.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Vocab.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/VocabSource.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/SaveGangsterAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/jsf/JsfEmployeeAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/model/Employee.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/model/IdEntity.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/model/Skill.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/Gangster.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/modelDriven/ModelDrivenAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/Person.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/PersonManager.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/package-info.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/source/ViewSourceAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actionPrefix/SubmitAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/actiontag/ActionTagDemo.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/AppendIteratorTagDemo.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/MergeIteratorTagDemo.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/tag/nonui/iteratortag/SubsetIteratorTagDemo.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/token/TokenAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/AbstractValidationActionSupport.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/NonFieldValidatorsExampleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/QuizAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/SubmitApplication.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/User.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/validation/VisitorValidatorsExampleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/LongProcessAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/xslt/JVMAction.java struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties struts/struts2/trunk/apps/showcase/src/main/resources/struts-fileupload.xml struts/struts2/trunk/apps/showcase/src/main/resources/struts-hangman.xml struts/struts2/trunk/apps/showcase/src/main/resources/struts-tags-non-ui.xml struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/applicationContext.xml struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/actionchaining/actionChainingResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/chat/chatLogin.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/chat/roomSelection.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/chat/showRoom.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/enterAddressInfo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/enterOperations.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/showAddressInfo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/showOperations.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/empmanager/editEmployee.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/empmanager/editSkill.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/empmanager/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/empmanager/listEmployees.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/empmanager/listSkills.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/filedownload/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/upload-success.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/fileupload/upload.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/freemarker/customFreemarkerManagerUsage.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/freemarker/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/freemarker/standardTags.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanAjax.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/hangman/hangmanNonAjax.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/help.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/integration/modelDriven.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/integration/modelDrivenResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/jsf/employee/edit.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/jsf/employee/list.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/modelDriven/modelDriven.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/modelDriven/modelDrivenResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/styles/main.css struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionTag/includedPage.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionTag/includedPage2.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionTag/includedPage3.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionTag/showActionTagDemo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/date.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/debug.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/ifTag/testIf.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/ifTag/testIf.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/iteratorGeneratorTagDemoResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/mergeIteratorTagDemoResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/showAppendIteratorTagDemo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/showIteratorGeneratorTagDemo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/showMergeIteratorTagDemo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/subsetIteratorTagDemo.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/iteratorTag/subsetIteratorTagDemoResult.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/actionTagExampleCalling.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/componentTagExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/exampleSubmited.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/exampleSubmited.vm struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/lotsOfOptiontransferselect.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/lotsOfOptiontransferselectSubmit.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/moreSelects.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/moreSelectsSubmit.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/timepicker/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleAjaxDynamic.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleDynamic.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/treeExampleStatic.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/body.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/header.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/tiles/layout.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/doublePost.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/example1.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/example2.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/example3.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/example4.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/token/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/token/transferDone.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/clientSideValidationExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/fieldValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/footer.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/nonFieldValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/quiz-ajax.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/quiz-basic.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/quiz-client-css.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/quiz-client.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/quiz-success.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestCancel.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestOk.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/successClientSideValidationExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/successFieldValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/successNonFieldValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/successVisitorValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/validation/visitorValidatorsExample.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/viewSource.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/complete.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/example1.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/example2.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/example3.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/wait/wait.jsp Modified: struts/struts2/trunk/apps/showcase/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/pom.xml?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/pom.xml (original) +++ struts/struts2/trunk/apps/showcase/pom.xml Fri Oct 19 18:49:39 2012 @@ -164,10 +164,11 @@ log4j log4j + 1.2.16 commons-logging - commons-logging + commons-logging org.apache.myfaces.core @@ -217,47 +218,35 @@ org.mortbay.jetty - maven-jetty-plugin - 6.0.1 + jetty-maven-plugin + 8.0.0.M2 + + + log4j.configuration + file:${basedir}/src/main/resources/log4j.properties + + + slf4j + false + + 10 + ${basedir}/src/main/webapp/ + + /struts2-showcase + ${basedir}/src/main/webapp/WEB-INF/web.xml + - org.apache.myfaces.core - myfaces-impl - 1.1.2 - - - org.apache.myfaces.core - myfaces-api - 1.1.2 - - log4j log4j - 1.2.9 + 1.2.16 - + maven-surefire-plugin @@ -283,13 +272,4 @@ - Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DateAction.java Fri Oct 19 18:49:39 2012 @@ -20,87 +20,84 @@ */ package org.apache.struts2.showcase; +import com.opensymphony.xwork2.ActionSupport; + import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; -import com.opensymphony.xwork2.ActionSupport; - /** * DateAction - * */ public class DateAction extends ActionSupport { - private static DateFormat DF = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); + private static DateFormat DF = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); - private Date now; - private Date past; - private Date future; - private Date after; - private Date before; - - - public String getDate() { - return DF.format(new Date()); - } - - - /** - * @return Returns the future. - */ - public Date getFuture() { - return future; - } - - /** - * @return Returns the now. - */ - public Date getNow() { - return now; - } - - /** - * @return Returns the past. - */ - public Date getPast() { - return past; - } - - /** - * - * @return Returns the before date. - */ - public Date getBefore() { - return before; - } - - /** - * - * @return Returns the after date. - */ - public Date getAfter() { - return after; - } - - /** - */ - public String browse() throws Exception { - Calendar cal = GregorianCalendar.getInstance(); - now = cal.getTime(); - cal.roll(Calendar.DATE, -1); - cal.roll(Calendar.HOUR, -3); - past = cal.getTime(); - cal.roll(Calendar.DATE, 2); - future = cal.getTime(); - - cal.roll(Calendar.YEAR, -1); - before = cal.getTime(); - - cal.roll(Calendar.YEAR, 2); - after = cal.getTime(); - return SUCCESS; - } + private Date now; + private Date past; + private Date future; + private Date after; + private Date before; + + + public String getDate() { + return DF.format(new Date()); + } + + + /** + * @return Returns the future. + */ + public Date getFuture() { + return future; + } + + /** + * @return Returns the now. + */ + public Date getNow() { + return now; + } + + /** + * @return Returns the past. + */ + public Date getPast() { + return past; + } + + /** + * @return Returns the before date. + */ + public Date getBefore() { + return before; + } + + /** + * @return Returns the after date. + */ + public Date getAfter() { + return after; + } + + /** + */ + public String browse() throws Exception { + Calendar cal = GregorianCalendar.getInstance(); + now = cal.getTime(); + cal.roll(Calendar.DATE, -1); + cal.roll(Calendar.HOUR, -3); + past = cal.getTime(); + cal.roll(Calendar.DATE, 2); + future = cal.getTime(); + + cal.roll(Calendar.YEAR, -1); + before = cal.getTime(); + + cal.roll(Calendar.YEAR, 2); + after = cal.getTime(); + return SUCCESS; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/DynamicTreeSelectAction.java Fri Oct 19 18:49:39 2012 @@ -20,35 +20,35 @@ */ package org.apache.struts2.showcase; -import org.apache.struts2.showcase.ajax.tree.Category; - import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.showcase.ajax.tree.Category; //START SNIPPET: treeExampleDynamicJavaSelected public class DynamicTreeSelectAction extends ActionSupport { - private long nodeId; - private Category currentCategory; + private long nodeId; + private Category currentCategory; + + public void setNodeId(long nodeId) { + this.nodeId = nodeId; + } - public void setNodeId(long nodeId) { - this.nodeId = nodeId; - } - public long getNodeId() { - return nodeId; - } + public long getNodeId() { + return nodeId; + } - public String execute() throws Exception { - currentCategory = Category.getById(nodeId); - return SUCCESS; - } + public String execute() throws Exception { + currentCategory = Category.getById(nodeId); + return SUCCESS; + } - public String getNodeName() { - return currentCategory != null ? currentCategory.getName() : "Node not found"; - } + public String getNodeName() { + return currentCategory != null ? currentCategory.getName() : "Node not found"; + } } //START SNIPPET: treeExampleDynamicJavaSelected Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfOptiontransferselectAction.java Fri Oct 19 18:49:39 2012 @@ -20,267 +20,261 @@ */ package org.apache.struts2.showcase; +import com.opensymphony.xwork2.ActionSupport; + +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.ArrayList; - -import com.opensymphony.xwork2.ActionSupport; /** */ public class LotsOfOptiontransferselectAction extends ActionSupport { - private List _favouriteCartoonCharactersKeys; - private List _notFavouriteCartoonCharactersKeys; - - private List _favouriteCarsKeys; - private List _notFavouriteCarsKeys; - - private List _favouriteMotorcyclesKeys; - private List _notFavouriteMotorcyclesKeys; - - private List _favouriteCountriesKeys; - private List _notFavouriteCountriesKeys; - - private List _favouriteSportsKeys; - private List _nonFavouriteSportsKeys; - - private List _favouriteCities; - - private List _prioritisedFavouriteCartoonCharacters; - private List _prioritisedFavouriteCars; - private List _prioritisedFavouriteCountries; - - - - // Cartoon Characters - public Map getDefaultFavouriteCartoonCharacters() { - Map m = new LinkedHashMap(); - m.put("heMan", "He-Man"); - m.put("popeye", "Popeye"); - m.put("mockeyMouse", "Mickey Mouse"); - return m; - } - - public Map getDefaultNotFavouriteCartoonCharacters() { - Map m = new LinkedHashMap(); - m.put("donaldDuck", "Donald Duck"); - m.put("atomicAnt", "Atomic Ant"); - m.put("pinkPainter", "Pink Painter"); - return m; - } - - public List getFavouriteCartoonCharacters() { - return _favouriteCartoonCharactersKeys; - } - - public void setFavouriteCartoonCharacters(List favouriteCartoonCharacters) { - _favouriteCartoonCharactersKeys = favouriteCartoonCharacters; - } - - public List getNotFavouriteCartoonCharacters() { - return _notFavouriteCartoonCharactersKeys; - } - - public void setNotFavouriteCartoonCharacters(List notFavouriteCartoonCharacters) { - _notFavouriteCartoonCharactersKeys = notFavouriteCartoonCharacters; - } - - + private List _favouriteCartoonCharactersKeys; + private List _notFavouriteCartoonCharactersKeys; + private List _favouriteCarsKeys; + private List _notFavouriteCarsKeys; + private List _favouriteMotorcyclesKeys; + private List _notFavouriteMotorcyclesKeys; - // Cars - public Map getDefaultFavouriteCars() { - Map m = new LinkedHashMap(); - m.put("alfaRomeo", "Alfa Romeo"); - m.put("Toyota", "Toyota"); - m.put("Mitsubitshi", "Mitsubitshi"); - return m; - } - - public Map getDefaultNotFavouriteCars() { - Map m = new LinkedHashMap(); - m.put("ford", "Ford"); - m.put("landRover", "Land Rover"); - m.put("mercedes", "Mercedes"); - return m; - } - - public List getFavouriteCars() { - return _favouriteCarsKeys; - } - - public void setFavouriteCars(List favouriteCars) { - _favouriteCarsKeys = favouriteCars; - } - - public List getNotFavouriteCars() { - return _notFavouriteCarsKeys; - } - - public void setNotFavouriteCars(List notFavouriteCars) { - _notFavouriteCarsKeys = notFavouriteCars; - } - - - - // Motorcycles - public Map getDefaultFavouriteMotorcycles() { - Map m = new LinkedHashMap(); - m.put("honda", "Honda"); - m.put("yamaha", "Yamaha"); - m.put("Aprillia", "Aprillia"); - return m; - } - - public Map getDefaultNotFavouriteMotorcycles() { - Map m = new LinkedHashMap(); - m.put("cagiva", "Cagiva"); - m.put("harleyDavidson", "Harley Davidson"); - m.put("suzuki", "Suzuki"); - return m; - } - - public List getFavouriteMotorcycles() { - return _favouriteMotorcyclesKeys; - } - - public void setFavouriteMotorcycles(List favouriteMotorcycles) { - _favouriteMotorcyclesKeys = favouriteMotorcycles; - } - - public List getNotFavouriteMotorcycles() { - return _notFavouriteMotorcyclesKeys; - } - - public void setNotFavouriteMotorcycles(List notFavouriteMotorcycles) { - _notFavouriteMotorcyclesKeys = notFavouriteMotorcycles; - } - - - - // Countries - public Map getDefaultFavouriteCountries() { - Map m = new LinkedHashMap(); - m.put("england", "England"); - m.put("america", "America"); - m.put("brazil", "Brazil"); - return m; - } - - public Map getDefaultNotFavouriteCountries() { - Map m = new LinkedHashMap(); - m.put("germany", "Germany"); - m.put("china", "China"); - m.put("russia", "Russia"); - return m; - } - - public List getFavouriteCountries() { - return _favouriteCountriesKeys; - } - - public void setFavouriteCountries(List favouriteCountries) { - _favouriteCountriesKeys = favouriteCountries; - } - - public List getNotFavouriteCountries() { - return _notFavouriteCountriesKeys; - } - - public void setNotFavouriteCountries(List notFavouriteCountries) { - _notFavouriteCountriesKeys = notFavouriteCountries; - } - - // Sports - public Map getDefaultNonFavoriteSports() { - Map m = new LinkedHashMap(); - m.put("basketball", "Basketball"); - m.put("football", "Football"); - m.put("baseball", "Baseball"); - return m; - } - - public Map getDefaultFavoriteSports() { - return new LinkedHashMap(); - } - - public List getFavouriteSports() { - return _favouriteSportsKeys; - } - - public void setFavouriteSports(List favouriteSportsKeys) { - this._favouriteSportsKeys = favouriteSportsKeys; - } - - public List getNonFavouriteSports() { - return _nonFavouriteSportsKeys; - } - - public void setNonFavouriteSports(List notFavouriteSportsKeys) { - this._nonFavouriteSportsKeys = notFavouriteSportsKeys; - } - - - - - public List getPrioritisedFavouriteCartoonCharacters() { - return _prioritisedFavouriteCartoonCharacters; - } - public void setPrioritisedFavouriteCartoonCharacters(List prioritisedFavouriteCartoonCharacters) { - _prioritisedFavouriteCartoonCharacters = prioritisedFavouriteCartoonCharacters; - } - - public List getPrioritisedFavouriteCars() { - return _prioritisedFavouriteCars; - } - public void setPrioritisedFavouriteCars(List prioritisedFavouriteCars) { - _prioritisedFavouriteCars = prioritisedFavouriteCars; - } - - - public List getPrioritisedFavouriteCountries() { - return _prioritisedFavouriteCountries; - } - public void setPrioritisedFavouriteCountries(List prioritisedFavouriteCountries) { - _prioritisedFavouriteCountries = prioritisedFavouriteCountries; - } - - - - public Map getAvailableCities() { - Map map = new LinkedHashMap(); - map.put("boston", "Boston"); - map.put("new york", "New York"); - map.put("london", "London"); - map.put("rome", "Rome"); - return map; - } - - public List getDefaultFavouriteCities() { - List list = new ArrayList(); - list.add("boston"); - list.add("rome"); - return list; - } - - public List getFavouriteCities() { - return _favouriteCities; - } - - public void setFavouriteCities(List favouriteCities) { - this._favouriteCities = favouriteCities; - } - - // actions - - public String input() throws Exception { - return SUCCESS; - } - - public String submit() throws Exception { - return SUCCESS; - } + private List _favouriteCountriesKeys; + private List _notFavouriteCountriesKeys; + + private List _favouriteSportsKeys; + private List _nonFavouriteSportsKeys; + + private List _favouriteCities; + + private List _prioritisedFavouriteCartoonCharacters; + private List _prioritisedFavouriteCars; + private List _prioritisedFavouriteCountries; + + + // Cartoon Characters + public Map getDefaultFavouriteCartoonCharacters() { + Map m = new LinkedHashMap(); + m.put("heMan", "He-Man"); + m.put("popeye", "Popeye"); + m.put("mockeyMouse", "Mickey Mouse"); + return m; + } + + public Map getDefaultNotFavouriteCartoonCharacters() { + Map m = new LinkedHashMap(); + m.put("donaldDuck", "Donald Duck"); + m.put("atomicAnt", "Atomic Ant"); + m.put("pinkPainter", "Pink Painter"); + return m; + } + + public List getFavouriteCartoonCharacters() { + return _favouriteCartoonCharactersKeys; + } + + public void setFavouriteCartoonCharacters(List favouriteCartoonCharacters) { + _favouriteCartoonCharactersKeys = favouriteCartoonCharacters; + } + + public List getNotFavouriteCartoonCharacters() { + return _notFavouriteCartoonCharactersKeys; + } + + public void setNotFavouriteCartoonCharacters(List notFavouriteCartoonCharacters) { + _notFavouriteCartoonCharactersKeys = notFavouriteCartoonCharacters; + } + + + // Cars + public Map getDefaultFavouriteCars() { + Map m = new LinkedHashMap(); + m.put("alfaRomeo", "Alfa Romeo"); + m.put("Toyota", "Toyota"); + m.put("Mitsubitshi", "Mitsubitshi"); + return m; + } + + public Map getDefaultNotFavouriteCars() { + Map m = new LinkedHashMap(); + m.put("ford", "Ford"); + m.put("landRover", "Land Rover"); + m.put("mercedes", "Mercedes"); + return m; + } + + public List getFavouriteCars() { + return _favouriteCarsKeys; + } + + public void setFavouriteCars(List favouriteCars) { + _favouriteCarsKeys = favouriteCars; + } + + public List getNotFavouriteCars() { + return _notFavouriteCarsKeys; + } + + public void setNotFavouriteCars(List notFavouriteCars) { + _notFavouriteCarsKeys = notFavouriteCars; + } + + + // Motorcycles + public Map getDefaultFavouriteMotorcycles() { + Map m = new LinkedHashMap(); + m.put("honda", "Honda"); + m.put("yamaha", "Yamaha"); + m.put("Aprillia", "Aprillia"); + return m; + } + + public Map getDefaultNotFavouriteMotorcycles() { + Map m = new LinkedHashMap(); + m.put("cagiva", "Cagiva"); + m.put("harleyDavidson", "Harley Davidson"); + m.put("suzuki", "Suzuki"); + return m; + } + + public List getFavouriteMotorcycles() { + return _favouriteMotorcyclesKeys; + } + + public void setFavouriteMotorcycles(List favouriteMotorcycles) { + _favouriteMotorcyclesKeys = favouriteMotorcycles; + } + + public List getNotFavouriteMotorcycles() { + return _notFavouriteMotorcyclesKeys; + } + + public void setNotFavouriteMotorcycles(List notFavouriteMotorcycles) { + _notFavouriteMotorcyclesKeys = notFavouriteMotorcycles; + } + + + // Countries + public Map getDefaultFavouriteCountries() { + Map m = new LinkedHashMap(); + m.put("england", "England"); + m.put("america", "America"); + m.put("brazil", "Brazil"); + return m; + } + + public Map getDefaultNotFavouriteCountries() { + Map m = new LinkedHashMap(); + m.put("germany", "Germany"); + m.put("china", "China"); + m.put("russia", "Russia"); + return m; + } + + public List getFavouriteCountries() { + return _favouriteCountriesKeys; + } + + public void setFavouriteCountries(List favouriteCountries) { + _favouriteCountriesKeys = favouriteCountries; + } + + public List getNotFavouriteCountries() { + return _notFavouriteCountriesKeys; + } + + public void setNotFavouriteCountries(List notFavouriteCountries) { + _notFavouriteCountriesKeys = notFavouriteCountries; + } + + // Sports + public Map getDefaultNonFavoriteSports() { + Map m = new LinkedHashMap(); + m.put("basketball", "Basketball"); + m.put("football", "Football"); + m.put("baseball", "Baseball"); + return m; + } + + public Map getDefaultFavoriteSports() { + return new LinkedHashMap(); + } + + public List getFavouriteSports() { + return _favouriteSportsKeys; + } + + public void setFavouriteSports(List favouriteSportsKeys) { + this._favouriteSportsKeys = favouriteSportsKeys; + } + + public List getNonFavouriteSports() { + return _nonFavouriteSportsKeys; + } + + public void setNonFavouriteSports(List notFavouriteSportsKeys) { + this._nonFavouriteSportsKeys = notFavouriteSportsKeys; + } + + + public List getPrioritisedFavouriteCartoonCharacters() { + return _prioritisedFavouriteCartoonCharacters; + } + + public void setPrioritisedFavouriteCartoonCharacters(List prioritisedFavouriteCartoonCharacters) { + _prioritisedFavouriteCartoonCharacters = prioritisedFavouriteCartoonCharacters; + } + + public List getPrioritisedFavouriteCars() { + return _prioritisedFavouriteCars; + } + + public void setPrioritisedFavouriteCars(List prioritisedFavouriteCars) { + _prioritisedFavouriteCars = prioritisedFavouriteCars; + } + + + public List getPrioritisedFavouriteCountries() { + return _prioritisedFavouriteCountries; + } + + public void setPrioritisedFavouriteCountries(List prioritisedFavouriteCountries) { + _prioritisedFavouriteCountries = prioritisedFavouriteCountries; + } + + + public Map getAvailableCities() { + Map map = new LinkedHashMap(); + map.put("boston", "Boston"); + map.put("new york", "New York"); + map.put("london", "London"); + map.put("rome", "Rome"); + return map; + } + + public List getDefaultFavouriteCities() { + List list = new ArrayList(); + list.add("boston"); + list.add("rome"); + return list; + } + + public List getFavouriteCities() { + return _favouriteCities; + } + + public void setFavouriteCities(List favouriteCities) { + this._favouriteCities = favouriteCities; + } + + // actions + + public String input() throws Exception { + return SUCCESS; + } + + public String submit() throws Exception { + return SUCCESS; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/LotsOfRichtexteditorAction.java Fri Oct 19 18:49:39 2012 @@ -27,52 +27,52 @@ import com.opensymphony.xwork2.ActionSup */ public class LotsOfRichtexteditorAction extends ActionSupport { - public String description1; - public String description2 = "This is Description 2"; - public String description3; - public String description4 = "This is Description 4"; + public String description1; + public String description2 = "This is Description 2"; + public String description3; + public String description4 = "This is Description 4"; - public String getDescription1() { - return this.description1; - } - public void setDescription1(String description1) { - this.description1 = description1; - } + public String getDescription1() { + return this.description1; + } + public void setDescription1(String description1) { + this.description1 = description1; + } - public String getDescription2() { - return this.description2; - } - public void setDescription2(String description2) { - this.description2 = description2; - } + public String getDescription2() { + return this.description2; + } - public String getDescription3() { - return this.description3; - } - public void setDescription3(String description3) { - this.description3 = description3; - } + public void setDescription2(String description2) { + this.description2 = description2; + } + public String getDescription3() { + return this.description3; + } + public void setDescription3(String description3) { + this.description3 = description3; + } - public String getDescription4() { - return this.description4; - } - public void setDescription4(String description4) { - this.description4 = description4; - } + public String getDescription4() { + return this.description4; + } + public void setDescription4(String description4) { + this.description4 = description4; + } - public String input() throws Exception { - return SUCCESS; - } + public String input() throws Exception { + return SUCCESS; + } - public String submit() throws Exception { - return SUCCESS; - } + public String submit() throws Exception { + return SUCCESS; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/MoreSelectsAction.java Fri Oct 19 18:49:39 2012 @@ -22,114 +22,115 @@ package org.apache.struts2.showcase; import com.opensymphony.xwork2.ActionSupport; +import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.LinkedHashMap; -import java.util.ArrayList; /** */ public class MoreSelectsAction extends ActionSupport { - private List _prioritisedFavouriteCartoonCharacters; - private List _prioritisedFavouriteCars; - private List _prioritisedFavouriteCountries; - private List favouriteNumbers; - - - // Cartoon Characters - public Map getDefaultFavouriteCartoonCharacters() { - Map m = new LinkedHashMap(); - m.put("heMan", "He-Man"); - m.put("popeye", "Popeye"); - m.put("mockeyMouse", "Mickey Mouse"); - return m; - } - - - // Cars - public Map getDefaultFavouriteCars() { - Map m = new LinkedHashMap(); - m.put("alfaRomeo", "Alfa Romeo"); - m.put("Toyota", "Toyota"); - m.put("Mitsubitshi", "Mitsubitshi"); - return m; - } - - - - // Countries - public Map getDefaultFavouriteCountries() { - Map m = new LinkedHashMap(); - m.put("england", "England"); - m.put("america", "America"); - m.put("brazil", "Brazil"); - return m; - } - - public List getDefaultFavouriteNumbers() { - List list = new ArrayList(); - list.add("Three"); - list.add("Seven"); - return list; - } - - - - public List getPrioritisedFavouriteCartoonCharacters() { - return _prioritisedFavouriteCartoonCharacters; - } - public void setPrioritisedFavouriteCartoonCharacters(List prioritisedFavouriteCartoonCharacters) { - _prioritisedFavouriteCartoonCharacters = prioritisedFavouriteCartoonCharacters; - } - - public List getPrioritisedFavouriteCars() { - return _prioritisedFavouriteCars; - } - public void setPrioritisedFavouriteCars(List prioritisedFavouriteCars) { - _prioritisedFavouriteCars = prioritisedFavouriteCars; - } - - - public List getPrioritisedFavouriteCountries() { - return _prioritisedFavouriteCountries; - } - public void setPrioritisedFavouriteCountries(List prioritisedFavouriteCountries) { - _prioritisedFavouriteCountries = prioritisedFavouriteCountries; - } - - public List getFavouriteNumbers() { - return favouriteNumbers; - } - - public void setFavouriteNumbers(List favouriteNumbers) { - this.favouriteNumbers = favouriteNumbers; - } - - public Map getAvailableCities() { - Map map = new LinkedHashMap(); - map.put("boston", "Boston"); - map.put("new york", "New York"); - map.put("london", "London"); - map.put("rome", "Rome"); - return map; - } - - public List getDefaultFavouriteCities() { - List list = new ArrayList(); - list.add("boston"); - list.add("rome"); - return list; - } - - // actions - - public String input() throws Exception { - return SUCCESS; - } - - public String submit() throws Exception { - return SUCCESS; - } + private List _prioritisedFavouriteCartoonCharacters; + private List _prioritisedFavouriteCars; + private List _prioritisedFavouriteCountries; + private List favouriteNumbers; + + + // Cartoon Characters + public Map getDefaultFavouriteCartoonCharacters() { + Map m = new LinkedHashMap(); + m.put("heMan", "He-Man"); + m.put("popeye", "Popeye"); + m.put("mockeyMouse", "Mickey Mouse"); + return m; + } + + + // Cars + public Map getDefaultFavouriteCars() { + Map m = new LinkedHashMap(); + m.put("alfaRomeo", "Alfa Romeo"); + m.put("Toyota", "Toyota"); + m.put("Mitsubitshi", "Mitsubitshi"); + return m; + } + + + // Countries + public Map getDefaultFavouriteCountries() { + Map m = new LinkedHashMap(); + m.put("england", "England"); + m.put("america", "America"); + m.put("brazil", "Brazil"); + return m; + } + + public List getDefaultFavouriteNumbers() { + List list = new ArrayList(); + list.add("Three"); + list.add("Seven"); + return list; + } + + + public List getPrioritisedFavouriteCartoonCharacters() { + return _prioritisedFavouriteCartoonCharacters; + } + + public void setPrioritisedFavouriteCartoonCharacters(List prioritisedFavouriteCartoonCharacters) { + _prioritisedFavouriteCartoonCharacters = prioritisedFavouriteCartoonCharacters; + } + + public List getPrioritisedFavouriteCars() { + return _prioritisedFavouriteCars; + } + + public void setPrioritisedFavouriteCars(List prioritisedFavouriteCars) { + _prioritisedFavouriteCars = prioritisedFavouriteCars; + } + + + public List getPrioritisedFavouriteCountries() { + return _prioritisedFavouriteCountries; + } + + public void setPrioritisedFavouriteCountries(List prioritisedFavouriteCountries) { + _prioritisedFavouriteCountries = prioritisedFavouriteCountries; + } + + public List getFavouriteNumbers() { + return favouriteNumbers; + } + + public void setFavouriteNumbers(List favouriteNumbers) { + this.favouriteNumbers = favouriteNumbers; + } + + public Map getAvailableCities() { + Map map = new LinkedHashMap(); + map.put("boston", "Boston"); + map.put("new york", "New York"); + map.put("london", "London"); + map.put("rome", "Rome"); + return map; + } + + public List getDefaultFavouriteCities() { + List list = new ArrayList(); + list.add("boston"); + list.add("rome"); + return list; + } + + // actions + + public String input() throws Exception { + return SUCCESS; + } + + public String submit() throws Exception { + return SUCCESS; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java Fri Oct 19 18:49:39 2012 @@ -20,22 +20,21 @@ */ package org.apache.struts2.showcase; -import org.apache.struts2.showcase.ajax.tree.Category; - import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.showcase.ajax.tree.Category; public class ShowAjaxDynamicTreeAction extends ActionSupport { - private int nodeId = 1; - - public Category getCategory() { - return Category.getById(nodeId); - } - - public int getNodeId() { - return nodeId; - } + private int nodeId = 1; - public void setNodeId(int nodeId) { - this.nodeId = nodeId; - } + public Category getCategory() { + return Category.getById(nodeId); + } + + public int getNodeId() { + return nodeId; + } + + public void setNodeId(int nodeId) { + this.nodeId = nodeId; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowDynamicTreeAction.java Fri Oct 19 18:49:39 2012 @@ -20,17 +20,16 @@ */ package org.apache.struts2.showcase; -import org.apache.struts2.showcase.ajax.tree.Category; - import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.showcase.ajax.tree.Category; // START SNIPPET: treeExampleDynamicJavaShow public class ShowDynamicTreeAction extends ActionSupport { - public Category getTreeRootNode() { - return Category.getById(1); - } + public Category getTreeRootNode() { + return Category.getById(1); + } } // END SNIPPET: treeExampleDynamicJavaShow Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java Fri Oct 19 18:49:39 2012 @@ -32,306 +32,318 @@ import java.util.*; */ public class UITagExample extends ActionSupport implements Validateable { - private static final long serialVersionUID = -94044809860988047L; + private static final long serialVersionUID = -94044809860988047L; - String name; - Date birthday; - Date wakeup; - String bio; - String favouriteColor; - List friends; - String bestFriend; - boolean legalAge; - String state; - String region; - File picture; - String pictureContentType; - String pictureFileName; - String favouriteLanguage; - String favouriteVehicalType = "MotorcycleKey"; - String favouriteVehicalSpecific = "YamahaKey"; - - List leftSideCartoonCharacters; - List rightSideCartoonCharacters; - - List favouriteLanguages = new ArrayList(); - List vehicalTypeList = new ArrayList(); - Map vehicalSpecificMap = new HashMap(); - - String thoughts; - - public UITagExample() { - favouriteLanguages.add(new Language("EnglishKey", "English Language", "color: blue; font-style: italic;")); - favouriteLanguages.add(new Language("FrenchKey", "French Language", "color: grey;")); - favouriteLanguages.add(new Language("SpanishKey", "Spanish Language", "color: red; font-wight: bold;")); - - VehicalType car = new VehicalType("CarKey", "Car"); - VehicalType motorcycle = new VehicalType("MotorcycleKey", "Motorcycle"); - vehicalTypeList.add(car); - vehicalTypeList.add(motorcycle); - - List cars = new ArrayList(); - cars.add(new VehicalSpecific("MercedesKey", "Mercedes")); - cars.add(new VehicalSpecific("HondaKey", "Honda")); - cars.add(new VehicalSpecific("FordKey", "Ford")); - - List motorcycles = new ArrayList(); - motorcycles.add(new VehicalSpecific("SuzukiKey", "Suzuki")); - motorcycles.add(new VehicalSpecific("YamahaKey", "Yamaha")); - - vehicalSpecificMap.put(car, cars); - vehicalSpecificMap.put(motorcycle, motorcycles); - } - - - - public List getLeftSideCartoonCharacters() { - return leftSideCartoonCharacters; - } - public void setLeftSideCartoonCharacters(List leftSideCartoonCharacters) { - this.leftSideCartoonCharacters = leftSideCartoonCharacters; - } - - - public List getRightSideCartoonCharacters() { - return rightSideCartoonCharacters; - } - public void setRightSideCartoonCharacters(List rightSideCartoonCharacters) { - this.rightSideCartoonCharacters = rightSideCartoonCharacters; - } - - - public String getFavouriteVehicalType() { - return favouriteVehicalType; - } - - public void setFavouriteVehicalType(String favouriteVehicalType) { - this.favouriteVehicalType = favouriteVehicalType; - } - - public String getFavouriteVehicalSpecific() { - return favouriteVehicalSpecific; - } - - public void setFavouriteVehicalSpecific(String favouriteVehicalSpecific) { - this.favouriteVehicalSpecific = favouriteVehicalSpecific; - } - - public List getVehicalTypeList() { - return vehicalTypeList; - } - - public List getVehicalSpecificList() { - ValueStack stack = ServletActionContext.getValueStack(ServletActionContext.getRequest()); - Object vehicalType = stack.findValue("top"); - if (vehicalType != null && vehicalType instanceof VehicalType) { - List l = (List) vehicalSpecificMap.get(vehicalType); - return l; - } - return Collections.EMPTY_LIST; - } - - public List getFavouriteLanguages() { - return favouriteLanguages; - } - - public String execute() throws Exception { - return SUCCESS; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Date getBirthday() { - return birthday; - } - - public void setBirthday(Date birthday) { - this.birthday = birthday; - } - - public String getBio() { - return bio; - } - - public void setBio(String bio) { - this.bio = bio; - } - - public String getFavouriteColor() { - return favouriteColor; - } - - public void setFavouriteColor(String favoriteColor) { - this.favouriteColor = favoriteColor; - } - - public List getFriends() { - return friends; - } - - public void setFriends(List friends) { - this.friends = friends; - } - - public String getBestFriend() { - return bestFriend; - } - - public void setBestFriend(String bestFriend) { - this.bestFriend = bestFriend; - } - - public boolean isLegalAge() { - return legalAge; - } - - public void setLegalAge(boolean legalAge) { - this.legalAge = legalAge; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getRegion() { - return region; - } - - public void setRegion(String region) { - this.region = region; - } - - public void setPicture(File picture) { - this.picture = picture; - } - - public File getPicture() { - return this.picture; - } - - public void setPictureContentType(String pictureContentType) { - this.pictureContentType = pictureContentType; - } - - public void setPictureFileName(String pictureFileName) { - this.pictureFileName = pictureFileName; - } - - public void setFavouriteLanguage(String favouriteLanguage) { - this.favouriteLanguage = favouriteLanguage; - } - - public String getFavouriteLanguage() { - return favouriteLanguage; - } - - - public void setThoughts(String thoughts) { - this.thoughts = thoughts; - } - - public String getThoughts() { - return this.thoughts; - } - - public Date getWakeup() { - return wakeup; - } - - public void setWakeup(Date wakeup) { - this.wakeup = wakeup; - } - - public String doSubmit() { - return SUCCESS; - } - - - - // === inner class - public static class Language { - String description; - String key; - String style; - - public Language(String key, String description, String style) { - this.key = key; - this.description = description; - this.style = style; - } - - public String getKey() { - return key; - } - public String getDescription() { - return description; - } - public String getStyle() { - return style; - } - - } - - - public static class VehicalType { - String key; - String description; - public VehicalType(String key, String description) { - this.key = key; - this.description = description; - } - - public String getKey() { return this.key; } - public String getDescription() { return this.description; } - - public boolean equals(Object obj) { - if (! (obj instanceof VehicalType)) { - return false; - } - else { - return key.equals(((VehicalType)obj).getKey()); - } - } - - public int hashCode() { - return key.hashCode(); - } - } - - - public static class VehicalSpecific { - String key; - String description; - public VehicalSpecific(String key, String description) { - this.key = key; - this.description = description; - } - - public String getKey() { return this.key; } - public String getDescription() { return this.description; } - - public boolean equals(Object obj) { - if (! (obj instanceof VehicalSpecific)) { - return false; - } - else { - return key.equals(((VehicalSpecific)obj).getKey()); - } - } - - public int hashCode() { - return key.hashCode(); - } - } + String name; + Date birthday; + Date wakeup; + String bio; + String favouriteColor; + List friends; + String bestFriend; + boolean legalAge; + String state; + String region; + File picture; + String pictureContentType; + String pictureFileName; + String favouriteLanguage; + String favouriteVehicalType = "MotorcycleKey"; + String favouriteVehicalSpecific = "YamahaKey"; + + List leftSideCartoonCharacters; + List rightSideCartoonCharacters; + + List favouriteLanguages = new ArrayList(); + List vehicalTypeList = new ArrayList(); + Map vehicalSpecificMap = new HashMap(); + + String thoughts; + + public UITagExample() { + favouriteLanguages.add(new Language("EnglishKey", "English Language", "color: blue; font-style: italic;")); + favouriteLanguages.add(new Language("FrenchKey", "French Language", "color: grey;")); + favouriteLanguages.add(new Language("SpanishKey", "Spanish Language", "color: red; font-wight: bold;")); + + VehicalType car = new VehicalType("CarKey", "Car"); + VehicalType motorcycle = new VehicalType("MotorcycleKey", "Motorcycle"); + vehicalTypeList.add(car); + vehicalTypeList.add(motorcycle); + + List cars = new ArrayList(); + cars.add(new VehicalSpecific("MercedesKey", "Mercedes")); + cars.add(new VehicalSpecific("HondaKey", "Honda")); + cars.add(new VehicalSpecific("FordKey", "Ford")); + + List motorcycles = new ArrayList(); + motorcycles.add(new VehicalSpecific("SuzukiKey", "Suzuki")); + motorcycles.add(new VehicalSpecific("YamahaKey", "Yamaha")); + + vehicalSpecificMap.put(car, cars); + vehicalSpecificMap.put(motorcycle, motorcycles); + } + + + public List getLeftSideCartoonCharacters() { + return leftSideCartoonCharacters; + } + + public void setLeftSideCartoonCharacters(List leftSideCartoonCharacters) { + this.leftSideCartoonCharacters = leftSideCartoonCharacters; + } + + + public List getRightSideCartoonCharacters() { + return rightSideCartoonCharacters; + } + + public void setRightSideCartoonCharacters(List rightSideCartoonCharacters) { + this.rightSideCartoonCharacters = rightSideCartoonCharacters; + } + + + public String getFavouriteVehicalType() { + return favouriteVehicalType; + } + + public void setFavouriteVehicalType(String favouriteVehicalType) { + this.favouriteVehicalType = favouriteVehicalType; + } + + public String getFavouriteVehicalSpecific() { + return favouriteVehicalSpecific; + } + + public void setFavouriteVehicalSpecific(String favouriteVehicalSpecific) { + this.favouriteVehicalSpecific = favouriteVehicalSpecific; + } + + public List getVehicalTypeList() { + return vehicalTypeList; + } + + public List getVehicalSpecificList() { + ValueStack stack = ServletActionContext.getValueStack(ServletActionContext.getRequest()); + Object vehicalType = stack.findValue("top"); + if (vehicalType != null && vehicalType instanceof VehicalType) { + List l = (List) vehicalSpecificMap.get(vehicalType); + return l; + } + return Collections.EMPTY_LIST; + } + + public List getFavouriteLanguages() { + return favouriteLanguages; + } + + public String execute() throws Exception { + return SUCCESS; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Date getBirthday() { + return birthday; + } + + public void setBirthday(Date birthday) { + this.birthday = birthday; + } + + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + public String getFavouriteColor() { + return favouriteColor; + } + + public void setFavouriteColor(String favoriteColor) { + this.favouriteColor = favoriteColor; + } + + public List getFriends() { + return friends; + } + + public void setFriends(List friends) { + this.friends = friends; + } + + public String getBestFriend() { + return bestFriend; + } + + public void setBestFriend(String bestFriend) { + this.bestFriend = bestFriend; + } + + public boolean isLegalAge() { + return legalAge; + } + + public void setLegalAge(boolean legalAge) { + this.legalAge = legalAge; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public void setPicture(File picture) { + this.picture = picture; + } + + public File getPicture() { + return this.picture; + } + + public void setPictureContentType(String pictureContentType) { + this.pictureContentType = pictureContentType; + } + + public void setPictureFileName(String pictureFileName) { + this.pictureFileName = pictureFileName; + } + + public void setFavouriteLanguage(String favouriteLanguage) { + this.favouriteLanguage = favouriteLanguage; + } + + public String getFavouriteLanguage() { + return favouriteLanguage; + } + + + public void setThoughts(String thoughts) { + this.thoughts = thoughts; + } + + public String getThoughts() { + return this.thoughts; + } + + public Date getWakeup() { + return wakeup; + } + + public void setWakeup(Date wakeup) { + this.wakeup = wakeup; + } + + public String doSubmit() { + return SUCCESS; + } + + + // === inner class + public static class Language { + String description; + String key; + String style; + + public Language(String key, String description, String style) { + this.key = key; + this.description = description; + this.style = style; + } + + public String getKey() { + return key; + } + + public String getDescription() { + return description; + } + + public String getStyle() { + return style; + } + + } + + + public static class VehicalType { + String key; + String description; + + public VehicalType(String key, String description) { + this.key = key; + this.description = description; + } + + public String getKey() { + return this.key; + } + + public String getDescription() { + return this.description; + } + + public boolean equals(Object obj) { + if (!(obj instanceof VehicalType)) { + return false; + } else { + return key.equals(((VehicalType) obj).getKey()); + } + } + + public int hashCode() { + return key.hashCode(); + } + } + + + public static class VehicalSpecific { + String key; + String description; + + public VehicalSpecific(String key, String description) { + this.key = key; + this.description = description; + } + + public String getKey() { + return this.key; + } + + public String getDescription() { + return this.description; + } + + public boolean equals(Object obj) { + if (!(obj instanceof VehicalSpecific)) { + return false; + } else { + return key.equals(((VehicalSpecific) obj).getKey()); + } + } + + public int hashCode() { + return key.hashCode(); + } + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java Fri Oct 19 18:49:39 2012 @@ -20,78 +20,76 @@ */ package org.apache.struts2.showcase.action; -import java.io.Serializable; -import java.util.Collection; - +import com.opensymphony.xwork2.ActionSupport; import org.apache.log4j.Logger; import org.apache.struts2.showcase.dao.Dao; import org.apache.struts2.showcase.model.IdEntity; -import com.opensymphony.xwork2.ActionSupport; +import java.io.Serializable; +import java.util.Collection; /** * AbstractCRUDAction. - * */ public abstract class AbstractCRUDAction extends ActionSupport { - private static final Logger log = Logger.getLogger(AbstractCRUDAction.class); + private static final Logger log = Logger.getLogger(AbstractCRUDAction.class); - private Collection availableItems; - private String[] toDelete; + private Collection availableItems; + private String[] toDelete; - protected abstract Dao getDao(); + protected abstract Dao getDao(); - public Collection getAvailableItems() { - return availableItems; - } - - public String[] getToDelete() { - return toDelete; - } - - public void setToDelete(String[] toDelete) { - this.toDelete = toDelete; - } - - public String list() throws Exception { - this.availableItems = getDao().findAll(); - if (log.isDebugEnabled()) { - log.debug("AbstractCRUDAction - [list]: " + (availableItems !=null?""+availableItems.size():"no") + " items found"); - } - return execute(); - } - - public String delete() throws Exception { - if (toDelete != null) { - int count=0; - for (int i = 0, j=toDelete.length; i < j; i++) { - count = count + getDao().delete(toDelete[i]); - } - if (log.isDebugEnabled()) { - log.debug("AbstractCRUDAction - [delete]: " + count + " items deleted."); - } - } - return SUCCESS; - } - - /** - * Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle. - * - * @param tryId The id to try to get persistent object for - * @param tryObject The object, induced by first params invocation, possibly containing id to try to get persistent - * object for - * @return The persistent object, if found. null otherwise. - */ - protected IdEntity fetch(Serializable tryId, IdEntity tryObject) { - IdEntity result = null; - if (tryId != null) { - result = getDao().get(tryId); - } else if (tryObject != null) { - result = getDao().get(tryObject.getId()); - } - return result; - } + public Collection getAvailableItems() { + return availableItems; + } + + public String[] getToDelete() { + return toDelete; + } + + public void setToDelete(String[] toDelete) { + this.toDelete = toDelete; + } + + public String list() throws Exception { + this.availableItems = getDao().findAll(); + if (log.isDebugEnabled()) { + log.debug("AbstractCRUDAction - [list]: " + (availableItems != null ? "" + availableItems.size() : "no") + " items found"); + } + return execute(); + } + + public String delete() throws Exception { + if (toDelete != null) { + int count = 0; + for (int i = 0, j = toDelete.length; i < j; i++) { + count = count + getDao().delete(toDelete[i]); + } + if (log.isDebugEnabled()) { + log.debug("AbstractCRUDAction - [delete]: " + count + " items deleted."); + } + } + return SUCCESS; + } + + /** + * Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle. + * + * @param tryId The id to try to get persistent object for + * @param tryObject The object, induced by first params invocation, possibly containing id to try to get persistent + * object for + * @return The persistent object, if found. null otherwise. + */ + protected IdEntity fetch(Serializable tryId, IdEntity tryObject) { + IdEntity result = null; + if (tryId != null) { + result = getDao().get(tryId); + } else if (tryObject != null) { + result = getDao().get(tryObject.getId()); + } + return result; + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/EmployeeAction.java Fri Oct 19 18:49:39 2012 @@ -20,19 +20,19 @@ */ package org.apache.struts2.showcase.action; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - +import com.opensymphony.xwork2.Preparable; import org.apache.log4j.Logger; import org.apache.struts2.showcase.application.TestDataProvider; import org.apache.struts2.showcase.dao.Dao; import org.apache.struts2.showcase.dao.EmployeeDao; import org.apache.struts2.showcase.model.Employee; import org.apache.struts2.showcase.model.Skill; +import org.springframework.beans.factory.annotation.Autowired; -import com.opensymphony.xwork2.Preparable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; /** * JsfEmployeeAction. @@ -40,87 +40,82 @@ import com.opensymphony.xwork2.Preparabl public class EmployeeAction extends AbstractCRUDAction implements Preparable { - private static final long serialVersionUID = 7047317819789938957L; + private static final long serialVersionUID = 7047317819789938957L; + + private static final Logger log = Logger.getLogger(EmployeeAction.class); - private static final Logger log = Logger.getLogger(EmployeeAction.class); + @Autowired + private EmployeeDao employeeDao; - private Long empId; - protected EmployeeDao employeeDao; - private Employee currentEmployee; - private List selectedSkills; - - public Long getEmpId() { - return empId; - } - - public void setEmpId(Long empId) { - this.empId = empId; - } - - public Employee getCurrentEmployee() { - return currentEmployee; - } - - public void setCurrentEmployee(Employee currentEmployee) { - this.currentEmployee = currentEmployee; - } - - public String[] getAvailablePositions() { - return TestDataProvider.POSITIONS; - } - - public List getAvailableLevels() { - return Arrays.asList(TestDataProvider.LEVELS); - } - - public List getSelectedSkills() { - return selectedSkills; - } - - public void setSelectedSkills(List selectedSkills) { - this.selectedSkills = selectedSkills; - } - - protected Dao getDao() { - return employeeDao; - } - - public void setEmployeeDao(EmployeeDao employeeDao) { - if (log.isDebugEnabled()) { - log.debug("JsfEmployeeAction - [setEmployeeDao]: employeeDao injected."); - } - this.employeeDao = employeeDao; - } - - /** - * This method is called to allow the action to prepare itself. - * - * @throws Exception thrown if a system level exception occurs. - */ - public void prepare() throws Exception { - Employee preFetched = (Employee) fetch(getEmpId(), getCurrentEmployee()); - if (preFetched != null) { - setCurrentEmployee(preFetched); - } - } - - public String execute() throws Exception { - if (getCurrentEmployee() != null && getCurrentEmployee().getOtherSkills() != null) { - setSelectedSkills(new ArrayList()); - Iterator it = getCurrentEmployee().getOtherSkills().iterator(); - while (it.hasNext()) { - getSelectedSkills().add(((Skill) it.next()).getName()); - } - } - return super.execute(); - } - - public String save() throws Exception { - if (getCurrentEmployee() != null) { - setEmpId((Long) employeeDao.merge(getCurrentEmployee())); - employeeDao.setSkills(getEmpId(), getSelectedSkills()); - } - return SUCCESS; - } + private Long empId; + private Employee currentEmployee; + private List selectedSkills; + + public String execute() throws Exception { + if (getCurrentEmployee() != null && getCurrentEmployee().getOtherSkills() != null) { + setSelectedSkills(new ArrayList()); + Iterator it = getCurrentEmployee().getOtherSkills().iterator(); + while (it.hasNext()) { + getSelectedSkills().add(((Skill) it.next()).getName()); + } + } + return super.execute(); + } + + public String save() throws Exception { + if (getCurrentEmployee() != null) { + setEmpId((Long) employeeDao.merge(getCurrentEmployee())); + employeeDao.setSkills(getEmpId(), getSelectedSkills()); + } + return SUCCESS; + } + + public Long getEmpId() { + return empId; + } + + public void setEmpId(Long empId) { + this.empId = empId; + } + + public Employee getCurrentEmployee() { + return currentEmployee; + } + + public void setCurrentEmployee(Employee currentEmployee) { + this.currentEmployee = currentEmployee; + } + + public String[] getAvailablePositions() { + return TestDataProvider.POSITIONS; + } + + public List getAvailableLevels() { + return Arrays.asList(TestDataProvider.LEVELS); + } + + public List getSelectedSkills() { + return selectedSkills; + } + + public void setSelectedSkills(List selectedSkills) { + this.selectedSkills = selectedSkills; + } + + protected Dao getDao() { + return employeeDao; + } + + /** + * This method is called to allow the action to prepare itself. + * + * @throws Exception thrown if a system level exception occurs. + */ + public void prepare() throws Exception { + Employee preFetched = (Employee) fetch(getEmpId(), getCurrentEmployee()); + if (preFetched != null) { + setCurrentEmployee(preFetched); + } + } } Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java Fri Oct 19 18:49:39 2012 @@ -20,69 +20,65 @@ */ package org.apache.struts2.showcase.action; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import com.opensymphony.xwork2.ActionSupport; +import java.util.*; + public class ExampleAction extends ActionSupport { - public static final String CONSTANT = "Struts Rocks!"; - - public static Date getCurrentDate() { - return new Date(); - } - - public String getName() { - return "John Galt"; - } - - public String[] getBands() { - return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" }; - } - - public List getMovies() { - return Arrays.asList("Lord of the Rings", "Matrix"); - } - - public Book getBook() { - return new Book("Iliad", "Homer"); - } - - public Map getBooks() { - Map books = new HashMap(); - books.put("Iliad", new Book("Iliad", "Homer")); - books.put("The Republic", new Book("The Replublic", "Plato")); - books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra", - "Friedrich Nietzsche")); - return books; - } + public static final String CONSTANT = "Struts Rocks!"; + + public static Date getCurrentDate() { + return new Date(); + } + + public String getName() { + return "John Galt"; + } + + public String[] getBands() { + return new String[]{"Pink Floyd", "Metallica", "Guns & Roses"}; + } + + public List getMovies() { + return Arrays.asList("Lord of the Rings", "Matrix"); + } + + public Book getBook() { + return new Book("Iliad", "Homer"); + } + + public Map getBooks() { + Map books = new HashMap(); + books.put("Iliad", new Book("Iliad", "Homer")); + books.put("The Republic", new Book("The Replublic", "Plato")); + books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra", + "Friedrich Nietzsche")); + return books; + } } class Book { - private String title; - private String author; + private String title; + private String author; - public Book(String title, String author) { - this.title = title; - this.author = author; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } + public Book(String title, String author) { + this.title = title; + this.author = author; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } } \ No newline at end of file