From ffe0e20edd9d5386f4410fddd970286a69373243 Mon Sep 17 00:00:00 2001 From: Johannes Geppert Date: Mon, 25 May 2015 12:11:59 +0200 Subject: [PATCH] Cleanup struts2 showcase after removing of deprecated plugins - Remove struts1 integration example - Remove JSF integration example - Remove all references to dojo plugin --- apps/showcase/pom.xml | 16 - .../integration/EditGangsterAction.java | 44 -- .../showcase/integration/GangsterForm.java | 115 ---- .../integration/SaveGangsterAction.java | 46 -- .../showcase/jsf/JsfEmployeeAction.java | 115 ---- .../ajax/Example5Action-validation.xml | 19 - .../ChatLoginAction-chatLogin-validation.xml | 14 - .../chat/ChatMessage-conversion.properties | 1 - .../CrudRoomAction-createRoom-validation.xml | 20 - .../showcase/chat/Room-conversion.properties | 1 - ...oomAction-sendMessageToRoom-validation.xml | 15 - .../src/main/resources/struts-ajax.xml | 114 ---- .../src/main/resources/struts-chat.xml | 135 ----- .../src/main/resources/struts-integration.xml | 47 -- .../src/main/resources/struts-jsf.xml | 44 -- apps/showcase/src/main/resources/struts.xml | 8 - .../main/webapp/WEB-INF/ajax/AjaxResult.jsp | 12 - .../main/webapp/WEB-INF/ajax/AjaxResult2.js | 2 - .../main/webapp/WEB-INF/ajax/AjaxResult3.jsp | 12 - .../WEB-INF/ajax/autocompleter/index.jsp | 186 ------- .../main/webapp/WEB-INF/ajax/bind/index.jsp | 61 --- .../webapp/WEB-INF/ajax/commonInclude.jsp | 5 - .../src/main/webapp/WEB-INF/ajax/footer.jsp | 8 - .../src/main/webapp/WEB-INF/ajax/options.ftl | 5 - .../WEB-INF/ajax/remotebutton/index.jsp | 70 --- .../WEB-INF/ajax/remotediv/example1.jsp | 23 - .../WEB-INF/ajax/remotediv/example10.jsp | 31 -- .../WEB-INF/ajax/remotediv/example2.jsp | 28 - .../WEB-INF/ajax/remotediv/example3.jsp | 27 - .../WEB-INF/ajax/remotediv/example4.jsp | 28 - .../WEB-INF/ajax/remotediv/example5.jsp | 27 - .../WEB-INF/ajax/remotediv/example6.jsp | 24 - .../WEB-INF/ajax/remotediv/example7.jsp | 27 - .../WEB-INF/ajax/remotediv/example8.jsp | 57 -- .../WEB-INF/ajax/remotediv/example9.jsp | 63 --- .../webapp/WEB-INF/ajax/remotediv/index.jsp | 55 -- .../webapp/WEB-INF/ajax/remoteforms/index.jsp | 119 ----- .../webapp/WEB-INF/ajax/remotelink/index.jsp | 127 ----- .../WEB-INF/ajax/tabbedpanel/example1.jsp | 95 ---- .../WEB-INF/ajax/tabbedpanel/example2.jsp | 26 - .../WEB-INF/ajax/tabbedpanel/example3.jsp | 46 -- .../WEB-INF/ajax/tabbedpanel/example4.jsp | 57 -- .../WEB-INF/ajax/tabbedpanel/example5.jsp | 29 - .../WEB-INF/ajax/tabbedpanel/example5Ok.jsp | 9 - .../WEB-INF/ajax/tabbedpanel/example6.jsp | 40 -- .../webapp/WEB-INF/ajax/tabbedpanel/index.jsp | 28 - .../ajax/tabbedpanel/nodecorate/panel1.ftl | 3 - .../ajax/tabbedpanel/nodecorate/panel2.ftl | 7 - .../tabbedpanel/nodecorate/panel2Submit.ftl | 2 - .../ajax/tabbedpanel/nodecorate/panel3.ftl | 9 - .../tabbedpanel/nodecorate/panel3Submit.ftl | 2 - .../src/main/webapp/WEB-INF/ajax/testjs.jsp | 14 - .../webapp/WEB-INF/ajax/tree/getCategory.jsp | 23 - .../WEB-INF/ajax/tree/partialChunkHeader.jsp | 6 - .../main/webapp/WEB-INF/ajax/tree/toggle.jsp | 12 - .../main/webapp/WEB-INF/ajax/tree/tree.jsp | 13 - .../webapp/WEB-INF/ajax/widgets/index.jsp | 40 -- .../main/webapp/WEB-INF/chat/chatLogin.ftl | 27 - .../main/webapp/WEB-INF/chat/createRoom.ftl | 2 - .../src/main/webapp/WEB-INF/chat/index.jsp | 3 - .../WEB-INF/chat/messagesAvailableInRoom.ftl | 33 -- .../webapp/WEB-INF/chat/roomSelection.ftl | 172 ------ .../webapp/WEB-INF/chat/roomsAvailable.ftl | 44 -- .../WEB-INF/chat/sendMessageToRoomResult.ftl | 2 - .../src/main/webapp/WEB-INF/chat/showRoom.ftl | 167 ------ .../webapp/WEB-INF/chat/usersAvailable.ftl | 6 - .../WEB-INF/chat/usersAvailableInRoom.ftl | 8 - .../src/main/webapp/WEB-INF/decorators.xml | 10 - .../main/webapp/WEB-INF/decorators/main.jsp | 504 +++++++++--------- .../WEB-INF/empmanager/editEmployee.jsp | 3 +- .../webapp/WEB-INF/hangman/hangmanAjax.ftl | 247 --------- .../WEB-INF/integration/modelDriven.jsp | 44 -- .../WEB-INF/integration/modelDrivenResult.jsp | 43 -- .../main/webapp/WEB-INF/interactive/demo.jsp | 0 .../WEB-INF/interactive/example-action.jsp | 76 --- .../main/webapp/WEB-INF/interactive/index.jsp | 241 --------- .../main/webapp/WEB-INF/interactive/jsp_0.jsp | 62 --- .../main/webapp/WEB-INF/interactive/jsp_1.jsp | 52 -- .../main/webapp/WEB-INF/interactive/jsp_2.jsp | 54 -- .../main/webapp/WEB-INF/interactive/jsp_3.jsp | 65 --- .../main/webapp/WEB-INF/interactive/jsp_4.jsp | 16 - .../webapp/WEB-INF/interactive/ognl_0.jsp | 30 -- .../webapp/WEB-INF/interactive/ognl_1.jsp | 28 - .../webapp/WEB-INF/interactive/ognl_2.jsp | 43 -- .../webapp/WEB-INF/interactive/ognl_3.jsp | 54 -- .../webapp/WEB-INF/interactive/ognl_4.jsp | 32 -- .../webapp/WEB-INF/interactive/ognl_5.jsp | 25 - .../webapp/WEB-INF/interactive/ognl_6.jsp | 43 -- .../webapp/WEB-INF/interactive/ognl_7.jsp | 55 -- .../webapp/WEB-INF/interactive/ognl_8.jsp | 18 - .../main/webapp/WEB-INF/jsf/employee/edit.jsp | 113 ---- .../main/webapp/WEB-INF/jsf/employee/list.jsp | 75 --- .../src/main/webapp/WEB-INF/jsf/index.jsp | 35 -- .../WEB-INF/tags/ui/datepicker/index.jsp | 33 -- .../main/webapp/WEB-INF/tags/ui/example.jsp | 1 - .../main/webapp/WEB-INF/tags/ui/example.vm | 3 - .../WEB-INF/tags/ui/staticTreeSelect.jsp | 11 - .../WEB-INF/tags/ui/timepicker/index.jsp | 31 -- .../tags/ui/treeExampleAjaxDynamic.ftl | 9 - .../tags/ui/treeExampleAjaxDynamic.jsp | 25 - .../WEB-INF/tags/ui/treeExampleDynamic.jsp | 54 -- .../WEB-INF/tags/ui/treeExampleStatic.jsp | 61 --- .../main/webapp/WEB-INF/validation/index.jsp | 2 - .../webapp/WEB-INF/validation/quiz-ajax.jsp | 104 ---- .../showcase/src/main/webapp/ajax/JSONList.js | 63 --- apps/showcase/src/main/webapp/ajax/index.html | 24 - 106 files changed, 239 insertions(+), 4826 deletions(-) delete mode 100644 apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java delete mode 100644 apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java delete mode 100644 apps/showcase/src/main/java/org/apache/struts2/showcase/integration/SaveGangsterAction.java delete mode 100644 apps/showcase/src/main/java/org/apache/struts2/showcase/jsf/JsfEmployeeAction.java delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/ajax/Example5Action-validation.xml delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatLoginAction-chatLogin-validation.xml delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatMessage-conversion.properties delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/CrudRoomAction-createRoom-validation.xml delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/Room-conversion.properties delete mode 100644 apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/SendMessageToRoomAction-sendMessageToRoom-validation.xml delete mode 100644 apps/showcase/src/main/resources/struts-ajax.xml delete mode 100644 apps/showcase/src/main/resources/struts-chat.xml delete mode 100644 apps/showcase/src/main/resources/struts-integration.xml delete mode 100644 apps/showcase/src/main/resources/struts-jsf.xml delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult2.js delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult3.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/autocompleter/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/bind/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/commonInclude.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/footer.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/options.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotebutton/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example1.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example10.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example2.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example3.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example4.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example5.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example6.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example7.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example8.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example9.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remoteforms/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/remotelink/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example1.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example2.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example3.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example4.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5Ok.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example6.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel1.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2Submit.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3Submit.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/testjs.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tree/getCategory.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tree/partialChunkHeader.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tree/toggle.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/tree/tree.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/ajax/widgets/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/chatLogin.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/createRoom.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/messagesAvailableInRoom.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/roomSelection.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/roomsAvailable.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/sendMessageToRoomResult.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/showRoom.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailable.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailableInRoom.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanAjax.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/integration/modelDriven.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/integration/modelDrivenResult.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/demo.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/example-action.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_0.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_1.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_2.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_3.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_4.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_0.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_1.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_2.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_3.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_4.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_5.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_6.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_7.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_8.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/jsf/employee/edit.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/jsf/employee/list.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/jsf/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/datepicker/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/staticTreeSelect.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/timepicker/index.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/treeExampleAjaxDynamic.ftl delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/treeExampleAjaxDynamic.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/treeExampleDynamic.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/tags/ui/treeExampleStatic.jsp delete mode 100644 apps/showcase/src/main/webapp/WEB-INF/validation/quiz-ajax.jsp delete mode 100644 apps/showcase/src/main/webapp/ajax/JSONList.js delete mode 100644 apps/showcase/src/main/webapp/ajax/index.html diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 5d167a9a9..8d2beabe2 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -45,22 +45,6 @@ - - - org.apache.struts - struts2-struts1-plugin - - - - org.apache.struts - struts2-dojo-plugin - - - - org.apache.struts - struts2-jsf-plugin - - org.apache.struts struts2-config-browser-plugin diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java deleted file mode 100644 index f4610b224..000000000 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.integration; - -import org.apache.struts.action.Action; -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class EditGangsterAction extends Action { - - /* (non-Javadoc) - * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - @Override - public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - // Some code to load the gangster from the db as necessary - - return mapping.findForward("success"); - } - - -} diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java deleted file mode 100644 index 87047411f..000000000 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.integration; - -import org.apache.struts.action.ActionErrors; -import org.apache.struts.action.ActionMapping; -import org.apache.struts.action.ActionMessage; -import org.apache.struts.validator.ValidatorForm; - -import javax.servlet.http.HttpServletRequest; - -public class GangsterForm extends ValidatorForm { - - private String name; - private String age; - private String description; - private boolean bustedBefore; - - /* (non-Javadoc) - * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) - */ - @Override - public void reset(ActionMapping arg0, HttpServletRequest arg1) { - bustedBefore = false; - } - - /* (non-Javadoc) - * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) - */ - @Override - public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { - ActionErrors errors = super.validate(mapping, request); - if (name == null || name.length() == 0) { - errors.add("name", new ActionMessage("The name must not be blank")); - } - - return errors; - } - - /** - * @return the age - */ - public String getAge() { - return age; - } - - /** - * @param age the age to set - */ - public void setAge(String age) { - this.age = age; - } - - /** - * @return the bustedBefore - */ - public boolean isBustedBefore() { - return bustedBefore; - } - - /** - * @param bustedBefore the bustedBefore to set - */ - public void setBustedBefore(boolean bustedBefore) { - this.bustedBefore = bustedBefore; - } - - /** - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * @param description the description to set - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - -} diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/SaveGangsterAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/SaveGangsterAction.java deleted file mode 100644 index afc358728..000000000 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/SaveGangsterAction.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.integration; - -import org.apache.struts.action.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class SaveGangsterAction extends Action { - - /* (non-Javadoc) - * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - @Override - public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - - // Some code to save the gangster to the db as necessary - GangsterForm gform = (GangsterForm) form; - ActionMessages messages = new ActionMessages(); - messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " added successfully")); - addMessages(request, messages); - - return mapping.findForward("success"); - } - - -} diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/jsf/JsfEmployeeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/jsf/JsfEmployeeAction.java deleted file mode 100644 index 0a0387f48..000000000 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/jsf/JsfEmployeeAction.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.jsf; - -import org.apache.struts2.showcase.action.EmployeeAction; -import org.apache.struts2.showcase.dao.SkillDao; -import org.apache.struts2.showcase.model.Employee; -import org.apache.struts2.showcase.model.Skill; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.*; - -/** - * Overriding the EmployeeAction to main provide getters returning the data in - * the form required by the JSF components - */ -public class JsfEmployeeAction extends EmployeeAction { - - private static final long serialVersionUID = 1L; - - @Autowired - private SkillDao skillDao; - - /** - * Creating a default employee and main skill, since the JSF EL can't handle - * creating new objects as necessary - */ - public JsfEmployeeAction() { - Employee e = new Employee(); - e.setMainSkill(new Skill()); - setCurrentEmployee(e); - } - - - /** - * Returning a List because the JSF dataGrid can't handle a Set for some - * reason - */ - @Override - public Collection getAvailableItems() { - return new ArrayList(super.getAvailableItems()); - } - - /** - * Changing the String array into a Map - */ - public Map getAvailablePositionsAsMap() { - Map map = new LinkedHashMap(); - for (String val : super.getAvailablePositions()) { - map.put(val, val); - } - return map; - } - - /** - * Converting the list into a map - */ - public Map getAvailableLevelsAsMap() { - Map map = new LinkedHashMap(); - for (Object val : super.getAvailableLevels()) { - map.put(val, val); - } - return map; - } - - /** - * Converting the Skill object list into a map - */ - public Map getAvailableSkills() { - Map map = new HashMap(); - for (Object val : skillDao.findAll()) { - Skill skill = (Skill) val; - map.put(skill.getDescription(), skill.getName()); - } - return map; - } - - /** - * Gets the selected Skill objects as a list - */ - public List getSelectedSkillsAsList() { - System.out.println("asked for skills"); - List list = new ArrayList(); - List skills = super.getSelectedSkills(); - if (skills != null) { - for (Object val : skills) { - if (val instanceof Skill) { - list.add(((Skill) val).getDescription()); - } else { - Skill skill = skillDao.getSkill((String) val); - list.add(skill.getDescription()); - } - } - } - return list; - } -} diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/ajax/Example5Action-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/ajax/Example5Action-validation.xml deleted file mode 100644 index 15ec8d9a7..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/ajax/Example5Action-validation.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Name is required - - - - - Age is required - - - - - diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatLoginAction-chatLogin-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatLoginAction-chatLogin-validation.xml deleted file mode 100644 index dddbc61b7..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatLoginAction-chatLogin-validation.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - true - Name is required - - - - diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatMessage-conversion.properties b/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatMessage-conversion.properties deleted file mode 100644 index 8869d38e6..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/ChatMessage-conversion.properties +++ /dev/null @@ -1 +0,0 @@ -creationDate=org.apache.struts2.showcase.chat.DateConverter diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/CrudRoomAction-createRoom-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/CrudRoomAction-createRoom-validation.xml deleted file mode 100644 index a657919b2..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/CrudRoomAction-createRoom-validation.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - true - Room name is required - - - - - true - Room description is required - - - - \ No newline at end of file diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/Room-conversion.properties b/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/Room-conversion.properties deleted file mode 100644 index 8869d38e6..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/Room-conversion.properties +++ /dev/null @@ -1 +0,0 @@ -creationDate=org.apache.struts2.showcase.chat.DateConverter diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/SendMessageToRoomAction-sendMessageToRoom-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/SendMessageToRoomAction-sendMessageToRoom-validation.xml deleted file mode 100644 index 5b4840e1e..000000000 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/chat/SendMessageToRoomAction-sendMessageToRoom-validation.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - true - Message is required - - - - - \ No newline at end of file diff --git a/apps/showcase/src/main/resources/struts-ajax.xml b/apps/showcase/src/main/resources/struts-ajax.xml deleted file mode 100644 index a5ce83cf3..000000000 --- a/apps/showcase/src/main/resources/struts-ajax.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - /WEB-INF/ajax/AjaxResult.jsp - - - - /WEB-INF/ajax/AjaxResult2.js - - - - /WEB-INF/ajax/AjaxResult3.jsp - - - - /WEB-INF/ajax/remoteforms/test2.jsp - - - - /WEB-INF/ajax/remoteforms/test3.jsp - - - - /WEB-INF/ajax/testjs.jsp - - - - /ajax/JSONList.js - - - - /WEB-INF/ajax/tree/tree.jsp - - - - /WEB-INF/ajax/tree/getCategory.jsp - - - - /WEB-INF/ajax/tree/toggle.jsp - - - - /WEB-INF/ajax/tabbedpanel/example4.ftl - - - - /WEB-INF/ajax/tabbedpanel/example5.jsp - /WEB-INF/ajax/tabbedpanel/example5Ok.jsp - - - - - - /WEB-INF/ajax/bind/index.jsp - - - /WEB-INF/ajax/autocompleter/index.jsp - - - /WEB-INF/ajax/remotebutton/index.jsp - - - /WEB-INF/ajax/remotediv/index.jsp - - - /WEB-INF/ajax/remotelink/index.jsp - - - /WEB-INF/ajax/tabbedpanel/index.jsp - - - /WEB-INF/ajax/remoteforms/index.jsp - - - /WEB-INF/ajax/widgets/index.jsp - - - - - - - /WEB-INF/ajax/tabbedpanel/nodecorate/panel1.ftl - - - /WEB-INF/ajax/tabbedpanel/nodecorate/panel2.ftl - - - /WEB-INF/ajax/tabbedpanel/nodecorate/panel3.ftl - - - /WEB-INF/ajax/tabbedpanel/nodecorate/panel2Submit.ftl - - - /WEB-INF/ajax/tabbedpanel/nodecorate/panel3Submit.ftl - - - /WEB-INF/ajax/options.ftl - - - - /WEB-INF/validation/quiz-ajax.jsp - /WEB-INF/validation/quiz-success.jsp - - - /WEB-INF/tags/ui/treeExampleAjaxDynamic.ftl - - - diff --git a/apps/showcase/src/main/resources/struts-chat.xml b/apps/showcase/src/main/resources/struts-chat.xml deleted file mode 100644 index 15ea15b1c..000000000 --- a/apps/showcase/src/main/resources/struts-chat.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - input,back,cancel,browse - - - input,back,cancel,browse - - - - - - - /WEB-INF/chat/chatLogin.ftl - - - - - /WEB-INF/chat/roomSelection.ftl - - - - - /chat/showRooms.action - /WEB-INF/chat/chatLogin.ftl - - - - - /chat/main.action - - - - - /WEB-INF/chat/roomSelection.ftl - - - - - /WEB-INF/chat/showRoom.ftl - - - - - /chat/showRooms.action - - - - - - - - - - - - - - - - - - - - - - - input,back,cancel,browse - - - input,back,cancel,browse - - - - - - - - - /WEB-INF/chat/usersAvailable.ftl - - - - - /WEB-INF/chat/roomsAvailable.ftl - - - - - /WEB-INF/chat/createRoom.ftl - /WEB-INF/chat/createRoom.ftl - - - - - /WEB-INF/chat/messagesAvailableInRoom.ftl - /WEB-INF/chat/messagesAvailableInRoom.ftl - - - - - /WEB-INF/chat/sendMessageToRoomResult.ftl - /WEB-INF/chat/sendMessageToRoomResult.ftl - - - - - /WEB-INF/chat/usersAvailableInRoom.ftl - - - - diff --git a/apps/showcase/src/main/resources/struts-integration.xml b/apps/showcase/src/main/resources/struts-integration.xml deleted file mode 100644 index ffff4ace4..000000000 --- a/apps/showcase/src/main/resources/struts-integration.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - org.apache.struts2.showcase.integration.GangsterForm - gangsterForm - - - /org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml - - - - - - - - - - - - - - - - - - - org.apache.struts2.showcase.integration.EditGangsterAction - /WEB-INF/integration/modelDriven.jsp - - - - - org.apache.struts2.showcase.integration.SaveGangsterAction - true - /WEB-INF/integration/modelDriven.jsp - /WEB-INF/integration/modelDrivenResult.jsp - - - - diff --git a/apps/showcase/src/main/resources/struts-jsf.xml b/apps/showcase/src/main/resources/struts-jsf.xml deleted file mode 100644 index baa458a73..000000000 --- a/apps/showcase/src/main/resources/struts-jsf.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - /WEB-INF/jsf/index.jsp - - - - - - - - - - - - - - list.action - list.action - - - - - diff --git a/apps/showcase/src/main/resources/struts.xml b/apps/showcase/src/main/resources/struts.xml index 2df1d0f0e..4761eb383 100644 --- a/apps/showcase/src/main/resources/struts.xml +++ b/apps/showcase/src/main/resources/struts.xml @@ -25,8 +25,6 @@ - - @@ -37,22 +35,16 @@ - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult.jsp deleted file mode 100644 index 3dc852161..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> - -Result: @ -
- diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult2.js b/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult2.js deleted file mode 100644 index 537c3905d..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult2.js +++ /dev/null @@ -1,2 +0,0 @@ -alert('This JavaScript currently being evaluated is the result...'); -alert('... of an action executed on the server!'); diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult3.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult3.jsp deleted file mode 100644 index 45cb2b0ce..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/AjaxResult3.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> - -Result: @ - -The value you entered was:
diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/autocompleter/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/autocompleter/index.jsp deleted file mode 100644 index 0d29a6456..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/autocompleter/index.jsp +++ /dev/null @@ -1,186 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - Ajax Examples - - - - - - - - - - - - - -Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring") -
- - - -

- -Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCount="3", it is "3" by default), without the down arrow button (showDownArrow="false") -
- - - -

- -Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true") -
- - -

- -Using a local list (list="%{'apple','banana','grape','pear'}") -
- - -

- -Force valid options (forceValidOption="true") -
- - -
-
- -Make dropdown's height to 180px (dropdownHeight="180") -
- - -
-
- -Disabled combobox (disabled="true") -
- - -
-
- - - - -Link two autocompleter elements. When the selected value in 'Autocompleter 1' changes, the available values in 'Autocompleter 2' will change also. -
-
-

- Autocompleter 1 - -

-
-Autocompleter 2 - - -

- -Publish before/after/value notify topics -
- - - -

- -Get values using JavaScript -
- - - - -

- - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/bind/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/bind/index.jsp deleted file mode 100644 index 046006cbb..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/bind/index.jsp +++ /dev/null @@ -1,61 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Bind Examples - - - - - - - -
Div 1
- - - -

-

- 1. Attach to "onclick" event on button. Update content of Div 1. Use with indicator. - - -
- -

-

-

- 2. Attach to "onmouseover", and "onclick" event on Area below and update content of Div1, highlight targets with green color - -

- Mouse Over or Click Here! -
-

-

-

- 3. Attach to "onkeydown" event on Textbox below update content of Div1. Publish topics. - -
- -

- - -

- - - - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/commonInclude.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/commonInclude.jsp deleted file mode 100644 index 32ea69eed..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/commonInclude.jsp +++ /dev/null @@ -1,5 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/footer.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/footer.jsp deleted file mode 100644 index 12854b52d..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/footer.jsp +++ /dev/null @@ -1,8 +0,0 @@ -<%@taglib prefix="s" uri="/struts-tags" %> - -
- - - -Back To AJAX Examples  - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/options.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/options.ftl deleted file mode 100644 index d12ad6ded..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/options.ftl +++ /dev/null @@ -1,5 +0,0 @@ -[ -<#list options as option> - ["${option?html}"], - -] \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotebutton/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotebutton/index.jsp deleted file mode 100644 index b8486ae57..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotebutton/index.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - -
Div 1
- - -

- -A submit button, that highlights (blue color) its targets - - -

- -A submit button, with an indicator - - - -

- -A submit button, with "notifyTopics" - - -

- -Use an image as submit - - -

- - -

- -Use a button as submit (custom text) - - - - - -

- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example1.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example1.jsp deleted file mode 100644 index 4dfdd1d55..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example1.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - - Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example10.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example10.jsp deleted file mode 100644 index 43509847b..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example10.jsp +++ /dev/null @@ -1,31 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - - - Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example2.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example2.jsp deleted file mode 100644 index 4257d7247..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example2.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - - - Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example3.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example3.jsp deleted file mode 100644 index 1ea2b1703..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example3.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - -Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example4.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example4.jsp deleted file mode 100644 index 959cff1c9..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example4.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - -loading now - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example5.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example5.jsp deleted file mode 100644 index ac06d1e54..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example5.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - -loading now - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example6.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example6.jsp deleted file mode 100644 index c9440057b..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example6.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - -loading now - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example7.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example7.jsp deleted file mode 100644 index d44447419..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example7.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - -loading now - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example8.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example8.jsp deleted file mode 100644 index 3314475bc..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example8.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - -
- - -
- -

- - - - - - - - - Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example9.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example9.jsp deleted file mode 100644 index 14ab4f05e..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/example9.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - - - - - - - - Initial Content - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/index.jsp deleted file mode 100644 index a0e97112b..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotediv/index.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - AJAX-based remote DIV tag - <%@ include file="/WEB-INF/ajax/commonInclude.jsp" %> - - - - -

Examples

- -

-

    -
  1. - A simple DIV that refreshes only once -
  2. - -
  3. - A simple DIV that uses a custom handler -
  4. - -
  5. - A simple DIV that updates every 2 seconds, with indicator -
  6. - -
  7. - A simple DIV that updates every 5 seconds with loading text and reloading text and delay -
  8. - -
  9. - A simple DIV's that cannot contact the server, with fixed error message -
  10. - - -
  11. - A div that calls the server, and JS in the resulting page is executed -
  12. - -
  13. - A div that will listen to events to refresh and start/stop autoupdate, and gets highlighted in red (when it loads) -
  14. - -
  15. - A div that will listen to events to refresh and start/stop autoupdate, publish notifyTopics -
  16. - -
- - -

- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remoteforms/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remoteforms/index.jsp deleted file mode 100644 index a961b94fc..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remoteforms/index.jsp +++ /dev/null @@ -1,119 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - - -
initial content
- - -

-Remote form replacing another div:
- - - - - - - - -

-Remote form replacing the forms content:
- - - - - - - - -

-Remote form evaluating suplied JS on completion:
- - - - - - - - -

-Submit outside form:
- - - - - - -

- -Submit outside form, href in submit tag:
- - - - - - -

-Remote form whose submit is cancelled:
- - - - - - - - -

-A form with no remote submit (so should not be ajaxified):
- - - - - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotelink/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/remotelink/index.jsp deleted file mode 100644 index 89e32f3e6..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/remotelink/index.jsp +++ /dev/null @@ -1,127 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Examples - - - - - - - -
Div 1
- -
- -
Div 2
- -

- - - - -Update 'Div 1' and use red highligh to notify user of changed content - -

- -Update 'Div 1' and 'Div 2', publish topic '/before' and '/after', use indicator - - -

- -Try to update 'Div 1', publish '/error', use custom error message - -

- -Update 'Div 1', use custom loading message - -

- -Update 'Div 2' and execute returned javascript - -

- -Update 'Div 2' using a custom handler - - -

- - - -
- -
- -

- -Update 'Div 2' with the content of the textbox - - -

- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example1.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example1.jsp deleted file mode 100644 index 8d455beb7..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example1.jsp +++ /dev/null @@ -1,95 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - - - - - - - - - -
- - - This is the first pane
- -
- -
-
- - This is the second panel - - - This is the three - -
-
- - - This is the left pane
- -
- -
-
- - - middle tab
- -
- -
-
- -
-
- - - - - - - - - - - Inner 1 - Inner 2 - Inner 3 - - - - Inner 21 - Inner 22 - Inner 23 - - - - Inner 31 - Inner 32 - Inner 33 - - -
- - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example2.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example2.jsp deleted file mode 100644 index 65b54d29c..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example2.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - I'm a Tab!!! - - - I'm the other Tab!!! - - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example3.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example3.jsp deleted file mode 100644 index cd3c9b6a3..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example3.jsp +++ /dev/null @@ -1,46 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - - - - -
- - - - This is the left pane
- -
- -
-
- - - middle tab
- -
- -
-
- -
- -
- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example4.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example4.jsp deleted file mode 100644 index e6f1b2b21..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example4.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - - - Enabled Tab - - - Diabled Tab - - - Some other Tab - - - -
- - - - -
- - - - -
- - - - -

- - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5.jsp deleted file mode 100644 index 25ed4f7c5..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - I'm a Tab!!! - - - I'm the other Tab!!! - - - - - - - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5Ok.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5Ok.jsp deleted file mode 100644 index 5c3b801ee..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example5Ok.jsp +++ /dev/null @@ -1,9 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> - -

OK

-
-
- - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example6.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example6.jsp deleted file mode 100644 index 3bc62cd6a..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/example6.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax examples - tabbled panel - - - - - - - - - - Tab 1 - - - Tab 2 - - - -

- - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/index.jsp deleted file mode 100644 index 196d0d4e0..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/index.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - Tabbed Panes - <%@ include file="/WEB-INF/ajax/commonInclude.jsp" %> - - - - -

Examples

- -

-

    -
  1. A local tabbed panel width fixed size (doLayout="true")
  2. -
  3. A Local tabbed panel with disabled tabs
  4. -
  5. A Local tabbed panel that publishes topics when tabs are selected(before and after)
  6. -
  7. A remote (href != "") and local tabbed panel
  8. -
  9. Various remote and local tabbed panels (with enclosed tabbed pannels) with layout (doLayout="false")
  10. -
  11. A local tabbed panel width fixed size (doLayout="true") with close button on the tab pane (closable="true" on tabs), and tabs on the bottom (labelposition="bottom")
  12. -
- - -

- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel1.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel1.ftl deleted file mode 100644 index fcc895e39..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel1.ftl +++ /dev/null @@ -1,3 +0,0 @@ - -Hello,
-Today is ${todayDate?html}, the time now is ${todayTime?html} diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2.ftl deleted file mode 100644 index e866e6d4a..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2.ftl +++ /dev/null @@ -1,7 +0,0 @@ - -
-
-<@sx.form action="panel2Submit" namespace="/nodecorate"> - <@s.textfield label="Name" name="name" /> - <@sx.submit targets="result" /> - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2Submit.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2Submit.ftl deleted file mode 100644 index d338eacee..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel2Submit.ftl +++ /dev/null @@ -1,2 +0,0 @@ - -Hello, ${name?html} diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3.ftl deleted file mode 100644 index 79209df7d..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3.ftl +++ /dev/null @@ -1,9 +0,0 @@ - -
-
- -<@s.form action="panel3Submit" namespace="/nodecorate"> - <@sx.autocompleter label="Gender" name="gender" list="%{#{'Male':'Male','Female':'Female'}}" /> - <@sx.submit targets="result" /> - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3Submit.ftl b/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3Submit.ftl deleted file mode 100644 index 7dacc93ec..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tabbedpanel/nodecorate/panel3Submit.ftl +++ /dev/null @@ -1,2 +0,0 @@ - -So, you are a ${gender?html} diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/testjs.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/testjs.jsp deleted file mode 100644 index 5223ef707..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/testjs.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> - - -Show me some text also - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/getCategory.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/getCategory.jsp deleted file mode 100644 index 6a56cbdcf..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/getCategory.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@include file="partialChunkHeader.jsp"%> -
    - -
  • - - + - - -
  • - - - - - - › - - -
    -
\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/partialChunkHeader.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/partialChunkHeader.jsp deleted file mode 100644 index 01113d688..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/partialChunkHeader.jsp +++ /dev/null @@ -1,6 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/toggle.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/toggle.jsp deleted file mode 100644 index 35010bb5e..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/toggle.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@include file="partialChunkHeader.jsp"%> -<% - response.setContentType("text/javascript"); -%> -dojo.event.topic.publish("children_"); -var d = document.getElementById("children_"); -if (d.style.display != "none") { - d.style.display = "none"; -} else { - d.style.display = ""; -} diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/tree.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/tree.jsp deleted file mode 100644 index 81d68d617..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/tree/tree.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - Tree - - - - - - - - - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/ajax/widgets/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/ajax/widgets/index.jsp deleted file mode 100644 index e86efbdff..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/ajax/widgets/index.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - Ajax Widgets - - - - - -
-NOTES: -
    -
  • Make sure that there is a 'value' attribute in the textarea with the content for the editor
  • -
  • This is experimental
  • -
- - -Default Editor configuration:
- - - - -
- -Configured Editor configuration:
- - - textGroup;|;justifyGroup;|;listGroup;|;indentGroup - - - -
- - - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/chatLogin.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/chatLogin.ftl deleted file mode 100644 index 439ea6b37..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/chatLogin.ftl +++ /dev/null @@ -1,27 +0,0 @@ - - - Struts2 Showcase - Chat - Login - <@s.head /> - - - - -
-
-
- <@s.actionerror cssClass="alert alert-error"/> - <@s.actionmessage cssClass="alert alert-info"/> - <@s.fielderror cssClass="alert alert-error"/> - - <@s.form action="login" namespace="/chat" method="POST"> - <@s.textfield name="name" label="Name" required="true" /> - <@s.submit cssClass="btn btn-primary"/> - -
-
-
- - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/createRoom.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/createRoom.ftl deleted file mode 100644 index fbe71cc91..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/createRoom.ftl +++ /dev/null @@ -1,2 +0,0 @@ -<@s.actionerror /> -<@s.fielderror /> diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/chat/index.jsp deleted file mode 100644 index b58d7a302..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/index.jsp +++ /dev/null @@ -1,3 +0,0 @@ - -<% response.sendRedirect("main.action"); %> - diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/messagesAvailableInRoom.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/messagesAvailableInRoom.ftl deleted file mode 100644 index 2550dcd2d..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/messagesAvailableInRoom.ftl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - -<@s.iterator id="message" value="%{messagesAvailableInRoom}" status="stat"> - - <#if stat.odd> - - <#if stat.odd> - - <#if stat.odd> - - - -
SenderDateMessage
- <#else> - - - <@s.property value="%{#message.creator.name}" /> - - <#else> - - - <@s.property value="%{#message.creationDate}" /> - - <#else> - - - <@s.property value="%{#message.message}" /> -
diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/roomSelection.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/roomSelection.ftl deleted file mode 100644 index 05eaf1721..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/roomSelection.ftl +++ /dev/null @@ -1,172 +0,0 @@ - - - Struts2 Showcase - Chat - Room Selection -<@sx.head /> - - - - - -
-
-
- - -
-
-

Operations

- <@s.url id="url" action="logout" namespace="/chat" /> -
    -
  • <@s.a href="%{#url}">Logout
  • -
-
- <#if (actionErrors?size gt 0)> -
-

Action Errors

- <@s.actionerrors /> -
- -
-

Users Available In Chat

- <@s.url id="usersAvailableUrl" action="usersAvailable" namespace="/chat/ajax" /> - <@sx.div id="usersAvailable" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}" - href="%{usersAvailableUrl}" - class="box"> - Initial Loading Users ... - -
-
- - -
-
-

Rooms Available In Chat

- <@s.url id="roomsAvailableUrl" action="roomsAvailable" namespace="/chat/ajax" /> - <@sx.div id="roomsAvailable" listenTopics="topicRoomCreated" - updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}" - href="%{roomsAvailableUrl}" > - Initial Loading Rooms ... - -
- -
-

Create Room In Chat

- -
- <@s.form id="createRoomId" action="createRoom" namespace="/chat/ajax" method="POST"> - <@s.textfield label="Room Name" required="true" name="name" /> - <@s.textarea theme="xhtml" label="Room Description" required="true" name="Description" /> - <@sx.submit value="%{'Create Room'}" targets="createRoomResult" afterNotifyTopics="topicRoomCreated" align="left" cssClass="btn btn-primary" /> - -
-
- -
-
-
- - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/roomsAvailable.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/roomsAvailable.ftl deleted file mode 100644 index 1d343c00e..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/roomsAvailable.ftl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - -<@s.iterator id="room" value="%{availableRooms}" status="stat"> - - <#if stat.isOdd()> - - <#if stat.odd> - - <#if stat.odd> - - <#if stat.odd> - - - -
OperationNameDescriptionDate Created
- <#else> - - - <@s.url id="url" action="enterRoom" namespace="/chat"> - <@s.param name="roomName" value="%{#room.name}" /> - - <@s.a href="%{url}">Enter - - <#else> - - - <@s.property value="%{#room.name}" /> - - <#else> - - - <@s.property value="%{#room.description}" /> - - <#else> - - - <@s.property value="%{#room.creationDate}" /> -
diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/sendMessageToRoomResult.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/sendMessageToRoomResult.ftl deleted file mode 100644 index c75d32bca..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/sendMessageToRoomResult.ftl +++ /dev/null @@ -1,2 +0,0 @@ - -<@s.fielderror /> diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/showRoom.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/showRoom.ftl deleted file mode 100644 index 0a82d4802..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/showRoom.ftl +++ /dev/null @@ -1,167 +0,0 @@ - - - Struts2 Showcase - Chat - Show Room -<@sx.head /> - - - - - -
-
-
-
-
-

Operation

- <@s.url id="url" action="exitRoom" namespace="/chat"> - <@s.param name="roomName" value="%{roomName}" /> - -
    -
  • <@s.a href="%{#url}">Exit Room
  • -
-
-
-

Users Available In Chat

- <@s.url id="usersAvailableUrl" action="usersAvailable" namespace="/chat/ajax" /> - <@sx.div id="usersAvailable" href="%{usersAvailableUrl}" - updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"> - Initial Users Available ... - -
-
- -
-
-

Messages Posted In Room [${roomName?default('')?html}]

- <@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="true"> - <@s.param name="roomName" value="%{roomName}" /> - - <@sx.div id="messagesInRoom" href="%{#url}" includeContext="true" - updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}" - listenTopics="topicMessageSend"> - Initial Messages In Room ... - -
- -
-

Send Messages

- <@s.form id="sendMessageForm" action="sendMessageToRoom" namespace="/chat/ajax" method="POST"> -
- <@s.textarea label="Message"name="message" theme="xhtml" /> - <@s.hidden name="roomName" value="%{roomName}" /> - <@sx.submit id="submit" resultDivId="sendMessageResult" afterNotifyTopics="topicMessageSend" value="%{'Send'}" cssClass="btn btn-primary"/> - -
-
- - -
-
-

Users Available In Room [${roomName?default('')?html}]

- <@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="true"> - <@s.param name="roomName" value="%{roomName}" /> - - <@sx.div id="usersAvailableInRoom" href="%{#url}" includeContext="true" - delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"> - Initial Users Available In Room ... - -
-
- - -
-
-
- - diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailable.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailable.ftl deleted file mode 100644 index 1ff296366..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailable.ftl +++ /dev/null @@ -1,6 +0,0 @@ - -
    -<#list availableUsers as user> -
  • ${user.name?html}
  • - -
diff --git a/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailableInRoom.ftl b/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailableInRoom.ftl deleted file mode 100644 index 95822bf7a..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/chat/usersAvailableInRoom.ftl +++ /dev/null @@ -1,8 +0,0 @@ - -
    -<@s.iterator id="member" value="%{usersAvailableInRoom}"> -
  • <@s.property value="%{#member.name}" />
  • - -
- - diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators.xml b/apps/showcase/src/main/webapp/WEB-INF/decorators.xml index 31936b952..f6b8bfa4e 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators.xml +++ b/apps/showcase/src/main/webapp/WEB-INF/decorators.xml @@ -7,21 +7,11 @@ /styles/* /scripts/* /images/* - /dojo/* /struts/* - /ajax/AjaxResult* - /AjaxTest.action - /ajax/remoteforms/AjaxRemoteForm.action - /tags/ui/ajax/* - /chat/ajax/* - /hangman/ajax/* /nodecorate/* /* - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp index 1ca02cc78..5d1747bc7 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp @@ -1,32 +1,32 @@ <%@ page - language="java" - contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8" %> + language="java" + contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> <% - response.setHeader("Pragma", "no-cache"); - response.setHeader("Cache-Control", "no-cache"); - response.setDateHeader("Expires", 0); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + response.setDateHeader("Expires", 0); - // Calculate the view sources url - String sourceUrl = request.getContextPath()+"/viewSource.action"; - com.opensymphony.xwork2.ActionInvocation inv = com.opensymphony.xwork2.ActionContext.getContext().getActionInvocation(); - org.apache.struts2.dispatcher.mapper.ActionMapping mapping = org.apache.struts2.ServletActionContext.getActionMapping(); - if (inv != null) { - try { - com.opensymphony.xwork2.util.location.Location loc = inv.getProxy().getConfig().getLocation(); - sourceUrl += "?config="+(loc != null ? loc.getURI()+":"+loc.getLineNumber() : ""); - } catch (Exception e) { - sourceUrl += "?config="; - } - sourceUrl += "&className="+inv.getProxy().getConfig().getClassName(); + // Calculate the view sources url + String sourceUrl = request.getContextPath() + "/viewSource.action"; + com.opensymphony.xwork2.ActionInvocation inv = com.opensymphony.xwork2.ActionContext.getContext().getActionInvocation(); + org.apache.struts2.dispatcher.mapper.ActionMapping mapping = org.apache.struts2.ServletActionContext.getActionMapping(); + if (inv != null) { + try { + com.opensymphony.xwork2.util.location.Location loc = inv.getProxy().getConfig().getLocation(); + sourceUrl += "?config=" + (loc != null ? loc.getURI() + ":" + loc.getLineNumber() : ""); + } catch (Exception e) { + sourceUrl += "?config="; + } + sourceUrl += "&className=" + inv.getProxy().getConfig().getClassName(); - if (inv.getResult() != null && inv.getResult() instanceof org.apache.struts2.dispatcher.StrutsResultSupport) { - sourceUrl += "&page="+mapping.getNamespace()+"/"+((org.apache.struts2.dispatcher.StrutsResultSupport)inv.getResult()).getLastFinalLocation(); - } - } else { - sourceUrl += "?page="+request.getServletPath(); - } + if (inv.getResult() != null && inv.getResult() instanceof org.apache.struts2.dispatcher.StrutsResultSupport) { + sourceUrl += "&page=" + mapping.getNamespace() + "/" + ((org.apache.struts2.dispatcher.StrutsResultSupport) inv.getResult()).getLastFinalLocation(); + } + } else { + sourceUrl += "?page=" + request.getServletPath(); + } %> <%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> <%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %> @@ -34,238 +34,210 @@ - - - - - + + + + + - <decorator:title default="Struts2 Showcase"/> + <decorator:title default="Struts2 Showcase"/> - - - + + + - - - + + + - - - + + + - - + + - + + + + @@ -274,34 +246,34 @@
diff --git a/apps/showcase/src/main/webapp/WEB-INF/empmanager/editEmployee.jsp b/apps/showcase/src/main/webapp/WEB-INF/empmanager/editEmployee.jsp index aff2c3e43..f11577e75 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/empmanager/editEmployee.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/empmanager/editEmployee.jsp @@ -1,5 +1,4 @@ <%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> @@ -35,7 +34,7 @@ - + diff --git a/apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanAjax.ftl b/apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanAjax.ftl deleted file mode 100644 index e43329029..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/hangman/hangmanAjax.ftl +++ /dev/null @@ -1,247 +0,0 @@ - - - Struts2 Showcase - Hangman (AJAX) -<@sx.head /> - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- <@s.url id="url" value="/hangman/images/hangman.png" /> - Hangman" - width="197" height="50" border="0"/> - - <#-- Guesses Left --> -
- <@s.set name="guessLeftImageName" value="%{'Chalkboard_'+hangman.guessLeft()+'.png'}" /> - <@s.url id="url" value="%{'/hangman/images/'+#guessLeftImageName}" /> - No. Guesses Left" width="20" height="20" border="0"/> -
-
- <@s.url id="url" value="/hangman/images/guesses-left.png" /> - Guesses Left" width="164" height="11" border="0"/> -
- <#-- Display Scaffold --> -
- <@s.set name="scaffoldImageName" value="%{'scaffold_'+hangman.guessLeft()+'.png'}" /> - <@s.url id="url" value="%{'/hangman/images/'+#scaffoldImageName}" /> - " border="0"/> -
-
-

- <@s.url id="url" value="/hangman/images/guess.png" /> - Current Guess" - align="MIDDLE" width="127" height="20" border="0"/>

-
- <#-- Display Vacab --> -
- <@s.iterator id="currentCharacter" value="%{hangman.vocab.inCharacters()}" stat="stat"> - <#if hangman.characterGuessedBefore(currentCharacter)> - <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter.toString()+'.png'}" /> - <@s.url id="url" value="%{'/hangman/images/'+#chalkboardImageName}" /> - <@s.property value=" - src="<@s.property value="%{#url}" />" width="36" border="0"/> - <#else> - <@s.url id="url" value="/hangman/images/Chalkboard_underscroll.png" /> - _" width="36" border="0"/> - - -
-
-

- <@s.url id="url" value="/hangman/images/choose.png" /> - Choose" - height="20" width="151" border="0"/> -

-
- - <#-- Show Characters Available --> -
- <@s.iterator id="currentCharacter" value="%{hangman.charactersAvailable}" status="stat"> - <@s.set name="chalkboardImageName" value="%{'Chalkboard_'+#currentCharacter+'.png'}" /> - <@s.url id="chalkboardImageUrl" value="%{'/hangman/images/'+#chalkboardImageName}" /> - <@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" /> - - <@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" /> - <@sx.a id="%{#currentCharacter}" - beforeNotifyTopics="topicGuessMade" - showErrorTransportText="true"> - " width="36" border="0"/> - - -
- - -
- -
-
-
-
- - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/integration/modelDriven.jsp b/apps/showcase/src/main/webapp/WEB-INF/integration/modelDriven.jsp deleted file mode 100644 index dc0b1f4bb..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/integration/modelDriven.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - Struts2 Showcase - Struts1 Integration - - - - - - - -
-
-
- - - - - - - - - - - - - -
-
-
- - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/integration/modelDrivenResult.jsp b/apps/showcase/src/main/webapp/WEB-INF/integration/modelDrivenResult.jsp deleted file mode 100644 index 7d11f4c7c..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/integration/modelDrivenResult.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - Struts2 Showcase - Struts1 Integration - Result - - - - - - - -
-
-
- - -
-
-
-
- -
-
-
- - diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/demo.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/demo.jsp deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/example-action.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/example-action.jsp deleted file mode 100644 index aaf5ce9eb..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/example-action.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -
-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;
-
-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<String> getMovies() {
-        return Arrays.asList("Lord of the Rings", "Matrix");
-    }
-
-    public Book getBook() {
-        return new Book("Iliad", "Homer");
-    }
-
-    public Map<String, Book> getBooks() {
-        Map<String, Book> books = new HashMap<String, Book>();
-        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;
-
-    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 diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/index.jsp deleted file mode 100644 index 987a39a89..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/index.jsp +++ /dev/null @@ -1,241 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - OGNL and tags demo - - - - - - - - - - - - - - - - - - -
-
-
- Welcome to the OGNL console! -
- :-> -
- - OGNL Expression -
-
-
- - - - - - -
-
- - - -
-
- JSP Eval Result -
-
-
-
-
- -
-
-
-
-

- - - - diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_0.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_0.jsp deleted file mode 100644 index b6787d46b..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_0.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- String Attributes -

-

- Some tag attributes are expected to be Strings in which case String literals - can be passed as the value, like the href attribute in the a tag. -

-

- - <s:a href="http://struts.apache.org/" /> - -

-

- If the value that you want to use in one of these string literal attributes is stored on the Value Stack, - then the %{#name} syntax (alternative syntax) needs to be used. Assuming there is a value - with the name "url" stored on the stack: -

-

- - <s:a href="%{#url}" /> - -

-

- will create an anchor and use the value of "url" for the href attribute. -

-

- Value Attributes -

-

- Other attributes expect an object as their value(not an string literal). In these attributes you can specify - the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the - value attribute in the property tag. Assuming there is an object stored on the Value Stack with - the name "movie", then: -

-

- - <s:property value="movie" /> - -

-

- will print the value to the page. To pass an String literal to an attribute that expects a value use the %{'string'} - notation. -

-

- If you don't remember if an attribute expects an string literal or a value, you can always use the %{value} notation: -

-

- - <s:a href="%{'http://struts.apache.org/'}" /> -
- <s:property value="%{#movie}" /> -
-

-

- [More details] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_1.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_1.jsp deleted file mode 100644 index a96ab7a3c..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_1.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Print property value, using the property tag -

-

- On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions. - The property tag is used to print to the page the result of an OGNL expression. The expression - is specified in the value attribute. -

-

To print the value of the expression name to the page type: -

- - <s:property value="name" /> - -

-

- on the JSP console and hit enter. Do it for me -

-

- As you saw in the OGNL demo, to print a property of an object that is not on top of the stack, - use the #object.property notation. -

-

To print the value for the key "struts.view_uri" in request to the page type: -

- - <s:property value="#request['struts.view_uri']" /> - -

-

- on the JSP console and hit enter. Do it for me -

-

- Print property value, using the $ operator -

-

Use the ${name} notation to print values from the Value Stack to the page. -

To print the value of the expression name to the page type: -

- - ${name} - -

-

- on the JSP console and hit enter. Do it for me -

-

- [More details] -

diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_2.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_2.jsp deleted file mode 100644 index 565a7ecd3..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_2.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- if tag -

-

- The if tag allows you to optionally execute a JSP section. Multiple elseif tags - and one else tag can be associated to an if tag. -

-

- To say hello to John Galt type: -

-

-

-        <s:if test="name == 'John Galt'">
-            Hi John
-        </s:if>
-        <s:else>
-            I don't know you!
-        </s:else>
-    
-

-

- on the JSP console and hit enter. Do it for me -

-

- iterator tag -

-

- The iterator tag loops over an Iterable object one object at a time into - the Value Stack (the value will be on top of the stack). -

-

- To print the all the elements in the "bands" property type: -

-

-

-        <s:iterator value="bands">
-            <s:property />
-            <br />
-        </s:iterator>
-    
-

-

- on the JSP console and hit enter. Do it for me -

-

- [More on the if tag] - [More on the iterator tag] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_3.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_3.jsp deleted file mode 100644 index 483db12ec..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_3.jsp +++ /dev/null @@ -1,65 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- set tag -

-

- The set tag sets the variable with the name specified in the name attribute to - the value specified in the value attribute in the scope - entered in the scope attribute. The available scopes are: -

    -
  • application - application scope according to servlet spec
  • -
  • session - session scope according to servlet spec
  • -
  • request - request scope according to servlet spec
  • -
  • page - page scope according to servlet sepc
  • -
  • action - the value will be set in the request scope and Struts' action context
  • - -
-

-

- This example sets favouriteBand in the request scope to the first element of the bands property: -

-

-

-        <s:set name="favouriteBand" value="bands[0]" />
-        <s:property value="#favouriteBand" />
-    
-

-

- Do it for me -

-

- url tag -

-

- The url tag is used to build urls (who would have guessed!). To build an url mapping to - an action, set the namespace and action attributes. The url will be stored under - the name specified in the id attribute. url tag uses the id attribute while - the set tag uses name. To specify a value (no action lookup), just use the value - attribute. param tags can be nested inside the url tag to add parameters to the url. -

-

- First link creates a url that maps to an action, second one creates a url to google, passing one parameter: -

-

-

-        <s:url id="evalAction" namespace="/nodecorate" action="jspEval" />
-        <s:a href="%{#evalAction}" >Eval</s:a>
-        
-        <s:url id="google" value="http://www.google.com" >
-            <s:param name="q" value="%{'Struts 2'}" /> 
-        </s:url>
-        <s:a href="%{#google}" >Eval</s:a>
-    
-

-

- Do it for me -

-

- [More on the set tag] - [More on the url tag] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_4.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_4.jsp deleted file mode 100644 index 8d63ee51c..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/jsp_4.jsp +++ /dev/null @@ -1,16 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- More on JSP tags -

-

- Struts 2 provides many more tags which you can learn about - here -

-
-You can keep playing with the JSP console or -Start OGNL Interactive Demo \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_0.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_0.jsp deleted file mode 100644 index 7f441e44d..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_0.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties -

-

- The framework uses a standard naming context to evaluate OGNL expressions. - The top level object dealing with OGNL is a Map (usually referred as a context map or context). - OGNL has a notion of there being a root (or default) object within the context. - In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion. - References to other objects are marked with a pound sign (#). - - In this example (and in your JSP pages) the last action executed will be on the top of the stack. -

-

- This action is available on the third tab above. - To access the name field type: -

-

- - name - -

-

- on the OGNL console and hit enter. Do it for me -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_1.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_1.jsp deleted file mode 100644 index 17505bd5a..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_1.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing nested properties -

-

- To access nested properties, use the dot "." operator to concatenate the property names. The action - class has a book field, with title and author fields. -

-

- To access the name of the book type: -

-

- - book.title - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_2.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_2.jsp deleted file mode 100644 index c1716db35..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_2.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties inside Arrays -

-

- To access properties inside arrays, use the brackets "[]" operators with the desired index(starting from 0). The action - class has an array of String in the field bands. -

-

- To access the second element in the bands array type: -

-

- - bands[1] - -

-

- on the OGNL console and hit enter. Do it for me -

-

- Accessing properties inside Lists -

-

Lists can be accessed on the same way. The action class has a List of String on the field movies.

-

- To access the first element in the movies list type: -

-

- - movies[0] - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_3.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_3.jsp deleted file mode 100644 index 03c3095c0..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_3.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties inside Maps -

-

- To access properties inside maps, use the brackets "[]" operators with the desired key. The action - class has a map of Book objects in the field books. -

-

- To access the book with key "Iliad" in the books map type: -

-

- - books['Iliad'] - -

-

- on the OGNL console and hit enter. Do it for me -

-

If the key does not have spaces in it, you can access an element in the map, using the dot "." operator.

-

- To access the book with key "Iliad" in the books map type: -

-

- - books.Iliad - -

-

- on the OGNL console and hit enter. Do it for me -

-

- Note that the object returned is of type Book. If you want to access one of its properties, you can do so using the dot - "." operator as you did before.

-

- To access the author property of the book with key "Iliad" in the books map type: -

-

- - books['Iliad'].author - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_4.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_4.jsp deleted file mode 100644 index 7e158d5c5..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_4.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties on the stack -

-

- Object that are not on the top of the Value Stack are accessed using the "#name" notation. - Some objects are always pushed into the stack by Struts, like: -

-
    -
  • #application
  • -
  • #session
  • -
  • #request
  • -
  • #parameters
  • -
-

To see the value of the first parameter type:

-

- - #parameters['debug'][0] - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_5.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_5.jsp deleted file mode 100644 index 562456780..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_5.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Calling methods -

-

- OGNL follows Java's syntax to execute a method. -

-

To execute the getTitle() method on the book object type:

-

- - book.getTitle() - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_6.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_6.jsp deleted file mode 100644 index 91466e14c..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_6.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Expressions -

-

- OGNL supports expressions using primitive values. -

-

Arithmetic:

-

- - (6 - 2)/2 - -

-

- on the OGNL console and hit enter. Do it for me -

-

Logical:

-

- - (true || false) and true - -

-

- on the OGNL console and hit enter. Do it for me -

-

Equality:

-

- - 'a' == 'a' - -

-

- on the OGNL console and hit enter. Do it for me -

-

- OGNL supports many more operators and expressions, see [Operators Reference] - for more details. -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_7.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_7.jsp deleted file mode 100644 index a0318ab66..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_7.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

Creating arrays

-

- OGNL follows Java syntax to create arrys. -

-

- Create an array of integers: -

-

- - new int[] {0, 1, 2} - -

-

- on the OGNL console and hit enter. Do it for me -

-

Creating lists

-

- To create a list, enclose a list of comma separated expression in a pair of braces. -

-

- Create a list of Strings: -

-

- - {'Is', 'there', 'any', 'body', 'out', 'there?'} - -

-

- on the OGNL console and hit enter. Do it for me -

-

Creating maps

-

- To create a map, use the syntax #@MAP_TYPE@{key:value}. -

-

- Create a LinkedHashMap: -

-

- - #@java.util.LinkedHashMap@{'name': 'John Galt', 'job' : 'Engineer'} - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_8.jsp b/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_8.jsp deleted file mode 100644 index 3a2cc6ec5..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/interactive/ognl_8.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- More on OGNL -

-

- There are a lot of OGNL features that we have not covered on this short tutorial. -

-
-

- To learn more see the [OGNL Documentation] -

-You can keep playing with the OGNL console or -Start JSP Interactive Demo \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/edit.jsp b/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/edit.jsp deleted file mode 100644 index 6f1d219f3..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/edit.jsp +++ /dev/null @@ -1,113 +0,0 @@ -<%-- - - 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. - - $Id$ - ---%> - -<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> -<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> - - - - - Struts2 Showcase - JSF Integration - Modify Employee - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - -
-
-
-
- - -
\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/list.jsp b/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/list.jsp deleted file mode 100644 index 403c92e54..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/jsf/employee/list.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%-- - - 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. - - $Id$ - ---%> - -<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> -<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> - - - - - Struts2 Showcase - JSF Integration - Available Employees - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -

- - - -

-
-
-
- - -
\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/jsf/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/jsf/index.jsp deleted file mode 100644 index 9685a84f1..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/jsf/index.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - - - Struts2 Showcase - JSF Integration - - - - - - - -
-
-
- -

- The following pages show how Struts and JSF components can work together, - each doing what they do best. -

- -

-

    -
  • List available Employees
  • -
  • Create/Edit Employee
  • -
-

-
-
-
- - \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/datepicker/index.jsp b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/datepicker/index.jsp deleted file mode 100644 index db9c7fb0b..000000000 --- a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/datepicker/index.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - Struts2 Showcase - UI Tags - Datepicker Tag - - - - - -
-
-
- - - - - - - - - - - - -
-
-
-
- - diff --git a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.jsp b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.jsp index 0e89c03d1..98d28810a 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.jsp @@ -1,5 +1,4 @@ <%@taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> Struts2 Showcase - UI Tags Example diff --git a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.vm b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.vm index 23a5d586b..64d6431d7 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.vm +++ b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/example.vm @@ -2,7 +2,6 @@ Struts2 Showcase - UI Tags Example (Velocity) #shead() - #sxhead()