Compare commits

...

86 Commits

Author SHA1 Message Date
Ted Nathan Husted de154978ca WW-1767 Tag r520528 as Struts 2.0.7 (again)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_7@520393 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 14:01:59 +00:00
Ted Nathan Husted e3a6004b6d WW-1767 Tag r520258 as Struts 2.0.7
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_7@520259 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 03:40:43 +00:00
Ted Nathan Husted 1e769cc3b3 WW-1767 Update POMs for 2.0.7 build.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520258 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 03:38:45 +00:00
Ted Nathan Husted 299579aef2 WW-1828 "Login Action validation config file named "Logon-validation.xml" so doesn't validate" - Apply patch submitted by Dave Newton
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520254 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 03:26:25 +00:00
Ted Nathan Husted 85c9e4c171 WW-1825 "Anchor tag inserts newline at end of tag" apply patch submitted by Claus Ibsen
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520249 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 03:18:23 +00:00
Ted Nathan Husted 6d3cceca00 WW-1814 "Default TypeConverters always created with default ObjectFactory" Reorder statics as suggested by Jasper Rosenberg
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520241 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 02:56:03 +00:00
Ted Nathan Husted 2154ad8513 WW-1799 "StringLength validator is inconsistent client side and server side" submitted by Mads Riise Rasmussen
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520235 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 02:45:07 +00:00
Ted Nathan Husted fa754949ab WW-1803 "ScopeIntercaptor null references on session serialization" apply patch submitted by Sylvain RIBEYRON.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520151 13f79535-47bb-0310-9956-ffa450edef68
2007-03-19 22:48:16 +00:00
Ted Nathan Husted 9d71021b14 WW-1767 quickstart is gone, so this should be too!
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520128 13f79535-47bb-0310-9956-ffa450edef68
2007-03-19 22:27:53 +00:00
Donald J. Brown b6be295074 Improved error handling for invalid package
WW-1826


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@519452 13f79535-47bb-0310-9956-ffa450edef68
2007-03-17 21:50:09 +00:00
Musachy Barroso 13e6ae21d4 WW-1710 Fix wrong reference to dojo tooltip
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@519213 13f79535-47bb-0310-9956-ffa450edef68
2007-03-17 02:05:48 +00:00
Musachy Barroso 1e73567cec WW-1823 rename getAutocompleterModel to getAutocompleter in StrutsModels
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@519207 13f79535-47bb-0310-9956-ffa450edef68
2007-03-17 01:45:04 +00:00
René Gielen 8fa480d66b WW-1707:
Re-add deprecated "plaintext" result name for backwards compatibility

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@518921 13f79535-47bb-0310-9956-ffa450edef68
2007-03-16 10:24:19 +00:00
Ted Nathan Husted 8910d90721 WW-18O4 "Showcase - view source throws NumberFormatException". The problem is that config parameter on the URL is empty (config=). It can be fixed by checing if the parameters are not empty instead of just != null in the ViewSourceAction.java. Submitted by Claus Ibsen.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517510 13f79535-47bb-0310-9956-ffa450edef68
2007-03-13 03:24:41 +00:00
Ted Nathan Husted db2bf7b4e3 WW-1526 "Error with handling static resources under WebSphere 6". Flush output after copy to appease WebLogic and possibly other containers. Submitted by Adam Czysciak.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517504 13f79535-47bb-0310-9956-ffa450edef68
2007-03-13 03:12:20 +00:00
Ted Nathan Husted 77cb215263 WW-1787 "Token session interceptor faiing with redirect-action" Apply patch based on WebWork #1404.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517433 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 22:34:58 +00:00
Ted Nathan Husted 51d985b3b7 WW-1786 "using session-token interceptor generates FreeMarker template error" Apply patch submitted by Tom Schneider. The change synchronizes on the Ognl context so we don't concurrently execute results. The issue was that we were getting concurrency exceptions around the ognl context because the results were being executed concurrently. The change will reduce throughput when using the session-token interceptor, but it avoids the concurrency issues.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517424 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 22:18:44 +00:00
Ted Nathan Husted 3563fe21e7 WW-1754 "The current struts-default.xml prevents TypeConverter wiring." Swap ObjectFactory and XWorkConverter load order per suggestion of Nicolas Berthet.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517408 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 21:32:01 +00:00
Ted Nathan Husted 8f589c03db WW-1678 - Port cookie interceptor from WW 2.2.5. Patch submitted by Nate Drake based on code contributed to WebWork2/Open Symphony by Toby Jee and Mathew Payne.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517374 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 20:25:06 +00:00
Ted Nathan Husted bb8d0bf28a WW-1619 URL component and URLHelper class do not handle multiple request parameters with the same name correctly when includeParams="get". Apply patch submitted by Tom Schneider.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517363 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 20:05:02 +00:00
Ted Nathan Husted 09f11dac5c WW-1707 Apply consistent naming for the results in struts-default.xml
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517341 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 19:13:13 +00:00
Ted Nathan Husted fbe7fe226f WW-1801 Remove Spring dependency by copying properties manually.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517026 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 21:58:50 +00:00
Donald J. Brown 4e78cfce78 Fixed mailreader to use correct version and spring plugin
WW-1767


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@517002 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 19:53:46 +00:00
Donald J. Brown 004ab6c47c Fixed bad character in file
WW-1767


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516997 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 19:40:40 +00:00
Ted Nathan Husted ff7144ca42 WW-1707 Apply consistent naming for the interceptors in struts-default.xml per report by Philip Luppens.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516937 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 15:50:48 +00:00
Ted Nathan Husted ae053fb669 WW-1781 - Delete redundant struts.properties file.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516929 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 15:34:01 +00:00
Ted Nathan Husted f621683dc1 WW-1781 - Set DevMode to false for example appliations. Remove other redundant or obsolete settings. Conform indentation n struts-default.xml.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516927 13f79535-47bb-0310-9956-ffa450edef68
2007-03-11 15:29:54 +00:00
René Gielen 209965eff0 WW-1768:
Applied Oleg Gorobets' patch to make Set tag support JSP body as String value to set. Added also some words of documentation of this new feature.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516197 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 22:32:20 +00:00
René Gielen 0a64f616e8 WW-1750:
fixing <script> tags in templates using deprecated language attribute, therefore breaking W3C validation

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516176 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 21:12:40 +00:00
René Gielen 6f97753eec WW-1756:
Applied Erik Berg's patch to avoid unchecked reference to name parameter in radio tag freemarker template

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516164 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 20:08:21 +00:00
René Gielen 46dd4d4ca6 WW-1762:
Applied Erik Berg's patch to beautify anchor tag output

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@516161 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 19:59:35 +00:00
René Gielen 98d4313537 WW-1748:
Applied Oleg Gorobets patch to support TextProvider to be configured with struts.properties

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@515978 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 09:10:31 +00:00
René Gielen 231e27fd5e WW-1747:
- improved format pattern for fraction digits

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@515885 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 01:49:31 +00:00
René Gielen 08f5faf1af Removed broken character encodings, as indicated by bamboo reports
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@515882 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 01:33:04 +00:00
René Gielen 1be016ae02 WW-1747:
- updated test to show number formatting issue pointed out by Mike Baroukh
- fixed issue by preventing freemarker from formatting numbers for this template

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@515872 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 01:07:38 +00:00
Musachy Barroso 0a6c72e0c7 Fix form tag failing tests (add type="text/javascript")
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@515839 13f79535-47bb-0310-9956-ffa450edef68
2007-03-07 23:12:45 +00:00
Musachy Barroso dceee365c0 Add field "name" to autocompleter example
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@514170 13f79535-47bb-0310-9956-ffa450edef68
2007-03-03 15:19:30 +00:00
Musachy Barroso eca621ef35 WW-1777 DateTimePicker now supports expressions in the property "displayFormat"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@512578 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 02:44:58 +00:00
Musachy Barroso fdcfcb8c15 WW-1771 Update DateTimePicker tag documentation. Sytax from:
http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@512130 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 04:12:59 +00:00
Musachy Barroso 422c84f511 WW-1771 Update DateTimePicker tag documentation. Sytax from:
http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@512128 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 04:10:16 +00:00
Thomas Schneider 16939ed8b1 WW-1733 Fixed request not being wrapped issue
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511453 13f79535-47bb-0310-9956-ffa450edef68
2007-02-25 05:35:20 +00:00
Musachy Barroso b39e1f24c2 WW-1671 templates don't specify type="text/javascript"; break W3C validation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511302 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 16:49:02 +00:00
Musachy Barroso a1e9ba6aa4 WW-1766 div tag needs the scriptSeparation attribute
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511299 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 16:39:53 +00:00
Musachy Barroso 7da5f114b4 WW-1589: Linked autocompleter reset on page reload
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511295 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 16:23:00 +00:00
Musachy Barroso 4fd5d2ab15 Add breaklines to javadoc
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511291 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 16:12:38 +00:00
Ted Nathan Husted fe3d2c2228 WW-1705 Remove link to "new API".
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511218 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 05:38:34 +00:00
Ted Nathan Husted e75a5ae946 WW-1705 Update site for 2.0.6 release.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511178 13f79535-47bb-0310-9956-ffa450edef68
2007-02-24 01:01:11 +00:00
Musachy Barroso a4e91a9581 add images to homepage
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@511016 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 16:58:03 +00:00
Ted Nathan Husted 5c1593c02e WW-1705 Encode example URL in MailReader tour.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510919 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 12:03:36 +00:00
Musachy Barroso 28a98b5757 WW-1763: autocompleter tag isn´t present in the documentation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510771 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 02:43:40 +00:00
Musachy Barroso df14a287d0 WW-1763: autocompleter tag isn´t present in the documentation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510770 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 02:40:03 +00:00
Musachy Barroso 60391db64f WW-1602: Autocompleter is not rendering label
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510748 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 01:20:37 +00:00
Musachy Barroso 6692879894 WW-1659:
* Update autocompleter to accept JSON generated using the JSON plugin
 * Add "dataFieldName" to identify the field to be used as the data source in the returned JSON string


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510742 13f79535-47bb-0310-9956-ffa450edef68
2007-02-23 01:04:18 +00:00
Musachy Barroso 9452a5c591 WW-1644 DateTimerPicker problems when type="time". Inherit from Dojo's DropDownTimePicker, the name cannot be "TimePicker" or Dojo gets really confused
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@510351 13f79535-47bb-0310-9956-ffa450edef68
2007-02-22 02:31:23 +00:00
René Gielen a181296a17 WW-1747 / WW-1711:
- applied Stuart Piltch's patch to add an additional string representation comparison in ContainUtil
- removed now unnecessary second check in select freemarker template

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509959 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 10:18:24 +00:00
René Gielen 94d7466015 WW-1747 / WW-1711:
Working with real types rather than String representations as long as possible should fix both issues with select tag.
Additional test added and verified.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509812 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 23:37:47 +00:00
Ted Nathan Husted c6c51c6ba4 WW-1705 Update POMs for 2.0.7-SNAPSHOT.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509055 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 01:37:38 +00:00
Ted Nathan Husted f13243a2bf WW-1705 Update POMs for 2.0.6 tag.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509051 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 01:33:07 +00:00
Ted Nathan Husted b2496a566c WW-1685 Restore Tiles as a "mainstream" example.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509048 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 01:26:47 +00:00
Ted Nathan Husted 756c2f58d5 WW-1685 Playtest Showcase and adjust status of verious examples.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509047 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 01:22:52 +00:00
Ted Nathan Husted cac778c170 WW-1685 Playtest Showcase and adjust status of verious examples.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509034 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 00:03:37 +00:00
Ted Nathan Husted 66479bc36e WW-1548 Remove continuation support from 2.0.x, which had been classified "sandbox" code.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@509029 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 23:26:15 +00:00
Thomas Schneider e023f033af WW-1699 added J2EE 5 compatibility to the StrutsMockServletContext
Contributor: Stepan Koltsov
Reviewed By: Tom Schneider

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508916 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 16:54:58 +00:00
Thomas Schneider 8199b1a3b7 WW-1740 added accessor for background process name to allow subclasses to override
Contributer: Thomas Micheline
Reviewed By: Tom Schneider

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508914 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 16:45:30 +00:00
Rainer Hermanns d078084107 bumped OGNL to version 2.6.11
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508901 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 13:55:11 +00:00
Thomas Schneider c990786a59 WW-1702 - fixed error handling in dispatcher
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508882 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 06:42:39 +00:00
Thomas Schneider 3f7dd2ef82 WW-1709 fixed nullpointer when scheme is null
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508880 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 06:33:26 +00:00
Thomas Schneider 7d8dfff8a1 WW-1709 fixed nullpointer when scheme is null
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508879 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 06:32:02 +00:00
Thomas Schneider 129e4559ce WW-1632 - added rtf support for jasper report result
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508875 13f79535-47bb-0310-9956-ffa450edef68
2007-02-18 06:02:23 +00:00
Musachy Barroso ff9bfe3bd4 WW-1633 Add "keyName" attribute to autocompleter (defaults to "${name}Key")
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508776 13f79535-47bb-0310-9956-ffa450edef68
2007-02-17 16:33:57 +00:00
Musachy Barroso e163098224 WW-1745 Add "templateCssPath" and "iconPath" attributes to Autocompleter
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508631 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 22:48:10 +00:00
Musachy Barroso dd200c173c - Add README file to META-INF
- Change path of generated TLD to target/classes/META-INF

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508608 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 22:00:17 +00:00
Musachy Barroso d7189a6648 WW-1729 Add "templateCssPath" attribute DateTimePicker
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508602 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 21:53:54 +00:00
Musachy Barroso 2cab82fafc WW-1688 Add "templateCssPath" attribute to tabbedPanel
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508570 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 20:42:17 +00:00
Musachy Barroso 1472a49a0f WW-1730 The refreshOnShow attribute in tabbedPanel does not work
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508556 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 20:15:05 +00:00
Rainer Hermanns 5e3464d467 select tag: current option is not selected if actual value to check is no String (aka: nameValue resolves to type other than String)
o added additional unit test submitted by Stuart Piltch 

WW-1711

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508509 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 17:35:12 +00:00
Rainer Hermanns d60e674046 select tag: current option is not selected if actual value to check is no String
(aka: nameValue resolves to type other than String)
o applied patch to submit.ftl submitted by Stuart Piltch 

WW-1711

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508478 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 16:25:48 +00:00
Rainer Hermanns 6e81a692b7 Fixed broken Unit Test due to changes in xwork
WW-1615


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508465 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 16:12:32 +00:00
Rainer Hermanns fbedbdedbe Updated deps:
o OGNL 2.6.10
o XWork 2.0.1
Issue Number: WW-1615


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508441 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 15:14:16 +00:00
Musachy Barroso 1a2bd58e65 Remove redundant tag attribute annotation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508293 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 03:03:30 +00:00
Musachy Barroso 421ff8d068 WW-1570:
Add "showLoading" attribute to ajax tags

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508280 13f79535-47bb-0310-9956-ffa450edef68
2007-02-16 02:07:56 +00:00
Ted Nathan Husted 0e7dbe0b62 [WW-1731] Checkin updated tag HTML docs.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@506210 13f79535-47bb-0310-9956-ffa450edef68
2007-02-12 01:33:59 +00:00
Ted Nathan Husted ae4e489d9e [WW-1731] Update POMs. Checkin updated tag HTML docs.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@506206 13f79535-47bb-0310-9956-ffa450edef68
2007-02-12 01:19:09 +00:00
Ted Nathan Husted dcc79d485d [WW-1731] Fix assembly/pom to include codebehind and spring plugins (Good catch Tom!).
[WW-1548] Remove continuations from the 2.0.x branch.
[WW-1700] Remove "new API" from 2.0.x branch (see also r505490 as to the HEAD/2.1.x). 
[WW-1731] Remove TLD as it is generated. 

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@506198 13f79535-47bb-0310-9956-ffa450edef68
2007-02-12 00:57:44 +00:00
Ted Nathan Husted 75b379d5d4 WW-1705 Branching at 2_0_5 tag (again)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@506174 13f79535-47bb-0310-9956-ffa450edef68
2007-02-11 23:34:04 +00:00
Ted Nathan Husted cb580fe614 WW-1685 Tag r503710 as Struts 2.0.5
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_5@503722 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 15:33:40 +00:00
1055 changed files with 2805 additions and 19841 deletions
-54
View File
@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-api</artifactId>
<packaging>jar</packaging>
<name>Struts 2 API</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/api/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/api/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/api/</url>
</scm>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
<!-- has to be compile for StrutsTestCase, which is part of the base package so others can write unit tests -->
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<showPackage>false</showPackage>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,65 +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;
/**
* Default action interface. Provided purely for user convenience. Struts does not require actions to implement any
* interfaces. Actions need only implement a public, no argument method which returns {@code String}. If a user does
* not specify a method name, Struts defaults to {@code execute()}.
*
* <p>For example:
*
* <pre>
* static import ResultNames.*;
*
* public class MyAction <b>implements Action</b> {
*
* public String execute() {
* return SUCCESS;
* }
* }
* </pre>
*
* <p>is equivalent to:
*
* <pre>
* static import ResultNames.*;
*
* public class MyAction {
*
* public String execute() {
* return SUCCESS;
* }
* }
* </pre>
*
* @author crazybob@google.com (Bob Lee)
*/
public interface Action {
/**
* Executes this action.
*
* @return result name which matches a result name from the action mapping in the configuration file. See {@link
* ResultNames} for common suggestions.
*/
String execute();
}
@@ -1,61 +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;
/**
* Implemented by actions which may need to record errors or messages.
*
* <pre>
* static import ResultNames.*;
*
* public class SetName implements MessageAware {
*
* Messages messages;
* String name;
*
* public String execute() {
* return SUCCESS;
* }
*
* public void setName(String name) {
* if ("".equals(name))
* messages.forField("name").addError("name.required");
*
* this.name = name;
* }
*
* public void setMessages(Messages messages) {
* this.messages = messages;
* }
* }
* </pre>
*
* @author crazybob@google.com (Bob Lee)
*/
public interface MessageAware {
/**
* Sets messages.
*
* @param messages messages
*/
void setMessages(Messages messages);
}
@@ -1,216 +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;
import java.util.List;
import java.util.Set;
import java.util.Map;
/**
* Collection of messages. Supports nesting messages by field name.
*
* <p>Uses keys when adding instead of actual messages to decouple code from messages.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface Messages {
// TODO: Use Object[] for args instead of String[].
/**
* Message severity.
*/
public enum Severity {
/**
* Informational messages.
*/
INFO,
/**
* Warning messages.
*/
WARN,
/**
* Error messages.
*/
ERROR,
}
/**
* Gets nested messages for the given field.
*
* <p>Supports dot notation to represent nesting. For example:
*
* <pre>
* messages.forField("foo").forField("bar") == messages.forField("foo.bar")
* </pre>
*
* @param fieldName name of the field
* @return nested {@code Messages} for given field name
*/
Messages forField(String fieldName);
/**
* Gets map of field name to messages for that field.
*
* @return map of field name to {@code Messages}
*/
Map<String, Messages> forFields();
/**
* Adds informational message.
*
* @param key message key
* @see Severity.INFO
*/
void addInformation(String key);
/**
* Adds informational message.
*
* @param key message key
* @param arguments message arguments
* @see Severity.INFO
*/
void addInformation(String key, String... arguments);
/**
* Adds warning message.
*
* @param key message key
* @see Severity.WARN
*/
void addWarning(String key);
/**
* Adds warning message.
*
* @param key message key
* @param arguments message arguments
* @see Severity.WARN
*/
void addWarning(String key, String... arguments);
/**
* Adds error message.
*
* @param key message key
* @see Severity.ERROR
*/
void addError(String key);
/**
* Adds error message.
*
* @param key message key
* @param arguments message arguments
* @see Severity.ERROR
*/
void addError(String key, String... arguments);
/**
* Adds message.
*
* @param severity message severity
* @param key message key
*/
void add(Severity severity, String key);
/**
* Adds request-scoped message.
*
* @param severity message severity
* @param key message key
* @param arguments message arguments
*/
void add(Severity severity, String key, String... arguments);
/**
* Gets set of severities for which this {@code Messages} instance has messages. Not recursive.
*
* @return unmodifiable set of {@link Severity} sorted from least to most severe
*/
Set<Severity> getSeverities();
/**
* Gets message strings for the given severity. Not recursive.
*
* @param severity message severity
* @return unmodifiable list of messages
*/
List<String> forSeverity(Severity severity);
/**
* Gets error message strings for this {@code Messages} instance. Not recursive.
*
* @return unmodifiable list of messages
*/
List<String> getErrors();
/**
* Gets error message strings for this {@code Messages} instance. Not recursive.
*
* @return unmodifiable list of messages
*/
List<String> getWarnings();
/**
* Gets informational message strings for this {@code Messages} instance. Not recursive.
*
* @return unmodifiable list of messages
*/
List<String> getInformation();
/**
* Returns true if this or a nested {@code Messages} instance has error messages.
*
* @see Severity.ERROR
*/
boolean hasErrors();
/**
* Returns true if this or a nested {@code Messages} instance has warning messages.
*
* @see Severity.WARN
*/
boolean hasWarnings();
/**
* Returns true if this or a nested {@code Messages} instance has informational messages.
*
* @see Severity.INFO
*/
boolean hasInformation();
/**
* Returns true if this and all nested {@code Messages} instances have no messages.
*/
boolean isEmpty();
/**
* Returns true if this and all nested {@code Messages} instances have no messages for the given severity.
*
* @param severity message severity
*/
boolean isEmpty(Severity severity);
}
@@ -1,56 +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;
/**
* Commonly used result names returned by action methods.
*
* @author crazybob@google.com (Bob Lee)
*/
public final class ResultNames {
private ResultNames() {}
/**
* The action executed successfully.
*/
public static final String SUCCESS = "success";
/**
* The action requires more input, i.e.&nbsp;a validation error occurred.
*/
public static final String INPUT = "input";
/**
* The action requires the user to log in before executing.
*/
public static final String LOGIN = "login";
/**
* The action execution failed irrecoverably.
*/
public static final String ERROR = "error";
/**
* The action executed successfully, but do not execute a result.
*/
public static final String NONE = "none";
}
@@ -1,37 +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;
import org.apache.struts2.MessageAware;
/**
* Implemented by actions which wish to execute some validation logic before their action method. Useful for
* cross-field validations.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface Validatable extends MessageAware {
/**
* Validates input. Executes before action method.
*/
public void validate();
}
@@ -1,38 +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.servlet;
import java.util.Map;
/**
* Implemented by actions which need direct access to the request parameters.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface ParameterAware {
/**
* Sets parameters.
*
* @param parameters map of parameter name to parameter values
*/
void setParameters(Map<String, String[]> parameters);
}
@@ -1,38 +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.servlet;
import javax.servlet.http.HttpServletRequest;
/**
* Implemented by actions which need direct access to the servlet request.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface ServletRequestAware {
/**
* Sets the servlet request.
*
* @param request servlet request.
*/
void setServletRequest(HttpServletRequest request);
}
@@ -1,38 +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.servlet;
import javax.servlet.http.HttpServletResponse;
/**
* Implemented by actions which need direct access to the servlet response.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface ServletResponseAware {
/**
* Sets the servlet response.
*
* @param response servlet response
*/
void setServletResponse(HttpServletResponse response);
}
@@ -1,79 +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.spi;
import java.lang.reflect.Method;
/**
* Context of an action execution.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface ActionContext {
/**
* Gets action instance.
*/
Object getAction();
/**
* Gets action method.
*/
Method getMethod();
/**
* Gets action name.
*/
String getActionName();
/**
* Gets the path for the action's namespace.
*/
String getNamespacePath();
/**
* Gets the {@link Result} instance for the action.
*
* @return {@link Result} instance or {@code null} if we don't have a result yet.
*/
Result getResult();
/**
* Adds a result interceptor for the action. Enables executing code before and after a result, executing an
* alternate result, etc.
*/
void addResultInterceptor(Result interceptor);
/**
* Gets context of action which chained to us.
*
* @return context of previous action or {@code null} if this is the first action in the chain
*/
ActionContext getPrevious();
/**
* Gets context of action which this action chained to.
*
* @return context of next action or {@code null} if we haven't chained to another action yet or this is the last
* action in the chain.
*/
ActionContext getNext();
}
@@ -1,36 +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.spi;
/**
* Intercepts an action request.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface Interceptor {
/**
* Intercepts an action request.
*
* @param requestContext current request context
*/
String intercept(RequestContext requestContext) throws Exception;
}
@@ -1,121 +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.spi;
import org.apache.struts2.Messages;
import javax.servlet.ServletContext;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Locale;
import java.util.Map;
/**
* Request context. A single request may span multiple actions with action chaining.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface RequestContext {
/**
* Gets context of the currently executing action.
*
* @return current action context
*/
ActionContext getActionContext();
/**
* Convenience method.&nbsp;Equivalent to {@code getActionContext().getAction()}.
*
* @return currently executing action
*/
Object getAction();
/**
* Gets map of request parameters.
*/
Map<String, String[]> getParameterMap();
/**
* Gets map of request attributes.
*/
Map<String, Object> getAttributeMap();
/**
* Gets map of session attributes.
*/
Map<String, Object> getSessionMap();
/**
* Gets map of application (servlet context) attributes.
*/
Map<String, Object> getApplicationMap();
/**
* Finds cookies with the given name,
*/
List<Cookie> findCookiesForName(String name);
/**
* Gets locale.
*/
Locale getLocale();
/**
* Sets locale. Stores the locale in the session for future requests.
*/
void setLocale(Locale locale);
/**
* Gets messages.
*/
Messages getMessages();
/**
* Gets the servlet request.
*/
HttpServletRequest getServletRequest();
/**
* Gets the servlet response.
*/
HttpServletResponse getServletResponse();
/**
* Gets the servlet context.
*/
ServletContext getServletContext();
/**
* Gets the value stack.
*/
ValueStack getValueStack();
/**
* Invokes the next interceptor or the action method if no more interceptors remain.
*
* @return result name
* @throws IllegalStateException if already invoked or called from the action
*/
String proceed() throws Exception;
}
@@ -1,39 +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.spi;
import org.apache.struts2.spi.RequestContext;
/**
* Implemented by actions that need access to the current {@link org.apache.struts2.spi.RequestContext}. Use
* judiciously.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface RequestContextAware {
/**
* Sets {@link org.apache.struts2.spi.RequestContext}.
*
* @param requestContext
*/
void setRequestContext(RequestContext requestContext);
}
@@ -1,38 +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.spi;
import org.apache.struts2.spi.RequestContext;
/**
* The result of an action request. Struts creates a new {@code Result} instance for each request.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface Result {
/**
* Executes result.
*
* @param requestContext
*/
void execute(RequestContext requestContext) throws Exception;
}
@@ -1,113 +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.spi;
/**
* A central fixture of the Struts framework, the {@code ValueStack} is a stack which contains the actions
* which have executed in addition to other objects. Users can get and set values on the stack using expressions. The
* {@code ValueStack} will search down the stack starting with the most recent objects until it finds an object to
* which the expression can apply.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface ValueStack extends Iterable<Object> {
/**
* Gets the top, most recent object from the stack without changing the stack.
*
* @return the top object
*/
Object peek();
/**
* Removes the top, most recent object from the stack.
*
* @return the top object
*/
Object pop();
/**
* Pushes an object onto the stack.
*
* @param o
*/
void push(Object o);
/**
* Creates a shallow copy of this stack.
*
* @return a new stack which contains the same objects as this one
*/
ValueStack clone();
/**
* Queries the stack. Starts with the top, most recent object. If the expression can apply to the object, this
* method returns the result of evaluating the expression. If the expression does not apply, this method moves
* down the stack to the next object and repeats. Returns {@code null} if the expression doesn't apply to any
* objects.
*
* @param expression
* @return the evaluation of the expression against the first applicable object in the stack
*/
Object get(String expression);
/**
* Queries the stack and converts the result to the specified type. Starts with the top, most recent object. If
* the expression can apply to the object, this method returns the result of evaluating the expression converted
* to the specified type. If the expression does not apply, this method moves down the stack to the next object
* and repeats. Returns {@code null} if the expression doesn't apply to any objects.
*
* @param expression
* @param asType the type to convert the result to
* @return the evaluation of the expression against the first applicable object in the stack converted to the
* specified type
*/
<T> T get(String expression, Class<T> asType);
/**
* Queries the stack and converts the result to a {@code String}. Starts with the top, most recent object. If the
* expression can apply to the object, this method returns the result of evaluating the expression converted to a
* {@code String}. If the expression does not apply, this method moves down the stack to the next object and
* repeats. Returns {@code null} if the expression doesn't apply to any objects.
*
* @param expression
* @return the evaluation of the expression against the first applicable object in the stack converted to a {@code
* String}
*/
String getString(String expression);
/**
* Sets a value on an object from the stack. This method starts at the top, most recent object. If the expression
* applies to that object, this methods sets the given value on that object using the expression and converting
* the type as necessary. If the expression does not apply, this method moves to the next object and repeats.
*
* @param expression
* @param value
*/
void set(String expression, Object value);
/**
* Returns the number of object on the stack.
*
* @return size of stack
*/
int size();
}
-174
View File
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
-5
View File
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
+1 -1
View File
@@ -13,7 +13,7 @@
<action name="Login_*" method="{1}" class="example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Menu</result>
<result type="redirect-action">Menu</result>
</action>
<action name="*" class="example.ExampleSupport">
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -18,7 +18,7 @@
</interceptor-stack>
<interceptor-stack name="user-submit" >
<interceptor-ref name="tokenSession" />
<interceptor-ref name="token-session" />
<interceptor-ref name="user"/>
</interceptor-stack>
@@ -33,7 +33,7 @@
<global-results>
<result name="error">/pages/Error.jsp</result>
<result name="invalid.token">/pages/Error.jsp</result>
<result name="login" type="redirectAction">Login_input</result>
<result name="login" type="redirect-action">Login_input</result>
</global-results>
<global-exception-mappings>
@@ -17,13 +17,13 @@
</action>
<action name="Logout" class="mailreader2.Logout">
<result type="redirectAction">Welcome</result>
<result type="redirect-action">Welcome</result>
</action>
<action name="Login_*" method="{1}" class="mailreader2.Login">
<result name="input">/Login.jsp</result>
<result name="cancel" type="redirectAction">Welcome</result>
<result type="redirectAction">MainMenu</result>
<result name="cancel" type="redirect-action">Welcome</result>
<result type="redirect-action">MainMenu</result>
<result name="expired" type="chain">ChangePassword</result>
<exception-mapping
exception="org.apache.struts.apps.mailreader.dao.ExpiredPasswordException"
@@ -33,7 +33,7 @@
<action name="Registration_*" method="{1}" class="mailreader2.Registration">
<result name="input">/Registration.jsp</result>
<result type="redirectAction">MainMenu</result>
<result type="redirect-action">MainMenu</result>
<interceptor-ref name="guest"/>
</action>
</package>
@@ -42,7 +42,7 @@
<global-results>
<result name="input">/Subscription.jsp</result>
<result type="redirectAction">Registration_input</result>
<result type="redirect-action">Registration_input</result>
</global-results>
<action name="Subscription_save" method="save" class="mailreader2.Subscription">
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
+2 -2
View File
@@ -8,8 +8,8 @@ For more on getting started with Struts, see
WARNING - Additional configuration required for deployment
Due to difference in portlet container implementations, the portlet
WAR is not ready-to-run. Extract the portlet WAR, and then copy the
Due to difference in portlet contrainer implementations, the porlet
WAR is not ready-to-run. Extract the porlet WAR, and then copy the
contents of apps/portlet/src/main/etc/<your_portal_server>/ into the
WAR's WEB-INF directory.
+2 -33
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -17,38 +17,7 @@
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/portlet/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
</scm>
<profiles>
<profile>
<id>pluto</id>
<build>
<plugins>
<!-- configure maven-war-plugin to use updated web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
</configuration>
</plugin>
<!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
<plugin>
<groupId>org.apache.pluto</groupId>
<artifactId>maven-pluto-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>portlet-api</groupId>
+1 -7
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -38,12 +38,6 @@
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dojo-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
@@ -90,7 +90,6 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
return SUCCESS;
}
/**
* @param className the className to set
*/
@@ -2,24 +2,24 @@
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="chat" extends="struts-default" namespace="/chat">
<interceptors>
<interceptor name="chatAuthentication"
class="org.apache.struts2.showcase.chat.ChatAuthenticationInterceptor" />
<interceptor-stack name="chatAuthenticationStack">
<interceptor-ref name="createSession" />
<interceptor-ref name="exception"/>
<package name="chat" extends="struts-default" namespace="/chat">
<interceptors>
<interceptor name="chatAuthentication"
class="org.apache.struts2.showcase.chat.ChatAuthenticationInterceptor" />
<interceptor-stack name="chatAuthenticationStack">
<interceptor-ref name="createSession" />
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="servlet-config"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="model-driven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="static-params"/>
<interceptor-ref name="params"/>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
@@ -29,62 +29,62 @@
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="chatAuthentication" />
</interceptor-stack>
</interceptors>
<global-results>
<result name="login" type="freemarker">/chat/chatLogin.ftl</result>
</global-results>
<action name="main">
<interceptor-ref name="chatAuthentication" />
<result type="freemarker">/chat/roomSelection.ftl</result>
</action>
<action name="login" class="chatLoginAction">
<interceptor-ref name="defaultStack" />
<result type="redirect">/chat/showRooms.action</result>
<result name="input" type="freemarker">/chat/chatLogin.ftl</result>
</action>
<action name="logout" class="chatLogoutAction">
<interceptor-ref name="defaultStack" />
<result type="redirect">/chat/main.action</result>
</action>
<action name="showRooms">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/roomSelection.ftl</result>
</action>
<action name="enterRoom" class="enterRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/showRoom.ftl</result>
</action>
<action name="exitRoom" class="exitRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="redirect">/chat/showRooms.action</result>
</action>
</package>
<package name="chat-remote" extends="struts-default" namespace="/chat/ajax">
<interceptors>
<interceptor name="chatAuthentication"
class="org.apache.struts2.showcase.chat.ChatAuthenticationInterceptor" />
<interceptor-stack name="chatAuthenticationStack">
<interceptor-ref name="createSession" />
<interceptor-ref name="exception"/>
</interceptor-stack>
</interceptors>
<global-results>
<result name="login" type="freemarker">/chat/chatLogin.ftl</result>
</global-results>
<action name="main">
<interceptor-ref name="chatAuthentication" />
<result type="freemarker">/chat/roomSelection.ftl</result>
</action>
<action name="login" class="chatLoginAction">
<interceptor-ref name="defaultStack" />
<result type="redirect">/chat/showRooms.action</result>
<result name="input" type="freemarker">/chat/chatLogin.ftl</result>
</action>
<action name="logout" class="chatLogoutAction">
<interceptor-ref name="defaultStack" />
<result type="redirect">/chat/main.action</result>
</action>
<action name="showRooms">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/roomSelection.ftl</result>
</action>
<action name="enterRoom" class="enterRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/showRoom.ftl</result>
</action>
<action name="exitRoom" class="exitRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="redirect">/chat/showRooms.action</result>
</action>
</package>
<package name="chat-remote" extends="struts-default" namespace="/chat/ajax">
<interceptors>
<interceptor name="chatAuthentication"
class="org.apache.struts2.showcase.chat.ChatAuthenticationInterceptor" />
<interceptor-stack name="chatAuthenticationStack">
<interceptor-ref name="createSession" />
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="servlet-config"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="model-driven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="static-params"/>
<interceptor-ref name="params"/>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
@@ -94,42 +94,42 @@
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="chatAuthentication" />
</interceptor-stack>
</interceptors>
<action name="usersAvailable" class="usersAvailableAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/usersAvailable.ftl</result>
</action>
<action name="roomsAvailable" class="roomsAvailableAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/roomsAvailable.ftl</result>
</action>
<action name="createRoom" class="crudRoomAction" method="create">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/createRoom.ftl</result>
<result name="input" type="freemarker">/chat/createRoom.ftl</result>
</action>
<action name="messagesAvailableInRoom" class="messagesAvailableInRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/messagesAvailableInRoom.ftl</result>
<result name="input" type="freemarker">/chat/messagesAvailableInRoom.ftl</result>
</action>
<action name="sendMessageToRoom" class="sendMessageToRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/sendMessageToRoomResult.ftl</result>
<result name="input" type="freemarker">/chat/sendMessageToRoomResult.ftl</result>
</action>
<action name="usersAvailableInRoom" class="usersAvailableInRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/usersAvailableInRoom.ftl</result>
</action>
</package>
</struts>
</interceptor-stack>
</interceptors>
<action name="usersAvailable" class="usersAvailableAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/usersAvailable.ftl</result>
</action>
<action name="roomsAvailable" class="roomsAvailableAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/roomsAvailable.ftl</result>
</action>
<action name="createRoom" class="crudRoomAction" method="create">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/createRoom.ftl</result>
<result name="input" type="freemarker">/chat/createRoom.ftl</result>
</action>
<action name="messagesAvailableInRoom" class="messagesAvailableInRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/messagesAvailableInRoom.ftl</result>
<result name="input" type="freemarker">/chat/messagesAvailableInRoom.ftl</result>
</action>
<action name="sendMessageToRoom" class="sendMessageToRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/sendMessageToRoomResult.ftl</result>
<result name="input" type="freemarker">/chat/sendMessageToRoomResult.ftl</result>
</action>
<action name="usersAvailableInRoom" class="usersAvailableInRoomAction">
<interceptor-ref name="chatAuthenticationStack" />
<result type="freemarker">/chat/usersAvailableInRoom.ftl</result>
</action>
</package>
</struts>
@@ -18,13 +18,13 @@
<result name="input">enterPersonInfo.jsp</result>
</action>
<action name="showPersonJspCode">
<result type="plainText">/conversion/enterPersonInfo.jsp</result>
<result type="plaintext">/conversion/enterPersonInfo.jsp</result>
</action>
<action name="showPersonActionJavaCode">
<result type="plainText">/conversion/PersonAction.java.txt</result>
<result type="plaintext">/conversion/PersonAction.java.txt</result>
</action>
<action name="showPersonJavaCode">
<result type="plainText">/conversion/Person.java.txt</result>
<result type="plaintext">/conversion/Person.java.txt</result>
</action>
@@ -37,13 +37,13 @@
<result name="input">enterAddressInfo.jsp</result>
</action>
<action name="showAddressJspCode">
<result type="plainText">/conversion/enterAddressInfo.jsp</result>
<result type="plaintext">/conversion/enterAddressInfo.jsp</result>
</action>
<action name="showAddressActionJavaCode">
<result type="plainText">/conversion/AddressAction.java.txt</result>
<result type="plaintext">/conversion/AddressAction.java.txt</result>
</action>
<action name="showAddressJavaCode">
<result type="plainText">/conversion/Address.java.txt</result>
<result type="plaintext">/conversion/Address.java.txt</result>
</action>
@@ -56,19 +56,19 @@
<result name="input">enterOperations.jsp</result>
</action>
<action name="showEnumJspCode">
<result type="plainText">/conversion/enterOperations.jsp</result>
<result type="plaintext">/conversion/enterOperations.jsp</result>
</action>
<action name="showOperationsEnumJavaCode">
<result type="plainText">/conversion/OperationsEnum.java.txt</result>
<result type="plaintext">/conversion/OperationsEnum.java.txt</result>
</action>
<action name="showOperationEnumActionJavaCode">
<result type="plainText">/conversion/OperationsEnumAction.java.txt</result>
<result type="plaintext">/conversion/OperationsEnumAction.java.txt</result>
</action>
<action name="showEnumTypeConverterJavaCode">
<result type="plainText">/conversion/EnumTypeConverter.java.txt</result>
<result type="plaintext">/conversion/EnumTypeConverter.java.txt</result>
</action>
<action name="showOperationsEnumActionConversionProperties">
<result type="plainText">/conversion/OperationsEnumActionConversion.txt</result>
<result type="plaintext">/conversion/OperationsEnumActionConversion.txt</result>
</action>
</package>
@@ -5,44 +5,45 @@
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="integration" extends="struts1-default" namespace="/integration">
<interceptors>
<interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">org.apache.struts2.showcase.integration.GangsterForm</param>
<param name="name">gangsterForm</param>
</interceptor>
<interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
<param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml</param>
</interceptor>
<interceptor-stack name="integration">
<interceptor-ref name="staticParams"/>
<interceptor-ref name="gangsterForm"/>
<interceptor-ref name="modelDriven"/>
<package name="integration" extends="struts1-default" namespace="/integration">
<interceptors>
<interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">org.apache.struts2.showcase.integration.GangsterForm</param>
<param name="name">gangsterForm</param>
</interceptor>
<interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
<param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml</param>
</interceptor>
<interceptor-stack name="integration">
<interceptor-ref name="static-params"/>
<interceptor-ref name="gangsterForm"/>
<interceptor-ref name="model-driven"/>
<interceptor-ref name="actionForm-reset"/>
<interceptor-ref name="basicStack"/>
<interceptor-ref name="gangsterValidation"/>
<interceptor-ref name="workflow"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="integration" />
<default-action-ref name="editGangster" />
<!-- Diplay entry page that uses Model-Driven technique -->
<action name="editGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.EditGangsterAction</param>
<result>modelDriven.jsp</result>
</action>
<!-- Display the result page whose content is populated using the Model-Driven technique -->
<action name="saveGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction</param>
<param name="validate">true</param>
<result name="input">modelDriven.jsp</result>
<result>modelDrivenResult.jsp</result>
</action>
</package>
</struts>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="integration" />
<default-action-ref name="editGangster" />
<!-- Diplay entry page that uses Model-Driven technique -->
<action name="editGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.EditGangsterAction</param>
<result>modelDriven.jsp</result>
</action>
<!-- Display the result page whose content is populated using the Model-Driven technique -->
<action name="saveGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction</param>
<param name="validate">true</param>
<result name="input">modelDriven.jsp</result>
<result>modelDrivenResult.jsp</result>
</action>
</package>
</struts>
@@ -22,7 +22,7 @@
<result>/tags/non-ui/actionTag/includedPage3.jsp</result>
</action>
<action name="lookAtSource">
<result type="plainText">/tags/non-ui/actionTag/showActionTagDemo.jsp</result>
<result type="plaintext">/tags/non-ui/actionTag/showActionTagDemo.jsp</result>
</action>
</package>
@@ -104,10 +104,10 @@
<result type="freemarker">/tags/non-ui/actionPrefix/redirectActionPrefix.ftl</result>
</action>
<action name="redirectActionPrefixAction">
<result type="redirect">redirectActionPrefix</result>
<result type="redirect-action">redirectActionPrefix</result>
</action>
<action name="viewSource">
<result type="plainText">/tags/non-ui/actionPrefix/actionPrefixExample.ftl</result>
<result type="plaintext">/tags/non-ui/actionPrefix/actionPrefixExample.ftl</result>
</action>
</package>
@@ -49,7 +49,7 @@
<action name="showComponentTagExampleCode">
<result type="plainText">/tags/ui/componentTagExample.jsp</result>
<result type="plaintext">/tags/ui/componentTagExample.jsp</result>
</action>
</package>
@@ -39,7 +39,7 @@
<action name="transfer3" class="org.apache.struts2.showcase.token.TokenAction">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="tokenSession"/>
<interceptor-ref name="token-session"/>
<result name="invalid.token">doublePost.jsp</result>
<result name="success" type="redirect">transferDone.jsp</result>
</action>
+3 -1
View File
@@ -22,6 +22,8 @@
<include file="struts-hangman.xml" />
<include file="struts-continuations.xml"/>
<include file="struts-tags.xml"/>
<include file="struts-validation.xml" />
@@ -59,7 +61,7 @@
<interceptor-stack name="crudStack">
<interceptor-ref name="checkbox" />
<interceptor-ref name="params" />
<interceptor-ref name="staticParams" />
<interceptor-ref name="static-params" />
<interceptor-ref name="defaultStack" />
</interceptor-stack>
</interceptors>
@@ -5,7 +5,7 @@
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();
@@ -14,9 +14,9 @@
com.opensymphony.xwork2.util.location.Location loc = inv.getProxy().getConfig().getLocation();
sourceUrl += "?config="+(loc != null ? loc.getURI()+":"+loc.getLineNumber() : "");
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();
sourceUrl += "&page="+mapping.getNamespace()+"/"+((org.apache.struts2.dispatcher.StrutsResultSupport)inv.getResult()).getLastFinalLocation();
}
} else {
sourceUrl += "?page="+request.getServletPath();
@@ -104,11 +104,11 @@
</div><!-- end content -->
<div>
<p>
<a href="<%=sourceUrl %>">View Sources</a>
</p>
</div>
<div>
<p>
<a href="<%=sourceUrl %>">View Sources</a>
</p>
</div>
<div id="footer" class="clearfix">
<p>Copyright &copy; 2003-<s:property value="#dateAction.now.year + 1900" /> The Apache Software Foundation.</p>
</div><!-- end footer -->
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax Examples</title>
@@ -17,7 +16,7 @@
Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring")
<br/>
<sx:autocompleter name="state" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
<s:autocompleter name="state" theme="ajax" indicator="indicator1" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" searchType="substring"/>
<img id="indicator1" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<br/>
@@ -25,7 +24,7 @@ Using a JSON list returned from an action (href="/JSONList.action"), without aut
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3", it is "3" by default), without the down arrow button (showDownArrow="false")
<br/>
<sx:autocompleter indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
<s:autocompleter name="state" theme="ajax" indicator="indicator" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" showDownArrow="false"/>
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<br/>
@@ -33,35 +32,35 @@ Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3
Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true")
<br/>
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" autoComplete="true" />
<br/>
<br/>
Using a local list (list="{'apple','banana','grape','pear'}")
<br/>
<sx:autocompleter list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
<s:autocompleter theme="simple" list="{'apple','banana','grape','pear'}" cssStyle="width: 150px;"/>
<br/>
<br/>
Force valid options (forceValidOption="true")
<br/>
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" forceValidOption="true"/>
<br/>
<br/>
Make dropdown's height to 180px (dropdownHeight="180")
<br/>
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" dropdownHeight="180"/>
<br/>
<br/>
Disabled combobox (disabled="true")
<br/>
<sx:autocompleter href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
<s:autocompleter theme="ajax" href="%{jsonList}" cssStyle="width: 200px;" disabled="true"/>
<br/>
<br/>
@@ -72,9 +71,9 @@ 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.
<br/>
<form id="selectForm">
<p>Autocompleter 1 <sx:autocompleter name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
<p>Autocompleter 1 <s:autocompleter theme="simple" name="select" list="{'fruits','colors'}" value="colors" notifyTopics="/Changed" forceValidOption="true" id="sel"/></p>
</form>
Autocompleter 2 <sx:autocompleter href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
Autocompleter 2 <s:autocompleter theme="ajax" href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
<br/>
<br/>
@@ -1,5 +1,4 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<!--// START SNIPPET: common-include-->
<sx:head debug="true"/>
<s:head theme="ajax"/>
<!--// END SNIPPET: common-include-->
+2 -2
View File
@@ -15,9 +15,9 @@ Note: The Ajax tags are experimental. These examples have only been tested under
<li><a href="remotediv">Remote div tag</a></li>
<li><a href="remotelink">Remote link tag</a></li>
<li><a href="tabbedpanel">Tabbed panel</a></li>
<li><a href="widgets">Widgets </a> (may not work in all browsers!)
<li><a href="widgets">Widgets </a> (may not work in all browsers!)
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</li>
<li>(broken) <a href="remoteforms">Remote forms</a></li>
<li><a href="remoteforms">Remote forms</a></li>
</ul>
</body>
</html>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -13,7 +12,7 @@
function after() {alert("after request");}
function handler(widget, node) {
alert('I will handle this myself!');
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
}
dojo.event.topic.subscribe("/after", function(data, type, e){
@@ -34,19 +33,19 @@
A submit button, with an indicator
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" indicator="indicator"/>
<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" indicator="indicator"/>
<br/><br/>
A submit button, with "notifyTopics"
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" notifyTopics="/after"/>
<s:submit type="submit" theme="ajax" value="submit" targets="t1" href="%{ajaxTest}" align="left" notifyTopics="/after"/>
<br/><br/>
Use an image as submit
<sx:submit type="image" label="Alt Text" targets="t1"
src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" />
<s:submit type="image" theme="ajax" label="Alt Text" targets="t1"
src="${pageContext.request.contextPath}/images/struts-power.gif" href="%{ajaxTest}" align="left" />
<br/><br/>
<label for="textInput">Text to be echoed</label>
@@ -55,7 +54,7 @@ Use an image as submit
Use a button as submit (custom text)
<s:form id="form" action="AjaxTest">
<input type=textbox name="data">
<sx:submit type="button" label="Update Content" targets="t1" id="ajaxbtn"/>
<s:submit type="button" theme="ajax" label="Update Content" targets="t1" id="ajaxbtn"/>
</s:form>
<br/><br/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -12,11 +11,12 @@
<body>
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}">
Initial Content</sx:div>
Initial Content</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -18,12 +17,13 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<body>
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
handler="handler">
Initial Content</sx:div>
Initial Content</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -13,14 +12,15 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
updateFreq="2000"
indicator="indicator"
>
Initial Content</sx:div>
Initial Content</s:div>
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -13,13 +12,14 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="twoseconds"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
theme="ajax"
delay="2000"
updateFreq="%{#parameters.period}"
errorText="There was an error">Initial Content</sx:div>
errorText="There was an error">Initial Content</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -12,14 +11,15 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="fiveseconds"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
theme="ajax"
delay="1000"
updateFreq="5000"
errorText="There was an error"
loadingText="reloading">loading now</sx:div>
loadingText="reloading">loading now</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -12,13 +11,14 @@
<s:url id="ajaxNoUrl" value="/AjaxNoUrl.jsp" />
<sx:div
<s:div
id="error"
cssStyle="border: 1px solid yellow;"
href="/AjaxNoUrl.jsp"
theme="ajax"
delay="1000"
errorText="Could not contact server"
loadingText="reloading">loading now</sx:div>
loadingText="reloading">loading now</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -10,13 +9,14 @@
<body>
<sx:div
<s:div
id="error"
cssStyle="border: 1px solid yellow;"
href="/AjaxNoUrl.jsp"
theme="ajax"
delay="1000"
showErrorTransportText="true"
loadingText="reloading">loading now</sx:div>
loadingText="reloading">loading now</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -13,13 +12,14 @@
<s:url id="test3" value="/Test3.action" />
<sx:div
<s:div
id="error"
cssStyle="border: 1px solid yellow;"
href="%{test3}"
theme="ajax"
delay="1000"
executeScripts="true"
loadingText="reloading">loading now</sx:div>
loadingText="reloading">loading now</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -36,8 +35,9 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
loadingText="Loading..."
@@ -48,7 +48,7 @@
autoStart="true"
formId="form"
>
Initial Content</sx:div>
Initial Content</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -21,18 +20,11 @@
dojo.event.topic.registerPublisher("/startTimer", controller, "start");
dojo.event.topic.registerPublisher("/stopTimer", controller, "stop");
dojo.event.topic.subscribe("/before", function(data, type, e){
alert('inside a topic event. before request');
//data : source element id
//type : "before"
//e : request object
});
dojo.event.topic.subscribe("/after", function(data, type, e){
alert('inside a topic event. after request');
alert('inside a topic event. type='+type);
//data : text returned
//type : "load"
//e : undefined
//type : "before", "load" or "error"
//e : request object
});
</script>
@@ -43,8 +35,9 @@
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
id="div1"
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
listenTopics="/refresh"
@@ -52,10 +45,10 @@
stopTimerListenTopics="/stopTimer"
updateFreq="10000"
autoStart="false"
beforeNotifyTopics="/before"
afterNotifyTopics="/after"
afterLoading="alert('after request')"
notifyTopics="/after"
>
Initial Content</sx:div>
Initial Content</s:div>
<s:include value="../footer.jsp"/>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -22,83 +21,89 @@
Remote form replacing another div:<br/>
<div id='two' style="border: 1px solid yellow;"><b>initial content</b></div>
<sx:form
<s:form
id='theForm2'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO2" theme="ajax" targets="two"/>
<s:submit value="GO2" theme="ajax" targets="two"/>
</sx:form>
</s:form>
Remote form replacing the forms content:<br/>
<sx:form
<s:form
id='theForm3'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO3" targets="theForm3"/>
<s:submit value="GO3" theme="ajax" targets="theForm3"/>
</sx:form>
</s:form>
Remote form evaluating suplied JS on completion:<br/>
<sx:form
<s:form
id='theForm4'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO4" />
<s:submit value="GO4" theme="ajax"/>
</sx:form>
</s:form>
Remote form replacing the forms content after confirming results:<br/>
<sx:form
<s:form
id='theForm5'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO3" targets="theForm5" />
<s:submit value="GO3" theme="ajax" targets="theForm5" />
</sx:form>
</s:form>
Remote form replacing the forms content after running a function:<br/>
<sx:form
<s:form
id='theForm6'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO3" targets="theForm6" />
<s:submit value="GO3" theme="ajax" targets="theForm6" />
</sx:form>
</s:form>
A form with no remote submit (so should not be ajaxified):<br/>
<sx:form
<s:form
id='theForm7'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="Go AWAY" targets="theForm7" />
<s:submit value="Go AWAY" targets="theForm7" />
</sx:form>
</s:form>
</body>
</html>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -14,32 +13,10 @@
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
}
dojo.event.topic.subscribe("/before", function(data, type, e){
alert('inside a topic event. before request');
//data : source element id
//type : "before"
//e : request object
});
dojo.event.topic.subscribe("/after", function(data, type, e){
alert('inside a topic event. after request');
//data : text returned
//type : "load"
//e : undefined
});
dojo.event.topic.subscribe("/error", function(data, type, e){
alert('inside a topic event. on error');
//data : error object
//type : "error"
//e : undefined
});
dojo.event.topic.subscribe("/topics", function(data, type, e){
alert('inside a topic event. type='+type);
debugger;
//data : text returned
//type : "before", "load", "error"
//type : "before", "load" or "error"
//e : request object
});
</script>
@@ -59,42 +36,44 @@
<br/><br/>
<sx:a id="link1"
<s:a
theme="ajax"
href="%{ajaxTest}"
indicator="indicator"
targets="t1,t2"
beforeNotifyTopics="/before"
afterNotifyTopics="/after" >Update 'Div 1' and 'Div 2', publish topic '/before' and '/after', use indicator</sx:a>
targets="t1,t2" notifyTopics="/after" >Update 'Div 1' and 'Div 2', publish topic '/after', use indicator</s:a>
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<br/><br/>
<sx:a id="link2"
<s:a id="link2"
theme="ajax"
href="/AjaxNoUrl.jsp"
errorText="Error Loading"
targets="t1"
errorNotifyTopics="/error">Try to update 'Div 1', publish '/error', use custom error message</sx:a>
targets="t1">Try to update 'Div 1', use custom error message</s:a>
<br/><br/>
<sx:a id="link3"
<s:a id="link3"
theme="ajax"
href="%{ajaxTest}"
loadingText="Loading!!!"
targets="t1">Update 'Div 1', use custom loading message</sx:a>
targets="t1">Update 'Div 1', use custom loading message</s:a>
<br/><br/>
<sx:a id="link4"
<s:a id="link4"
theme="ajax"
href="%{test3}"
executeScripts="true"
targets="t2">Update 'Div 2' and execute returned javascript </sx:a>
targets="t2">Update 'Div 2' and execute returned javascript </s:a>
<br/><br/>
<sx:a id="link5"
<s:a id="link5"
theme="ajax"
href="%{ajaxTest}"
handler="handler"
targets="t2">Update 'Div 2' using a custom handler </sx:a>
targets="t2">Update 'Div 2' using a custom handler </s:a>
<br/><br/>
@@ -107,11 +86,12 @@
<br/><br/>
<sx:a id="link6"
<s:a id="link6"
theme="ajax"
href="%{ajaxTest}"
targets="t2"
formId="form"
>Update 'Div 2' with the content of the textbox </sx:a>
>Update 'Div 2' with the content of the textbox </s:a>
<br/><br/>
@@ -1,12 +1,25 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax examples - tabbled panel</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/niftycorners/niftyCorners.css"/>">
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/niftycorners/niftyPrint.css"/>" media="print">
<script type="text/javascript" src="<s:url value="/struts/niftycorners/nifty.js"/>"></script>
<script type="text/javascript">
dojo.event.connect(window, "onload", function() {
if (!NiftyCheck())
return;
Rounded("li.tab_selected", "top", "white", "transparent", "border #ffffffS");
Rounded("li.tab_unselected", "top", "white", "transparent", "border #ffffffS");
// Rounded("div#tab_header_main li","top","white","transparent","border #ffffffS");
// "white" needs to be replaced with the background color
});
</script>
</head>
<s:url id="ajaxTest" value="/AjaxTest.action" />
@@ -16,81 +29,81 @@
<table cellpadding="0" cellspacing="10" border="0" width="600">
<tr>
<td align="top">
<sx:tabbedpanel id="test" >
<sx:div id="one" label="one" >
<s:tabbedPanel id="test" >
<s:div id="one" label="one" theme="ajax">
This is the first pane<br/>
<s:form>
<s:textfield name="tt" label="Test Text"/> <br/>
<s:textfield name="tt2" label="Test Text2"/>
</s:form>
</sx:div>
<sx:div id="two" label="two" >
</s:div>
<s:div id="two" label="two" theme="ajax">
This is the second panel
</sx:div>
<sx:div id="three" label="three" >
</s:div>
<s:div id="three" label="three" theme="ajax">
This is the three
</sx:div>
</sx:tabbedpanel>
</s:div>
</s:tabbedPanel>
</td>
<td align="top">
<sx:tabbedpanel id="test2" >
<sx:div id="left" label="left" >
<s:tabbedPanel id="test2" >
<s:div id="left" label="left" theme="ajax">
This is the left pane<br/>
<s:form>
<s:textfield name="tt" label="Test Text"/> <br/>
<s:textfield name="tt2" label="Test Text2"/>
</s:form>
</sx:div>
<sx:div href="%{ajaxTest}" id="ryh1"
label="remote one"></sx:div>
<sx:div id="middle" label="middle" >
</s:div>
<s:div href="%{ajaxTest}" id="ryh1" theme="ajax"
label="remote one"></s:div>
<s:div id="middle" label="middle" theme="ajax">
middle tab<br/>
<s:form>
<s:textfield name="tt" label="Test Text44"/> <br/>
<s:textfield name="tt2" label="Test Text442"/>
</s:form>
</sx:div>
<sx:div href="%{ajaxTest}" id="ryh21" label="remote right"/>
</sx:tabbedpanel>
</s:div>
<s:div href="%{ajaxTest}" id="ryh21" theme="ajax" label="remote right"/>
</s:tabbedPanel>
</td>
</tr>
<tr>
<td align="top">
<sx:tabbedpanel id="testremote">
<sx:div href="%{ajaxTest}" id="r1" label="remote one">
<s:tabbedPanel id="testremote">
<s:div href="%{ajaxTest}" id="r1" theme="ajax" label="remote one">
<s:action name="AjaxTest" executeResult="true" />
</sx:div>
<sx:div href="%{ajaxTest}" id="r2" label="remote two"></sx:div>
<sx:div href="%{ajaxTest}" id="r3" label="remote three"></sx:div>
</sx:tabbedpanel>
</s:div>
<s:div href="%{ajaxTest}" id="r2" theme="ajax" label="remote two"></s:div>
<s:div href="%{ajaxTest}" id="r3" theme="ajax" label="remote three"></s:div>
</s:tabbedPanel>
</td>
<td align="top">
<sx:tabbedpanel id="test3" >
<sx:div id="left1" label="out one" >
<s:tabbedPanel id="test3" >
<s:div id="left1" label="out one" theme="ajax">
Outer one<br/>
<sx:tabbedpanel id="test11">
<sx:div id="i11" label="inner 1 one">Inner 1</sx:div>
<sx:div id="112" label="inner 1 two">Inner 2</sx:div>
<sx:div id="i13" label="inner 1 three">Inner 3</sx:div>
</sx:tabbedpanel>
</sx:div>
<sx:div id="middle1" label="out two" >
<s:tabbedPanel id="test11">
<s:div id="i11" label="inner 1 one">Inner 1</s:div>
<s:div id="112" label="inner 1 two">Inner 2</s:div>
<s:div id="i13" label="inner 1 three">Inner 3</s:div>
</s:tabbedPanel>
</s:div>
<s:div id="middle1" label="out two" theme="ajax">
Outer two<br/>
<sx:tabbedpanel id="test12" >
<sx:div id="i21" label="inner 2 one" >Inner 21</sx:div>
<sx:div id="122" label="inner 2 two" >Inner 22</sx:div>
<sx:div id="i23" label="inner 2 three" >Inner 23</sx:div>
</sx:tabbedpanel>
</sx:div>
<sx:div id="right1" label="out three" >
<s:tabbedPanel id="test12" >
<s:div id="i21" label="inner 2 one" theme="ajax">Inner 21</s:div>
<s:div id="122" label="inner 2 two" theme="ajax">Inner 22</s:div>
<s:div id="i23" label="inner 2 three" theme="ajax">Inner 23</s:div>
</s:tabbedPanel>
</s:div>
<s:div id="right1" label="out three" theme="ajax">
Outer three<br/>
<sx:tabbedpanel id="test13">
<sx:div id="i31" label="inner 3 one" >Inner 31</sx:div>
<sx:div id="132" label="inner 3 two" >Inner 32</sx:div>
<sx:div id="i33" label="inner 3 three" >Inner 33</sx:div>
</sx:tabbedpanel>
</sx:div>
</sx:tabbedpanel>
<s:tabbedPanel id="test13">
<s:div id="i31" label="inner 3 one" theme="ajax">Inner 31</s:div>
<s:div id="132" label="inner 3 two" theme="ajax">Inner 32</s:div>
<s:div id="i33" label="inner 3 three" theme="ajax">Inner 33</s:div>
</s:tabbedPanel>
</s:div>
</s:tabbedPanel>
</td>
</tr>
</table>
@@ -1,25 +1,27 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax examples - tabbled panel</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
</head>
<body>
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
<sx:div id="left" label="test1" >
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true">
<s:div id="left" label="test1" theme="ajax" >
I'm a Tab!!!
</sx:div >
<sx:div id="middle" label="test2" >
</s:div >
<s:div id="middle" label="test2" theme="ajax" >
I'm the other Tab!!!
</sx:div >
</s:div >
</sx:tabbedpanel>
</s:tabbedPanel>
@@ -1,6 +1,5 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -31,24 +30,24 @@
<tr>
<td align="top">
<!--// START SNIPPET: tabbedpanel-tag-->
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
<sx:div id="left" label="left">
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true">
<s:div theme="ajax" id="left" label="left">
This is the left pane<br/>
<s:form >
<s:textfield name="tt" label="Test Text" /> <br/>
<s:textfield name="tt2" label="Test Text2" />
</s:form>
</sx:div>
<sx:div href="%{ajaxTest}" id="ryh1" label="remote one" />
<sx:div id="middle" label="middle">
</s:div>
<s:div theme="ajax" href="%{ajaxTest}" id="ryh1" label="remote one" />
<s:div theme="ajax" id="middle" label="middle">
middle tab<br/>
<s:form >
<s:textfield name="tt" label="Test Text44" /> <br/>
<s:textfield name="tt2" label="Test Text442" />
</s:form>
</sx:div>
<sx:div href="%{ajaxTest}" id="ryh21" label="remote right" />
</sx:tabbedpanel>
</s:div>
<s:div theme="ajax" href="%{ajaxTest}" id="ryh21" label="remote right" />
</s:tabbedPanel>
<!--// END SNIPPET: tabbedpanel-tag-->
</td>
</tr>
@@ -1,21 +1,20 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Example 4</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>" />
</head>
<body>
<s:url id="panel1url" action="panel1" namespace="/nodecorate" />
<s:url id="panel2url" action="panel2" namespace="/nodecorate" />
<s:url id="panel3url" action="panel3" namespace="/nodecorate" />
<sx:tabbedpanel id="tabbedpanel" >
<sx:div id="panel1" label="Panel1" href="%{#panel1url}" />
<sx:div id="panel2" label="Panel2" href="%{#panel2url}" />
<sx:div id="panel3" label="Panel3" href="%{#panel3url}" />
</sx:tabbedpanel>
<s:tabbedPanel id="tabbedpanel" >
<s:div id="panel1" label="Panel1" href="%{#panel1url}" theme="ajax" />
<s:div id="panel2" label="Panel2" href="%{#panel2url}" theme="ajax" />
<s:div id="panel3" label="Panel3" href="%{#panel3url}" theme="ajax" />
</s:tabbedPanel>
</body>
</html>
@@ -1,25 +1,27 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax examples - tabbled panel</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
</head>
<body>
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true" closeButton="pane" labelposition="bottom">
<sx:div id="left" label="test1" theme="ajax" >
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height: 300px;" doLayout="true" closeButton="pane" labelposition="bottom">
<s:div id="left" label="test1" theme="ajax" >
I'm a Tab!!!
</sx:div >
<sx:div id="middle" label="test2" theme="ajax" >
</s:div >
<s:div id="middle" label="test2" theme="ajax" >
I'm the other Tab!!!
</sx:div >
</s:div >
</sx:tabbedpanel>
</s:tabbedPanel>
@@ -1,7 +1,7 @@
<div id="result">
</div>
<@sx.form action="panel2Submit" namespace="/nodecorate">
<@s.textfield label="Name" name="name" />
<@sx.submit targets="result" />
</@sx.form>
<@s.form action="panel2Submit" namespace="/nodecorate" theme="ajax">
<@s.textfield label="Name" name="name" theme="ajax" />
<@s.submit theme="ajax" resultDivId="result" />
</@s.form>
@@ -1,18 +0,0 @@
<!-- START SNIPPET: example -->
<html>
<head>
<title></title>
</head>
<body>
<#list actionMessages as msg>
${msg}
</#list>
<@s.form action="guess" method="post">
<@s.textfield label="Guess" name="guess"/>
<@s.submit value="Guess"/>
</@s.form>
</body>
</html>
<!-- END SNIPPET: example -->
@@ -11,8 +11,7 @@
<li>
<s:url id="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
<s:a href="%{#url}">Demo of usage of a Custom Freemarker Manager</s:a>
</li>
<li>
<p/>
<s:url id="url" action="standardTags" namespace="/freemarker" />
<s:a href="%{#url}">Demo of Standard Struts Freemarker Tags</s:a>
</li>
@@ -11,7 +11,7 @@
</li>
<li>
<@s.url id="url" action="hangmanAjax" namespace="/hangman" />
<@s.a href="%{#url}">Hangman (Ajax - Experimental)</@s.a>
(broken) <@s.a href="%{#url}">Hangman (Ajax - Experimental)</@s.a>
</li>
</ul>
</body>
+3 -12
View File
@@ -1,6 +1,6 @@
<%--
<%--
showcase.jsp
@version $Date$ $Id$
--%>
@@ -32,7 +32,7 @@
<p>
<%-- THIS LIST IS MAINTAINED IN WEB-INF/decorators/main.jsp TO CREATE THE MENU BAR -- EDIT THERE AND COPY HERE --%>
<ul>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/ajax/index.jsp" />">Ajax Theme for Struts Tags</a></li>
<li><a href="<s:url value="/chat/index.jsp"/>">Ajax Chat</a>
<li><a href="<s:url action="actionChain1!input" namespace="/actionchaining" includeParams="none" />">Action Chaining</a></li>
@@ -52,15 +52,6 @@
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
</ul>
<h2>Sandbox</h2>
<p>
These examples are under development and may not be fully operational.
</p>
<ul>
<li><a href="<s:url action="guess" namespace="/continuations" />">Continuations</a></li>
</ul>
</p>
</body>
@@ -1,25 +1,23 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<sx:head />
<s:head />
</head>
<body>
<table>
<sx:datetimepicker label="toggleType='wipe'" value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
<sx:datetimepicker label="toggleType='explode'" value="2006-07-22" toggleType="explode" toggleDuration="500"/>
<sx:datetimepicker label="toggleType='fade'" value="2006-06-30" toggleType="fade" toggleDuration="500"/>
<sx:datetimepicker label="With value='today'" name="dddp1" value="today" />
<sx:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
<sx:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="2006-06-26" language="en-us" />
<sx:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="25/04/1969" displayFormat="dd/MM/yyyy" />
<sx:datetimepicker label="In German" name="dddp7" value="2006-06-28" language="de" />
<sx:datetimepicker label="In Dutch" name="dddp8" value="2006-06-28" language="nl" />
<sx:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
<sx:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="2006-06-26" formatLength="long" language="de" />
<s:datetimepicker label="toggleType='wipe'" value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
<s:datetimepicker label="toggleType='explode'" value="2006-07-22" toggleType="explode" toggleDuration="500"/>
<s:datetimepicker label="toggleType='fade'" value="2006-06-30" toggleType="fade" toggleDuration="500"/>
<s:datetimepicker label="With value='today'" name="dddp1" value="today" />
<s:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
<s:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="2006-06-26" language="en-us" />
<s:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="25/04/1969" displayFormat="dd/MM/yyyy" />
<s:datetimepicker label="In German" name="dddp7" value="2006-06-28" language="de" />
<s:datetimepicker label="In Dutch" name="dddp8" value="2006-06-28" language="nl" />
<s:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
<s:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="2006-06-26" formatLength="long" language="de" />
</table>
</body>
</html>
@@ -1,11 +1,9 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<sx:head/>
<s:head/>
</head>
<body>
@@ -21,7 +19,7 @@
name="name"
tooltip="Enter your Name here" />
<sx:datetimepicker
<s:datetimepicker
tooltip="Select Your Birthday"
label="Birthday"
name="birthday" />
@@ -1,5 +1,4 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%
request.setAttribute("decorator", "none");
@@ -1,22 +1,20 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<sx:head />
<s:head />
</head>
<body>
<table>
<sx:datetimepicker label="toggleType='wipe'" type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
<sx:datetimepicker label="toggleType='explode'" type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
<sx:datetimepicker label="toggleType='fade'" type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
<sx:datetimepicker label="With value='today'" name="dddp4" type="time" value="today" />
<sx:datetimepicker label="US format, empty" name="dddp5" type="time" language="en-us" />
<sx:datetimepicker label="US format, 13:00 hours" name="dddp6" type="time" value="13:00" language="en-us" />
<sx:datetimepicker label="In German" name="dddp7" type="time" value="13:00" language="de" />
<sx:datetimepicker label="In Dutch" name="dddp8" type="time" value="13:00" language="nl" />
<s:datetimepicker label="toggleType='wipe'" type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
<s:datetimepicker label="toggleType='explode'" type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
<s:datetimepicker label="toggleType='fade'" type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
<s:datetimepicker label="With value='today'" name="dddp4" type="time" value="today" />
<s:datetimepicker label="US format, empty" name="dddp5" type="time" language="en-us" />
<s:datetimepicker label="US format, 13:00 hours" name="dddp6" type="time" value="13:00" language="en-us" />
<s:datetimepicker label="In German" name="dddp7" type="time" value="13:00" language="de" />
<s:datetimepicker label="In Dutch" name="dddp8" type="time" value="13:00" language="nl" />
</table>
</body>
</html>
@@ -1,10 +1,9 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Showcase - UI Tag Example - Tree Example (Dynamic)</title>
<sx:head/>
<s:head theme="ajax" debug="true" />
</head>
<body>
@@ -28,13 +27,14 @@
<div style="float:left; margin-right: 50px;">
<sx:tree
<s:tree
theme="ajax"
rootNode="%{treeRootNode}"
childCollectionProperty="children"
nodeIdProperty="id"
nodeTitleProperty="name"
treeSelectedTopic="treeSelected">
</sx:tree>
</s:tree>
</div>
<div id="displayId">
@@ -1,9 +1,8 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Showcase - UI Tag Example - Tree Example (Static)</title>
<sx:head />
<s:head theme="ajax" debug="true" />
</head>
<body>
@@ -26,21 +25,21 @@
<div style="float:left; margin-right: 50px;">
<sx:tree label="parent" id="parentId" templateCssPath="/struts/tree.css"
<s:tree label="parent" id="parentId" theme="ajax" templateCssPath="/struts/tree.css"
showRootGrid="true" showGrid="true" treeSelectedTopic="treeSelected">
<sx:treenode label="child1" id="child1Id">
<sx:treenode label="grandchild1" id="grandchild1Id"/>
<sx:treenode label="grandchild2" id="grandchild2Id"/>
<sx:treenode label="grandchild3" id="grandchild3Id"/>
</sx:treenode>
<sx:treenode label="child2" id="child2Id"/>
<sx:treenode label="child3" id="child3Id"/>
<sx:treenode label="child4" id="child4Id"/>
<sx:treenode label="child5" id="child5Id">
<sx:treenode label="gChild1" id="gChild1Id"/>
<sx:treenode label="gChild2" id="gChild2Id"/>
</sx:treenode>
</sx:tree>
<s:treenode theme="ajax" label="child1" id="child1Id">
<s:treenode theme="ajax" label="grandchild1" id="grandchild1Id"/>
<s:treenode theme="ajax" label="grandchild2" id="grandchild2Id"/>
<s:treenode theme="ajax" label="grandchild3" id="grandchild3Id"/>
</s:treenode>
<s:treenode theme="ajax" label="child2" id="child2Id"/>
<s:treenode theme="ajax" label="child3" id="child3Id"/>
<s:treenode theme="ajax" label="child4" id="child4Id"/>
<s:treenode theme="ajax" label="child5" id="child5Id">
<s:treenode theme="ajax" label="gChild1" id="gChild1Id"/>
<s:treenode theme="ajax" label="gChild2" id="gChild2Id"/>
</s:treenode>
</s:tree>
</div>
+10 -3
View File
@@ -33,7 +33,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<scm>
@@ -155,12 +155,13 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-api</artifactId>
<artifactId>struts2-core</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<artifactId>struts2-codebehind-plugin</artifactId>
<version>${version}</version>
</dependency>
@@ -200,6 +201,12 @@
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitegraph-plugin</artifactId>
+2 -3
View File
@@ -1,3 +1,2 @@
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-core-2.0.4.jar -destjar struts2-core-j4-2.0.4.jar
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-api-2.0.4.jar -destjar struts2-api-j4-2.0.4.jar
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/xwork-2.0.0.jar -destjar xwork-j4-2.0.0.jar
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/struts2-core-2.0.6.jar -destjar struts2-core-j4-2.0.6.jar
java -jar retrotranslator-transformer-1.2.0.jar -advanced -srcjar ../lib/xwork-2.0.1.jar -destjar xwork-j4-2.0.1.jar
+1 -7
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.0.7</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
@@ -255,12 +255,6 @@
<version>2.0.1</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.struts</groupId>-->
<!--<artifactId>struts2-api</artifactId>-->
<!--<version>${pom.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
@@ -1,5 +1,5 @@
/*
* $Id: AbstractRemoteCallUIBean.java 508285 2007-02-16 02:42:24Z musachy $
* $Id$
*
* Copyright 2006 The Apache Software Foundation.
*
@@ -15,14 +15,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.ClosingUIBean;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -30,10 +28,18 @@ import com.opensymphony.xwork2.util.ValueStack;
* AbstractRemoteCallUIBean is superclass for all components dealing with remote
* calls.
*/
/**
* TODO: Document AbstractRemoteCallUIBean.
*
* @author $Author$
* @version $Revision$ $Date$
*/
public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements RemoteUICallBean {
protected String href;
protected String errorText;
protected String afterLoading;
protected String beforeLoading;
protected String executeScripts;
protected String loadingText;
protected String listenTopics;
@@ -44,10 +50,7 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
protected String showErrorTransportText;
protected String indicator;
protected String showLoadingText;
protected String beforeNotifyTopics;
protected String afterNotifyTopics;
protected String errorNotifyTopics;
public AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request,
HttpServletResponse response) {
super(stack, request, response);
@@ -62,6 +65,10 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
addParameter("errorText", findString(errorText));
if (loadingText != null)
addParameter("loadingText", findString(loadingText));
if (afterLoading != null)
addParameter("afterLoading", findString(afterLoading));
if (beforeLoading != null)
addParameter("beforeLoading", findString(beforeLoading));
if (executeScripts != null)
addParameter("executeScripts", findValue(executeScripts, Boolean.class));
if (listenTopics != null)
@@ -82,24 +89,8 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
addParameter("showErrorTransportText", true);
if (showLoadingText != null)
addParameter("showLoadingText", findString(showLoadingText));
if (beforeNotifyTopics != null)
addParameter("beforeNotifyTopics", findString(beforeNotifyTopics));
if (afterNotifyTopics != null)
addParameter("afterNotifyTopics", findString(afterNotifyTopics));
if (errorNotifyTopics != null)
addParameter("errorNotifyTopics", findString(errorNotifyTopics));
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
@StrutsTagAttribute(description="Topic that will trigger the remote call")
public void setListenTopics(String listenTopics) {
@@ -117,6 +108,23 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
this.errorText = errorText;
}
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setAfterLoading(java.lang.String)
*/
public void setAfterLoading(String afterLoading) {
this.afterLoading = afterLoading;
}
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setBeforeLoading(java.lang.String)
*/
public void setBeforeLoading(String beforeLoading) {
this.beforeLoading = beforeLoading;
}
@StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
public void setExecuteScripts(String executeScripts) {
this.executeScripts = executeScripts;
@@ -144,7 +152,7 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
this.formId = formId;
}
@StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors")
@StrutsTagAttribute(description="Topics that will published when the remote call completes")
public void setNotifyTopics(String notifyTopics) {
this.notifyTopics = notifyTopics;
}
@@ -164,39 +172,4 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
public void setShowLoadingText(String showLoadingText) {
this.showLoadingText = showLoadingText;
}
@StrutsTagAttribute(description="The css class to use for element")
public void setCssClass(String cssClass) {
super.setCssClass(cssClass);
}
@StrutsTagAttribute(description="The css style to use for element")
public void setCssStyle(String cssStyle) {
super.setCssStyle(cssStyle);
}
@StrutsTagAttribute(description="The id to use for the element")
public void setId(String id) {
super.setId(id);
}
@StrutsTagAttribute(description="The name to set for element")
public void setName(String name) {
super.setName(name);
}
@StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)")
public void setAfterNotifyTopics(String afterNotifyTopics) {
this.afterNotifyTopics = afterNotifyTopics;
}
@StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request")
public void setBeforeNotifyTopics(String beforeNotifyTopics) {
this.beforeNotifyTopics = beforeNotifyTopics;
}
@StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)")
public void setErrorNotifyTopics(String errorNotifyTopics) {
this.errorNotifyTopics = errorNotifyTopics;
}
}
@@ -31,29 +31,109 @@ import com.opensymphony.xwork2.util.ValueStack;
/**
* <!-- START SNIPPET: javadoc -->
*
* A tag that creates a HTML &lt;a &gt;.<p/>
* A tag that creates a HTML &lt;a href='' /&gt; that when clicked calls a URL remote XMLHttpRequest call via the dojo
* framework.<p/>
*
* <!-- START SNIPPET: ajaxJavadoc -->
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
* <ul>
* <li>href</li>
* <li>errorText</li>
* <li>listenTopics</li>
* <li>notifyTopics</li>
* <li>executeScripts</li>
* <li>loadingText</li>
* <li>listenTopics</li>
* <li>handler</li>
* <li>formId</li>
* <li>formFilter</li>
* <li>targets</li>
* <li>showErrorTransportText</li>
* <li>targets</li>
* <li>indicator</li>
* </ul>
* 'resultDivId' Deprecated. Use targets.<p/>
* 'targets' is a list of element ids whose content will be updated with the
* text returned from request.<p/>
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
* 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
* 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
* request.<p/>
* 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
* and dom node are passed as parameters).<p/>
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
* in the request.<p/>
* 'formFilter' is the name of a function which will be used to filter the fields that will be
* seralized. This function takes as a parameter the element and returns true if the element
* should be included.<p/>
* 'listenTopics' comma separated list of topics names, that will trigger a request
* 'indicator' element to be shown while the request executing
* 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
* 'showLoadingText' show loading text on targets</p>
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
* <ul>
* <li>data: html or json object when type='load' or type='error'</li>
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
* <li>request: request javascript object, when type='load' or type='error'</li>
* </ul>
* <!-- END SNIPPET: javadoc -->
*
*
* <p/> <b>Examples</b>
*
* <pre>
* <!-- START SNIPPET: example1 -->
* &lt;s:a id="link1" theme="ajax" href="/DoIt.action"&gt;
* &lt;s:a id="link1" theme="ajax" href="/DoIt.action" errorText="An error ocurred" loadingText="Loading..."&gt;
* &lt;img border="none" src="&lt;%=request.getContextPath()%&gt;/images/delete.gif"/&gt;
* &lt;s:param name="id" value="1"/&gt;
* &lt;/s:a&gt;
* <!-- END SNIPPET: example1 -->
* </pre>
*
* </p>
*
* <!-- START SNIPPET: exampledescription1 -->
*
* Results in
*
* <!-- END SNIPPET: exampledescription1 -->
*
* </p>
*
* <pre>
* <!-- START SNIPPET: example2 -->
* &lt;a dojoType="BindAnchor" executeScripts="true" id="link1" href="/DoIt.action?id=1" errorText="An error ocurred"&gt;&lt;/a&gt;
* <!-- END SNIPPET: example2 -->
* </pre>
*
* </p>
*
* <!-- START SNIPPET: exampledescription2 -->
*
* Here is an example that uses the beforeLoading. This example is in altSyntax=true:
*
* <!-- END SNIPPET: exampledescription2 -->
*
* </p>
*
* <pre>
* <!-- START SNIPPET: example3 -->
* &lt;s:a id="test" theme="ajax" href="/simpeResult.action" beforeLoading="confirm('Are you sure?')"&gt;
* A
* &lt;/s:a&gt;
* <!-- END SNIPPET: example3 -->
* </pre>
*
*/
@StrutsTag(name="a", tldTagClass="org.apache.struts2.views.jsp.ui.AnchorTag", description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets")
public class Anchor extends ClosingUIBean {
public class Anchor extends AbstractRemoteCallUIBean {
public static final String OPEN_TEMPLATE = "a";
public static final String TEMPLATE = "a-close";
public static final String COMPONENT_NAME = Anchor.class.getName();
protected String href;
protected String targets;
public Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
}
@@ -65,16 +145,27 @@ public class Anchor extends ClosingUIBean {
protected String getDefaultTemplate() {
return TEMPLATE;
}
public void evaluateExtraParams() {
super.evaluateExtraParams();
if (href != null)
addParameter("href", findString(href));
if(targets != null)
addParameter("targets", findString(targets));
}
@StrutsTagAttribute(description="The URL.")
public void setHref(String href) {
this.href = href;
@StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
public void setTargets(String targets) {
this.targets = targets;
}
@StrutsTagAttribute(name="onLoadJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
public void setAfterLoading(String afterLoading) {
this.afterLoading = afterLoading;
}
@StrutsTagAttribute(name="preInvokeJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute before reload")
public void setBeforeLoading(String beforeLoading) {
this.beforeLoading = beforeLoading;
}
}
@@ -1,5 +1,5 @@
/*
* $Id: Autocompleter.java 510785 2007-02-23 03:05:33Z musachy $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.ComboBox;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -35,8 +33,48 @@ import com.opensymphony.xwork2.util.ValueStack;
* <p>The autocomplete tag is a combobox that can autocomplete text entered on the input box.
* When used on the "simple" theme, the autocompleter can be used like the ComboBox.
* When used on the "ajax" theme, the list can be retieved from an action. </p>
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
* <ul>
* <li>href</li>
* <li>errorText</li>
* <li>listenTopics</li>
* <li>notifyTopics</li>
* <li>listenTopics</li>
* <li>formId</li>
* <li>formFilter</li>
* <li>indicator</li>
* <li>loadOnTextChange</li>
* <li>loadMinimumCount</li>
* <li>showDownArrow</li>
* <li>searchType</li>
* </ul>
* 'dropdownWidth' width in pixels of the drodpdown, same as autocompleter's width by default<p/>
* 'dropdownHeight' height in pixels of the drodown, 120 px by default<p/>
* 'forceValidOption' if invalid option is selected, clear autocompleter's text when focus is lost<p/>
* 'autoComplete', if true, make suggestions on the textbox<p/>
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
* in the request.<p/>
* 'formFilter' is the name of a function which will be used to filter the fields that will be
* seralized. This function takes as a parameter the element and returns true if the element
* should be included.<p/>
* 'listenTopics' comma separated list of topics names, that will trigger a request
* 'indicator' element to be shown while the request executing
* 'showErrorTransportText': whether errors should be displayed (on 'targets')<p/>
* 'loadOnTextChange' options will be reloaded everytime a character is typed on the textbox<p/>
* 'loadMinimumCount' minimum number of characters that will force the content to be loaded<p/>
* 'showDownError' show or hide the down arrow button<p/>
* 'searchType' how the search must be performed, options are: "startstring", "startword" and "substring"<p/>
* 'keyName' name of the field to which the selected key will be assigned<p/>
* 'iconPath' path of icon used for the dropdown<p/>
* 'templateCssPath' path to css file used to customize Dojo's widget<p/>
* 'dataFieldName' name of the field to be used as the list in the returned JSON string<p/>
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
* <ul>
* <li>data: selected value when type='valuechanged'</li>
* <li>type: 'before' before the request is made, 'valuechanged' when selection changes, 'load' when the request succeeds, or 'error' when it fails</li>
* <li>request: request javascript object, when type='load' or type='error'</li>
* <ul>
*<!-- END SNIPPET: javadoc -->
*
*<!-- START SNIPPET: example -->
*<p>Autocompleter that gets its list from an action:</p>
*&lt;s:autocompleter name="test" href="%{jsonList}" autoComplete="false"/&gt;
@@ -46,7 +84,7 @@ import com.opensymphony.xwork2.util.ValueStack;
*<br/>
*<!-- END SNIPPET: example -->
*/
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
public class Autocompleter extends ComboBox {
public static final String TEMPLATE = "autocompleter";
final private static String COMPONENT_NAME = Autocompleter.class.getName();
@@ -146,17 +184,6 @@ public class Autocompleter extends ComboBox {
addParameter("key", findString(keyNameExpr));
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
protected Object findListValue() {
return (list != null) ? findValue(list, Object.class) : null;
}
@@ -267,29 +294,4 @@ public class Autocompleter extends ComboBox {
public void setDataFieldName(String dataFieldName) {
this.dataFieldName = dataFieldName;
}
@StrutsTagAttribute(description="The css class to use for element")
public void setCssClass(String cssClass) {
super.setCssClass(cssClass);
}
@StrutsTagAttribute(description="The css style to use for element")
public void setCssStyle(String cssStyle) {
super.setCssStyle(cssStyle);
}
@StrutsTagAttribute(description="The id to use for the element")
public void setId(String id) {
super.setId(id);
}
@StrutsTagAttribute(description="The name to set for element")
public void setName(String name) {
super.setName(name);
}
@StrutsTagAttribute(description="Preset the value of input element")
public void setValue(String arg0) {
super.setValue(arg0);
}
}
@@ -1,5 +1,5 @@
/*
* $Id: DateTimePicker.java 512580 2007-02-28 02:48:06Z musachy $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +18,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -29,10 +29,8 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.components.UIBean;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -127,7 +125,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
public class DateTimePicker extends UIBean {
final public static String TEMPLATE = "datetimepicker";
@@ -212,18 +210,7 @@ public class DateTimePicker extends UIBean {
}
}
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
@StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," +
" 42 day format is used", type="Boolean", defaultValue="false")
public void setAdjustWeeks(String adjustWeeks) {
@@ -302,11 +289,6 @@ public class DateTimePicker extends UIBean {
this.templateCssPath = templateCssPath;
}
@StrutsTagAttribute(description="Preset the value of input element")
public void setValue(String arg0) {
super.setValue(arg0);
}
private String format(Object obj) {
if(obj == null)
return null;
@@ -24,22 +24,102 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
/**
* <!-- START SNIPPET: javadoc -->
* Creates an HTML &lt;div&gt;
* The div tag when used on the ajax theme, provides a remote call
* from the current page to update a section of content without having to refresh the entire page.
* <p>
* It creates a HTML &lt;DIV /&gt; that obtains it's content via a remote XMLHttpRequest call via
* the dojo framework.
* </p>
* <div>
* <!-- START SNIPPET: ajaxJavadoc -->
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
* <ul>
* <li>href</li>
* <li>errorText</li>
* <li>afterLoading</li>
* <li>executeScripts</li>
* <li>loadingText</li>
* <li>listenTopics</li>
* <li>handler</li>
* <li>formId</li>
* <li>formFilter</li>
* <li>targets</li>
* <li>notifyTopics</li>
* <li>showErrorTransportText</li>
* <li>indicator</li>
* </ul>
* 'targets' is a list of element ids whose content will be updated with the
* text returned from request.<p/>
* 'href' needs to be set as an url tag reference value.<p/>
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
* 'afterLoading' Deprecated. Use 'notifyTopics'.<p/>
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
* request.<p/>
* 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
* and dom node are passed as parameters).<p/>
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
* in the request.<p/>
* 'formFilter' is the name of a function which will be used to filter the fields that will be
* seralized. This function takes as a parameter the element and returns true if the element
* should be included.<p/>
* 'updateFreq' sets(in milliseconds) the update interval.<p/>
* 'autoStart' if set to true(true by default) starts the timer automatically<p/>
* 'startTimerListenTopics' is a comma-separated list of topics used to start the timer<p/>
* 'stopTimerListenTopics' is a comma-separated list of topics used to stop the timer<p/>
* 'listenTopics' comma separated list of topics names, that will trigger a request<p/>
* 'indicator' element to be shown while the request executing<p/>
* 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
* 'showLoadingText' show loading text on targets</p>
* 'separateScript' Run scripts in a separate scope, unique for each Div<p/>
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
* <ul>
* <li>data: html or json object when type='load' or type='error'</li>
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
* <li>request: request javascript object, when type='load' or type='error'</li>
* </ul>
* <!-- END SNIPPET: javadoc -->
* </div><p> <b>Examples</b>
*
* <pre>
* <!-- START SNIPPET: example -->
* &lt;s:url id="url" action="AjaxTest" />
* &lt;s:div
* id=&quot;once&quot;
* theme=&quot;ajax&quot;
* href=&quot;%{url}&quot;
* loadingText=&quot;Loading...&quot;
* listenTopics=&quot;/refresh&quot;
* updateFreq=&quot;3000&quot;
* autoStart=&quot;true&quot;
* formId=&quot;form&quot;
*&gt;&lt;/s:div&gt;
* <!-- END SNIPPET: example -->
* </pre>
* </p>
*
*/
@StrutsTag(name="div", tldTagClass="org.apache.struts2.views.jsp.ui.DivTag", description="Render HTML div providing content from remote call via AJAX")
public class Div extends ClosingUIBean {
public class Div extends AbstractRemoteCallUIBean {
public static final String TEMPLATE = "div";
public static final String TEMPLATE_CLOSE = "div-close";
public static final String COMPONENT_NAME = Div.class.getName();
protected String updateFreq;
protected String autoStart;
protected String delay;
protected String startTimerListenTopics;
protected String stopTimerListenTopics;
protected String refreshOnShow;
protected String separateScripts;
public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
}
@@ -51,4 +131,63 @@ public class Div extends ClosingUIBean {
protected String getDefaultTemplate() {
return TEMPLATE_CLOSE;
}
public void evaluateExtraParams() {
super.evaluateExtraParams();
if (updateFreq != null)
addParameter("updateFreq", findValue(updateFreq, Integer.class));
if (autoStart != null)
addParameter("autoStart", findValue(autoStart, Boolean.class));
if (refreshOnShow != null)
addParameter("refreshOnShow", findValue(refreshOnShow, Boolean.class));
if (delay != null)
addParameter("delay", findValue(delay, Integer.class));
if (startTimerListenTopics != null)
addParameter("startTimerListenTopics", findString(startTimerListenTopics));
if (stopTimerListenTopics != null)
addParameter("stopTimerListenTopics", findString(stopTimerListenTopics));
if (separateScripts != null)
addParameter("separateScripts", findValue(separateScripts, Boolean.class));
}
@StrutsTagAttribute(description="Start timer automatically", type="Boolean", defaultValue="true")
public void setAutoStart(String autoStart) {
this.autoStart = autoStart;
}
@StrutsTagAttribute(description="How long to wait before fetching the content (in milliseconds)", type="Integer")
public void setDelay(String delay) {
this.delay = delay;
}
@StrutsTagAttribute(description="How often to reload the content (in milliseconds)", type="Integer")
public void setUpdateFreq(String updateInterval) {
this.updateFreq = updateInterval;
}
@StrutsTagAttribute(description="Topics that will start the timer (for autoupdate)")
public void setStartTimerListenTopics(String startTimerListenTopic) {
this.startTimerListenTopics = startTimerListenTopic;
}
@StrutsTagAttribute(description="Topics that will stop the timer (for autoupdate)")
public void setStopTimerListenTopics(String stopTimerListenTopic) {
this.stopTimerListenTopics = stopTimerListenTopic;
}
@StrutsTagAttribute(description="Content will be loaded when div becomes visible, used only inside tabbedPanel", type="Boolean", defaultValue="false")
public void setRefreshOnShow(String refreshOnShow) {
this.refreshOnShow = refreshOnShow;
}
@StrutsTagAttribute(description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
public void setAfterLoading(String afterLoading) {
this.afterLoading = afterLoading;
}
@StrutsTagAttribute(description="Run scripts in a separate scope, unique for each Div", defaultValue="true")
public void setSeparateScripts(String separateScripts) {
this.separateScripts = separateScripts;
}
}
@@ -33,7 +33,18 @@ import com.opensymphony.xwork2.util.ValueStack;
/**
* <!-- START SNIPPET: javadoc -->
*
* Renders parts of the HEAD section for an HTML file. Encoding can be set using this tag.
* Renders parts of the HEAD section for an HTML file. This is useful as some themes require certain CSS and JavaScript
* includes.<p/>
*
* If, for example, your page has ajax components integrated, without having the default theme set to ajax, you might
* want to use the head tag with <b>theme="ajax"</b> so that the typical ajax header setup will be included in the
* page.<p/>
*
* The tag also includes the option to set a custom datepicker theme if needed. See calendarcss parameter for
* description for details.<p/>
*
* If you use the ajax theme you can turn a debug flag on by setting the debug parameter to <tt>true</tt>.
*
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
@@ -47,12 +58,32 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example1 -->
* </pre>
*
* <pre>
* <!-- START SNIPPET: example2 -->
* &lt;head&gt;
* &lt;title&gt;My page&lt;/title&gt;
* &lt;s:head theme="ajax" calendarcss="calendar-green"/&gt;
* &lt;/head&gt;
* <!-- END SNIPPET: example2 -->
* </pre>
*
* <pre>
* <!-- START SNIPPET: example3 -->
* &lt;head&gt;
* &lt;title&gt;My page&lt;/title&gt;
* &lt;s:head theme="ajax" debug="true"/&gt;
* &lt;/head&gt;
* <!-- END SNIPPET: example3 -->
* </pre>
*
*/
@StrutsTag(name="head", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.HeadTag",
description="Render a chunk of HEAD for your HTML file")
public class Head extends UIBean {
public static final String TEMPLATE = "head";
private String calendarcss = "calendar-blue.css";
private boolean debug;
private String encoding;
public Head(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
@@ -71,6 +102,39 @@ public class Head extends UIBean {
public void evaluateParams() {
super.evaluateParams();
if (calendarcss != null) {
String css = findString(calendarcss);
if (css != null && css.trim().length() > 0) {
if (css.lastIndexOf(".css") < 0) {
addParameter("calendarcss", css + ".css");
} else {
addParameter("calendarcss", css);
}
}
}
addParameter("encoding", encoding);
addParameter("debug", Boolean.valueOf(debug).toString());
}
public String getCalendarcss() {
return calendarcss;
}
@StrutsTagAttribute(description="The jscalendar css theme to use", defaultValue="calendar-blue.css")
public void setCalendarcss(String calendarcss) {
//TODO remove this one
this.calendarcss = calendarcss;
}
public boolean isDebug() {
return debug;
}
@StrutsTagAttribute(description="Set to true to enable debugging mode for AJAX themes")
public void setDebug(boolean debug) {
this.debug = debug;
}
}
@@ -30,6 +30,7 @@ import org.apache.struts2.StrutsException;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.TextProviderSupport;
import com.opensymphony.xwork2.TextProviderFactory;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
@@ -1,5 +1,5 @@
/*
* $Id: RemoteUICallBean.java 508285 2007-02-16 02:42:24Z musachy $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +18,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
public interface RemoteUICallBean {
@@ -31,11 +31,9 @@ public interface RemoteUICallBean {
void setErrorText(String errorText);
void setAfterNotifyTopics(String afterNotifyTopics);
void setAfterLoading(String afterLoading);
void setBeforeNotifyTopics(String beforeNotifyTopics);
void setErrorNotifyTopics(String errorNotifyTopics);
void setBeforeLoading(String beforeLoading);
void setExecuteScripts(String executeScripts);
@@ -52,10 +50,5 @@ public interface RemoteUICallBean {
void setShowLoadingText(String showLoadingText);
void setIndicator(String indicator);
void setName(String name);
void setCssStyle(String style);
void setCssClass(String cssClass);
}
@@ -100,7 +100,7 @@ public class Set extends Component {
} else {
o = findValue(value);
}
body="";
String name;
@@ -44,13 +44,125 @@ import com.opensymphony.xwork2.util.ValueStack;
* Please note that the button type has advantages by adding the possibility to seperate the submitted value from the
* text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
* <pre>
* <!-- START SNIPPET: example -->
* &lt;s:submit value="%{'Submit'}" /&gt;
* <!-- END SNIPPET: example -->
* </pre>
* <pre>
* <!-- START SNIPPET: example2 -->
* Render an image submit:
* &lt;s:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/&gt;
* <!-- END SNIPPET: example2 -->
* </pre>
* <pre>
* <!-- START SNIPPET: example3 -->
* Render an button submit:
* &lt;s:submit type="button" value="%{'Submit'}" label="Submit the form"/&gt;
* <!-- END SNIPPET: example3 -->
* </pre>
*
* <!-- START SNIPPET: ajaxJavadoc -->
* <B>THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED</B>
* <ul>
* <li>href</li>
* <li>errorText</li>
* <li>listenTopics</li>
* <li>notifyTopics</li>
* <li>executeScripts</li>
* <li>loadingText</li>
* <li>listenTopics</li>
* <li>handler</li>
* <li>formId</li>
* <li>formFilter</li>
* <li>targets</li>
* <li>showErrorTransportText</li>
* <li>targets</li>
* <li>indicator</li>
* </ul>
* 'resultDivId' Deprecated. Use targets.</p>
* 'targets' is a list of element ids whose content will be updated with the
* text returned from request.<p/>
* 'errorText' is the text that will be displayed when there is an error making the request.<p/>
* 'onLoadJS' Deprecated. Use 'notifyTopics'.<p/>
* 'preInvokeJS' Deprecated. Use 'notifyTopics'.<p/>
* 'executeScripts' if set to true will execute javascript sections in the returned text.<p/>
* 'loadingText' is the text that will be displayed on the 'targets' elements while making the
* request.<p/>
* 'handler' is the name of the function that will take care of making the AJAX request. Dojo's widget
* and dom node are passed as parameters).<p/>
* 'formId' is the id of the html form whose fields will be seralized and passed as parameters
* in the request.<p/>
* 'formFilter' is the name of a function which will be used to filter the fields that will be
* seralized. This function takes as a parameter the element and returns true if the element
* should be included.<p/>
* 'listenTopics' comma separated list of topics names, that will trigger a request
* 'indicator' element to be shown while the request executing
* 'showErrorTransportText': whether errors should be displayed (on 'targets')</p>
* 'showLoadingText' show loading text on targets</p>
* 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:<p/>
* <ul>
* <li>data: html or json object when type='load' or type='error'</li>
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
* <li>request: request javascript object, when type='load' or type='error'</li>
* </ul>
* <!-- END SNIPPET: ajaxJavadoc -->
*
* <!-- START SNIPPET: ajxExDescription1 -->
* Show the results in another div. If you want your results to be shown in
* a div, use the resultDivId where the id is the id of the div you want them
* shown in. This is an inner HTML approah. Your results get jammed into
* the div for you. Here is a sample of this approach:
* <!-- END SNIPPET: ajxExDescription1 -->
*
* <pre>
* <!-- START SNIPPET: ajxExample1 -->
* Remote form replacing another div:
* &lt;div id='two' style="border: 1px solid yellow;"&gt;Initial content&lt;/div&gt;
* &lt;s:form
* id='theForm2'
* cssStyle="border: 1px solid green;"
* action='/AjaxRemoteForm.action'
* method='post'
* theme="ajax"&gt;
*
* &lt;input type='text' name='data' value='Struts User' /&gt;
* &lt;s:submit value="GO2" theme="ajax" resultDivId="two" /&gt;
*
* &lt;/s:form &gt;
* <!-- END SNIPPET: ajxExample1 -->
* </pre>
*
*/
@StrutsTag(name="submit", tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag", description="Render a submit button")
public class Submit extends FormButton {
public class Submit extends FormButton implements RemoteUICallBean{
private static final Log LOG = LogFactory.getLog(Submit.class);
final public static String TEMPLATE = "submit";
protected String href;
protected String errorText;
protected String executeScripts;
protected String loadingText;
protected String listenTopics;
protected String handler;
protected String formId;
protected String formFilter;
protected String src;
protected String notifyTopics;
protected String showErrorTransportText;
protected String indicator;
protected String showLoadingText;
//these two are called "preInvokeJS" and "onLoadJS" on the tld
//Names changed here to keep some consistency
protected String beforeLoading;
protected String afterLoading;
//this one is called "resultDivId" on the tld
protected String targets;
public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -71,12 +183,40 @@ public class Submit extends FormButton {
super.evaluateParams();
}
public void evaluateExtraParams() {
super.evaluateExtraParams();
if (href != null)
addParameter("href", findString(href));
if (errorText != null)
addParameter("errorText", findString(errorText));
if (loadingText != null)
addParameter("loadingText", findString(loadingText));
if (afterLoading != null)
addParameter("afterLoading", findString(afterLoading));
if (beforeLoading != null)
addParameter("beforeLoading", findString(beforeLoading));
if (executeScripts != null)
addParameter("executeScripts", findValue(executeScripts, Boolean.class));
if (listenTopics != null)
addParameter("listenTopics", findString(listenTopics));
if (notifyTopics != null)
addParameter("notifyTopics", findString(notifyTopics));
if (handler != null)
addParameter("handler", findString(handler));
if (formId != null)
addParameter("formId", findString(formId));
if (formFilter != null)
addParameter("formFilter", findString(formFilter));
if (src != null)
addParameter("src", findString(src));
if (indicator != null)
addParameter("indicator", findString(indicator));
if (targets != null)
addParameter("targets", findString(targets));
if (showLoadingText != null)
addParameter("showLoadingText", findString(showLoadingText));
}
/**
@@ -88,11 +228,6 @@ public class Submit extends FormButton {
return true;
}
@StrutsTagAttribute(description="Supply an image src for <i>image</i> type submit button. Will have no effect for types <i>input</i> and <i>button</i>.")
public void setSrc(String src) {
this.src = src;
}
/**
* Overrides to be able to render body in a template rather than always before the template
*/
@@ -111,4 +246,93 @@ public class Submit extends FormButton {
return false;
}
@StrutsTagAttribute(description="Topic that will trigger the remote call")
public void setListenTopics(String listenTopics) {
this.listenTopics = listenTopics;
}
@StrutsTagAttribute(description="The theme to use for the element. <b>This tag will usually use the ajax theme.</b>")
public void setTheme(String theme) {
super.setTheme(theme);
}
@StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.")
public void setHref(String href) {
this.href = href;
}
@StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content")
public void setErrorText(String errorText) {
this.errorText = errorText;
}
@StrutsTagAttribute(name="onLoadJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
public void setAfterLoading(String afterLoading) {
this.afterLoading = afterLoading;
}
@StrutsTagAttribute(name="preInvokeJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute before reload")
public void setBeforeLoading(String beforeLoading) {
this.beforeLoading = beforeLoading;
}
@StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
public void setExecuteScripts(String executeScripts) {
this.executeScripts = executeScripts;
}
@StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...")
public void setLoadingText(String loadingText) {
this.loadingText = loadingText;
}
@StrutsTagAttribute(description="Javascript function name that will make the request")
public void setHandler(String handler) {
this.handler = handler;
}
@StrutsTagAttribute(description="Function name used to filter the fields of the form.")
public void setFormFilter(String formFilter) {
this.formFilter = formFilter;
}
@StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters")
public void setFormId(String formId) {
this.formId = formId;
}
@StrutsTagAttribute(description="Supply an image src for <i>image</i> type submit button. Will have no effect for types <i>input</i> and <i>button</i>.")
public void setSrc(String src) {
this.src = src;
}
@StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
public void setTargets(String targets) {
this.targets = targets;
}
@StrutsTagAttribute(description="Topics that will published when the remote call completes")
public void setNotifyTopics(String notifyTopics) {
this.notifyTopics = notifyTopics;
}
@StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true")
public void setShowErrorTransportText(String showErrorTransportText) {
this.showErrorTransportText = showErrorTransportText;
}
@StrutsTagAttribute(description="Set indicator")
public void setIndicator(String indicator) {
this.indicator = indicator;
}
@StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="true")
public void setShowLoadingText(String showLoadingText) {
this.showLoadingText = showLoadingText;
}
}
@@ -1,5 +1,5 @@
/*
* $Id: TabbedPanel.java 508575 2007-02-16 20:46:49Z musachy $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.ClosingUIBean;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -43,7 +41,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: exdesc -->
* <pre>
* <!-- START SNIPPET: example -->
* &lt;s:tabbedpanel id=&quot;test&quot; &gt;
* &lt;s:tabbedPanel id=&quot;test&quot; &gt;
* &lt;s:div id=&quot;one&quot; label=&quot;one&quot; theme=&quot;ajax&quot; labelposition=&quot;top&quot; &gt;
* This is the first pane&lt;br/&gt;
* &lt;s:form&gt;
@@ -54,12 +52,12 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;s:div id=&quot;three&quot; label=&quot;remote&quot; theme=&quot;ajax&quot; href=&quot;/AjaxTest.action&quot; &gt;
* This is the remote tab
* &lt;/s:div&gt;
* &lt;/s:tabbedpanel&gt;
* &lt;/s:tabbedPanel&gt;
* <!-- END SNIPPET: example -->
* </pre>
*
*/
@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
@StrutsTag(name="tabbedPanel", tldTagClass="org.apache.struts2.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")
public class TabbedPanel extends ClosingUIBean {
public static final String TEMPLATE = "tabbedpanel";
public static final String TEMPLATE_CLOSE = "tabbedpanel-close";
@@ -96,17 +94,6 @@ public class TabbedPanel extends ClosingUIBean {
addParameter("templateCssPath", findString(templateCssPath));
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
public String getDefaultOpenTemplate() {
return TEMPLATE;
}
@@ -1,5 +1,5 @@
/*
* $Id: Tree.java 497654 2007-01-19 00:21:57Z rgielen $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +18,15 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import java.io.Writer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.ClosingUIBean;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -69,7 +67,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.")
@StrutsTag(name="tree", tldTagClass="org.apache.struts2.views.jsp.ui.TreeTag", description="Render a tree widget.")
public class Tree extends ClosingUIBean {
private static final String TEMPLATE = "tree-close";
@@ -213,17 +211,6 @@ public class Tree extends ClosingUIBean {
}
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
public String getDefaultOpenTemplate() {
return OPEN_TEMPLATE;
}
@@ -442,25 +429,5 @@ public class Tree extends ClosingUIBean {
public void setShowGrid(String showGrid) {
this.showGrid = showGrid;
}
@StrutsTagAttribute(description="The css class to use for element")
public void setCssClass(String cssClass) {
super.setCssClass(cssClass);
}
@StrutsTagAttribute(description="The css style to use for element")
public void setCssStyle(String cssStyle) {
super.setCssStyle(cssStyle);
}
@StrutsTagAttribute(description="The id to use for the element")
public void setId(String id) {
super.setId(id);
}
@StrutsTagAttribute(description="The name to set for element")
public void setName(String name) {
super.setName(name);
}
}
@@ -1,5 +1,5 @@
/*
* $Id: TreeNode.java 497654 2007-01-19 00:21:57Z rgielen $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.components;
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.ClosingUIBean;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
import com.opensymphony.xwork2.util.ValueStack;
@@ -81,7 +79,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.")
public class TreeNode extends ClosingUIBean {
private static final String TEMPLATE = "treenode-close";
private static final String OPEN_TEMPLATE = "treenode";
@@ -90,17 +88,6 @@ public class TreeNode extends ClosingUIBean {
super(stack, request, response);
}
@Override
@StrutsTagSkipInheritance
public void setTheme(String theme) {
super.setTheme(theme);
}
@Override
public String getTheme() {
return "ajax";
}
public String getDefaultOpenTemplate() {
return OPEN_TEMPLATE;
}
@@ -113,24 +100,4 @@ public class TreeNode extends ClosingUIBean {
public void setLabel(String label) {
super.setLabel(label);
}
@StrutsTagAttribute(description="The css class to use for element")
public void setCssClass(String cssClass) {
super.setCssClass(cssClass);
}
@StrutsTagAttribute(description="The css style to use for element")
public void setCssStyle(String cssStyle) {
super.setCssStyle(cssStyle);
}
@StrutsTagAttribute(description="The id to use for the element")
public void setId(String id) {
super.setId(id);
}
@StrutsTagAttribute(description="The name to set for element")
public void setName(String name) {
super.setName(name);
}
}
@@ -188,7 +188,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* <td>html javascript onclick attribute</td>
* </tr>
* <tr>
* <td>ondblclick</td>
* <td>ondbclick</td>
* <td>simple</td>
* <td>String</td>
* <td>html javascript ondbclick attribute</td>
@@ -311,31 +311,31 @@ import com.opensymphony.xwork2.util.ValueStack;
*
* <!-- START SNIPPET: tooltipdescription -->
*
* Every Form UI component (in xhtml / css_xhtml or any other that extends them) can
* have tooltips assigned to them. The Form component's tooltip related attribute, once
* defined, will be applied to all form UI components that are created under it unless
* explicitly overriden by having the Form UI component itself defined with their own tooltip attribute.
* Every Form UI component (in xhtml / css_xhtml or any others that extends of them) could
* have tooltip assigned to a them. The Form component's tooltip related attribute once
* defined will be applicable to all form UI component that is created under it unless
* explicitly overriden by having the Form UI component itself defined that tooltip attribute.
*
* <p/>
*
* In Example 1, the textfield will inherit the tooltipDelay and tooltipIcon attribte from
* its containing form. In other words, although it doesn't define a tooltipAboveMousePointer
* attribute, it will have that attribute inherited from its containing form.
* In Example 1, the textfield will inherit the tooltipDelay adn tooltipIcon attribte from
* its containing form. In other words, although it doesn't defined a tooltipAboveMousePointer
* attribute, it will have that attributes inherited from its containing form.
*
* <p/>
*
* In Example 2, the the textfield will inherite both the tooltipDelay and
* tooltipIcon attribute from its containing form, but the tooltipDelay
* tooltipIcon attribute from its containing form but tooltipDelay
* attribute is overriden at the textfield itself. Hence, the textfield actually will
* have its tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form, and
* tooltipDelay defined as 5000.
* have tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form and
* tooltipDelay defined as 5000, due to overriden at the textfield itself.
*
* <p/>
*
* Example 3, 4 and 5 show different ways of setting the tooltipConfig attribute.<br/>
* <b>Example 3:</b> Set tooltip config through the body of the param tag<br/>
* <b>Example 4:</b> Set tooltip config through the value attribute of the param tag<br/>
* <b>Example 5:</b> Set tooltip config through the tooltipConfig attribute of the component tag<br/>
* Example 3, 4 and 5 shows different way of setting the tooltipConfig attribute.<br/>
* <b>Example 3:</b>Set tooltip config through body of param tag<br/>
* <b>Example 4:</b>Set tooltip config through value attribute of param tag<br/>
* <b>Example 5:</b>Set tooltip config through tooltipConfig attribute of component tag<br/>
*
* <!-- END SNIPPET: tooltipdescription -->
*
@@ -346,7 +346,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;!-- Example 1: --&gt;
* &lt;s:form
* tooltipConfig="#{'tooltipDelay':'500',
* 'tooltipIcon':'/myImages/myIcon.gif'}" .... &gt;
* 'tooltipIcon='/myImages/myIcon.gif'}" .... &gt;
* ....
* &lt;s:textfield label="Customer Name" tooltip="Enter the customer name" .... /&gt;
* ....
@@ -367,7 +367,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;-- Example 3: --&gt;
* &lt;s:textfield
* label="Customer Name"
* tooltip="One of our customer Details"&gt;
* tooltip="One of our customer Details'"&gt;
* &lt;s:param name="tooltipConfig"&gt;
* tooltipDelay = 500 |
* tooltipIcon = /myImages/myIcon.gif
@@ -81,7 +81,7 @@ import com.opensymphony.xwork2.util.location.LocatableProperties;
* <td>com.opensymphony.xwork2.util.ObjectTypeDeterminer</td>
* <td>struts.objectTypeDeterminer</td>
* <td>singleton</td>
* <td>Determines what the key and element class of a Map or Collection should be</td>
* <td>Determines what the key and and element class of a Map or Collection should be</td>
* </tr>
* <tr>
* <td>org.apache.struts2.dispatcher.mapper.ActionMapper</td>
@@ -49,7 +49,7 @@ import java.lang.reflect.Method;
* }
* </code>
* <p/>
* If the action URL is "foo!bar", then the "foo" action is invoked,
* If the action URL is "foo!bar", the the "foo" action is invoked,
* calling "bar" instead of "execute".
* <p/>
* Instead of scanning each request at runtime, the provider creates action mappings
@@ -403,7 +403,7 @@ Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyExcepti
TextProvider textProvider = container.getInstance(TextProvider.class);
TextProviderFactory.setInstance(textProvider);
return container;
}
@@ -110,9 +110,9 @@ import com.opensymphony.xwork2.ActionContext;
* database access credentials.
*
* <p/>
*
*
* <p>
*
*
* This filter supports the following init-params:
* <!-- START SNIPPET: params -->
*
@@ -122,15 +122,15 @@ import com.opensymphony.xwork2.ActionContext;
*
* <li><b>actionPackages</b> - a comma-delimited list of Java packages to scan for Actions.</li>
*
* <li><b>configProviders</b> - a comma-delimited list of Java classes that implement the
* {@link ConfigurationProvider} interface that should be used for building the {@link Configuration}.</li>
*
* <li><b>configProviders</b> - a comma-delimited list of Java classes that implement the
* {@link com.opensymphony.xwork2.config.ConfigurationProvider} interface that should be used for building the {@link com.opensymphony.xwork2.config.Configuration}.</li>
*
* <li><b>*</b> - any other parameters are treated as framework constants.</li>
*
*
* </ul>
*
* <!-- END SNIPPET: params -->
*
*
* </p>
*
* To use a custom {@link Dispatcher}, the <code>createDispatcher()</code> method could be overriden by
@@ -195,11 +195,11 @@ public class FilterDispatcher implements StrutsStatics, Filter {
* @param filterConfig The filter configuration
*/
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
this.filterConfig = filterConfig;
dispatcher = createDispatcher(filterConfig);
dispatcher.init();
String param = filterConfig.getInitParameter("packages");
String packages = "org.apache.struts2.static template org.apache.struts2.interceptor.debugging";
if (param != null) {
@@ -221,13 +221,13 @@ public class FilterDispatcher implements StrutsStatics, Filter {
dispatcher.cleanup();
}
}
/**
* Create a default {@link Dispatcher} that subclasses can override
* with a custom Dispatcher, if needed.
*
* @param filterConfig Our FilterConfig
* @return Initialized Dispatcher
* @return Initialized Dispatcher
*/
protected Dispatcher createDispatcher(FilterConfig filterConfig) {
Map<String,String> params = new HashMap<String,String>();
@@ -247,7 +247,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
public static void setServeStaticContent(String val) {
serveStatic = "true".equals(val);
}
/**
* Modify state of StrutsConstants.STRUTS_SERVE_STATIC_BROWSER_CACHE setting.
* @param val New setting
@@ -256,7 +256,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
public static void setServeStaticBrowserCache(String val) {
serveStaticBrowserCache = "true".equals(val);
}
/**
* Modify state of StrutsConstants.STRUTS_I18N_ENCODING setting.
* @param val New setting
@@ -265,7 +265,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
public static void setEncoding(String val) {
encoding = val;
}
/**
* Modify ActionMapper instance.
* @param mapper New instance
@@ -274,7 +274,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
public static void setActionMapper(ActionMapper mapper) {
actionMapper = mapper;
}
/**
* Provide a workaround for some versions of WebLogic.
* <p/>
@@ -323,7 +323,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
} else {
dispatcher = du;
}
try {
// Wrap request first, just in case it is multipart/form-data
// parameters might not be accessible through before encoding (ww-1278)
@@ -372,14 +372,14 @@ public class FilterDispatcher implements StrutsStatics, Filter {
* Otherwise, if the request is for a static resource,
* the resource is copied directly to the response, with the appropriate caching headers set.
* <p/>
* If the request does not match an action mapping, or a static resource page,
* If the request does not match an action mapping, or a static resource page,
* then it passes through.
*
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
ServletContext servletContext = getServletContext();
@@ -430,7 +430,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
/**
* Locate a static resource and copy directly to the response,
* setting the appropriate caching headers.
* setting the appropriate caching headers.
*
* @param name The resource name
* @param request The request
@@ -443,35 +443,35 @@ public class FilterDispatcher implements StrutsStatics, Filter {
InputStream is = findInputStream(name, pathPrefix);
if (is != null) {
Calendar cal = Calendar.getInstance();
// check for if-modified-since, prior to any other headers
long ifModifiedSince = 0;
try {
ifModifiedSince = request.getDateHeader("If-Modified-Since");
ifModifiedSince = request.getDateHeader("If-Modified-Since");
} catch (Exception e) {
LOG.warn("Invalid If-Modified-Since header value: '" + request.getHeader("If-Modified-Since") + "', ignoring");
LOG.warn("Invalid If-Modified-Since header value: '" + request.getHeader("If-Modified-Since") + "', ignoring");
}
long lastModifiedMillis = lastModifiedCal.getTimeInMillis();
long now = cal.getTimeInMillis();
long lastModifiedMillis = lastModifiedCal.getTimeInMillis();
long now = cal.getTimeInMillis();
cal.add(Calendar.DAY_OF_MONTH, 1);
long expires = cal.getTimeInMillis();
if (ifModifiedSince > 0 && ifModifiedSince <= lastModifiedMillis) {
// not modified, content is not sent - only basic headers and status SC_NOT_MODIFIED
if (ifModifiedSince > 0 && ifModifiedSince <= lastModifiedMillis) {
// not modified, content is not sent - only basic headers and status SC_NOT_MODIFIED
response.setDateHeader("Expires", expires);
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
is.close();
return;
}
// set the content-type header
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
is.close();
return;
}
// set the content-type header
String contentType = getContentType(name);
if (contentType != null) {
response.setContentType(contentType);
}
if (serveStaticBrowserCache) {
// set heading information for caching static content
// set heading information for caching static content
response.setDateHeader("Date", now);
response.setDateHeader("Expires", expires);
response.setDateHeader("Retry-After", expires);
@@ -537,7 +537,7 @@ public class FilterDispatcher implements StrutsStatics, Filter {
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
}
output.flush();
output.flush(); // WW-1526
}
/**
@@ -46,7 +46,7 @@ import com.opensymphony.xwork2.inject.Container;
*
* Default action mapper implementation, using the standard *.[ext] (where ext
* usually "action") pattern. The extension is looked up from the Struts
* configuration key <b>struts.action.extension</b>.
* configuration key <b>struts.action.exection</b>.
*
* <p/> To help with dealing with buttons and other related requirements, this
* mapper (and other {@link ActionMapper}s, we hope) has the ability to name a
@@ -87,11 +87,11 @@ import com.opensymphony.xwork2.inject.Container;
*
* <pre>
* &lt;!-- START SNIPPET: method-example --&gt;
* &lt;s:form action=&quot;baz&quot;&gt;
* &lt;s:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;s:submit value=&quot;Create person&quot;/&gt;
* &lt;s:submit name=&quot;method:anotherMethod&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/s:form&gt;
* &lt;a:form action=&quot;baz&quot;&gt;
* &lt;a:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;a:submit value=&quot;Create person&quot;/&gt;
* &lt;a:submit name=&quot;method:anotherMethod&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/a:form&gt;
* &lt;!-- END SNIPPET: method-example --&gt;
* </pre>
*
@@ -108,11 +108,11 @@ import com.opensymphony.xwork2.inject.Container;
*
* <pre>
* &lt;!-- START SNIPPET: action-example --&gt;
* &lt;s:form action=&quot;baz&quot;&gt;
* &lt;s:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;s:submit value=&quot;Create person&quot;/&gt;
* &lt;s:submit name=&quot;action:anotherAction&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/s:form&gt;
* &lt;a:form action=&quot;baz&quot;&gt;
* &lt;a:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;a:submit value=&quot;Create person&quot;/&gt;
* &lt;a:submit name=&quot;action:anotherAction&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/a:form&gt;
* &lt;!-- END SNIPPET: action-example --&gt;
* </pre>
*
@@ -129,11 +129,11 @@ import com.opensymphony.xwork2.inject.Container;
*
* <pre>
* &lt;!-- START SNIPPET: redirect-example --&gt;
* &lt;s:form action=&quot;baz&quot;&gt;
* &lt;s:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;s:submit value=&quot;Create person&quot;/&gt;
* &lt;s:submit name=&quot;redirect:www.google.com&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/s:form&gt;
* &lt;a:form action=&quot;baz&quot;&gt;
* &lt;a:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;a:submit value=&quot;Create person&quot;/&gt;
* &lt;a:submit name=&quot;redirect:www.google.com&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/a:form&gt;
* &lt;!-- END SNIPPET: redirect-example --&gt;
* </pre>
*
@@ -151,11 +151,11 @@ import com.opensymphony.xwork2.inject.Container;
*
* <pre>
* &lt;!-- START SNIPPET: redirect-action-example --&gt;
* &lt;s:form action=&quot;baz&quot;&gt;
* &lt;s:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;s:submit value=&quot;Create person&quot;/&gt;
* &lt;s:submit name=&quot;redirect-action:dashboard&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/s:form&gt;
* &lt;a:form action=&quot;baz&quot;&gt;
* &lt;a:textfield label=&quot;Enter your name&quot; name=&quot;person.name&quot;/&gt;
* &lt;a:submit value=&quot;Create person&quot;/&gt;
* &lt;a:submit name=&quot;redirect-action:dashboard&quot; value=&quot;Cancel&quot;/&gt;
* &lt;/a:form&gt;
* &lt;!-- END SNIPPET: redirect-action-example --&gt;
* </pre>
*
@@ -117,11 +117,11 @@ import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
* &lt;html&gt;
* &lt;head&gt;
* &lt;title&gt;Please wait&lt;/title&gt;
* &lt;meta http-equiv="refresh" content="5;url=&lt;s:url includeParams="all" /&gt;"/&gt;
* &lt;meta http-equiv="refresh" content="5;url=&lt;a:url includeParams="all" /&gt;"/&gt;
* &lt;/head&gt;
* &lt;body&gt;
* Please wait while we process your request.
* Click &lt;a href="&lt;s:url includeParams="all" /&gt;">&lt;/a&gt; if this page does not reload automatically.
* Click &lt;a href="&lt;a:url includeParams="all" /&gt;">&lt;/a&gt; if this page does not reload automatically.
* &lt;/body&gt;
* &lt;/html&gt;
* </pre>
@@ -125,10 +125,10 @@ import com.opensymphony.xwork2.util.LocalizedTextUtil;
*
* And then you need to set encoding <code>multipart/form-data</code> in the form where the user selects the file to upload.
* <pre>
* &lt;s:form action="doUpload" method="post" enctype="multipart/form-data"&gt;
* &lt;s:file name="upload" label="File"/&gt;
* &lt;s:submit/&gt;
* &lt;/s:form&gt;
* &lt;a:form action="doUpload" method="post" enctype="multipart/form-data"&gt;
* &lt;a:file name="upload" label="File"/&gt;
* &lt;a:submit/&gt;
* &lt;/a:form&gt;
* </pre>
*
* And then in your action code you'll have access to the File object if you provide setters according to the
@@ -111,7 +111,7 @@ public class TokenSessionStoreInterceptor extends TokenInterceptor {
ActionContext ac = invocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest) ac.get(ServletActionContext.HTTP_REQUEST);
HttpServletResponse response = (HttpServletResponse) ac.get(ServletActionContext.HTTP_RESPONSE);
HttpServletResponse response = (HttpServletResponse) ac.get(ServletActionContext.HTTP_RESPONSE);
String tokenName = TokenHelper.getTokenName();
String token = TokenHelper.getToken(tokenName);
@@ -31,6 +31,7 @@ import org.apache.struts2.views.velocity.components.ActionDirective;
import org.apache.struts2.views.velocity.components.ActionErrorDirective;
import org.apache.struts2.views.velocity.components.ActionMessageDirective;
import org.apache.struts2.views.velocity.components.AnchorDirective;
import org.apache.struts2.views.velocity.components.AutocompleterDirective;
import org.apache.struts2.views.velocity.components.BeanDirective;
import org.apache.struts2.views.velocity.components.CheckBoxDirective;
import org.apache.struts2.views.velocity.components.CheckBoxListDirective;
@@ -39,6 +40,7 @@ import org.apache.struts2.views.velocity.components.ComponentDirective;
import org.apache.struts2.views.velocity.components.DateDirective;
import org.apache.struts2.views.velocity.components.DivDirective;
import org.apache.struts2.views.velocity.components.DoubleSelectDirective;
import org.apache.struts2.views.velocity.components.DateTimePickerDirective;
import org.apache.struts2.views.velocity.components.FieldErrorDirective;
import org.apache.struts2.views.velocity.components.FileDirective;
import org.apache.struts2.views.velocity.components.FormDirective;
@@ -57,10 +59,13 @@ import org.apache.struts2.views.velocity.components.ResetDirective;
import org.apache.struts2.views.velocity.components.SelectDirective;
import org.apache.struts2.views.velocity.components.SetDirective;
import org.apache.struts2.views.velocity.components.SubmitDirective;
import org.apache.struts2.views.velocity.components.TabbedPanelDirective;
import org.apache.struts2.views.velocity.components.TextAreaDirective;
import org.apache.struts2.views.velocity.components.TextDirective;
import org.apache.struts2.views.velocity.components.TextFieldDirective;
import org.apache.struts2.views.velocity.components.TokenDirective;
import org.apache.struts2.views.velocity.components.TreeDirective;
import org.apache.struts2.views.velocity.components.TreeNodeDirective;
import org.apache.struts2.views.velocity.components.URLDirective;
import org.apache.struts2.views.velocity.components.UpDownSelectDirective;
import org.apache.struts2.views.velocity.components.WebTableDirective;
@@ -87,7 +92,9 @@ public class DefaultTagLibrary implements TagLibrary {
ComboBoxDirective.class,
ComponentDirective.class,
DateDirective.class,
DateTimePickerDirective.class,
DivDirective.class,
AutocompleterDirective.class,
DoubleSelectDirective.class,
FileDirective.class,
FormDirective.class,
@@ -106,10 +113,13 @@ public class DefaultTagLibrary implements TagLibrary {
SetDirective.class,
SubmitDirective.class,
ResetDirective.class,
TabbedPanelDirective.class,
TextAreaDirective.class,
TextDirective.class,
TextFieldDirective.class,
TokenDirective.class,
TreeDirective.class,
TreeNodeDirective.class,
URLDirective.class,
WebTableDirective.class,
ActionErrorDirective.class,
@@ -1,36 +0,0 @@
/*
* $Id: StrutsTag.java 502294 2007-02-01 17:28:00Z niallp $
*
* 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.views.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks a class as the top class in the class hierarchy scanned for tag annotations
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface StrutsTagSkipInheritance {
}
@@ -1,5 +1,5 @@
/*
* $Id: AutocompleterModel.java 502294 2007-02-01 17:28:00Z niallp $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,14 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.views.freemarker.tags;
package org.apache.struts2.views.freemarker.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.Autocompleter;
import org.apache.struts2.views.freemarker.tags.TagModel;
import org.apache.struts2.components.Autocompleter;
import com.opensymphony.xwork2.util.ValueStack;
@@ -1,5 +1,5 @@
/*
* $Id: DateTimePickerModel.java 493867 2007-01-07 22:26:23Z mrdon $
* $Id$
*
* Copyright 2006 The Apache Software Foundation.
*
@@ -15,14 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.struts2.dojo.views.freemarker.tags;
package org.apache.struts2.views.freemarker.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.DateTimePicker;
import org.apache.struts2.views.freemarker.tags.TextFieldModel;
import org.apache.struts2.components.DateTimePicker;
import com.opensymphony.xwork2.util.ValueStack;
@@ -42,6 +42,7 @@ public class StrutsModels {
protected ComboBoxModel comboBox;
protected ComponentModel component;
protected DateModel date;
protected DateTimePickerModel dateTimePicker;
protected DivModel div;
protected DoubleSelectModel doubleselect;
protected FileModel file;
@@ -60,6 +61,7 @@ public class StrutsModels {
protected SetModel set;
protected SubmitModel submit;
protected ResetModel reset;
protected TabbedPanelModel tabbedPanel;
protected TextAreaModel textarea;
protected TextModel text;
protected TextFieldModel textfield;
@@ -72,11 +74,14 @@ public class StrutsModels {
protected ActionMessageModel actionmessage;
protected FieldErrorModel fielderror;
protected OptionTransferSelectModel optiontransferselect;
protected TreeModel treeModel;
protected TreeNodeModel treenodeModel;
protected UpDownSelectModel updownselect;
protected OptGroupModel optGroupModel;
protected IfModel ifModel;
protected ElseModel elseModel;
protected ElseIfModel elseIfModel;
protected AutocompleterModel autocompleterModel;
protected InputTransferSelectModel inputtransferselect;
@@ -110,6 +115,14 @@ public class StrutsModels {
return comboBox;
}
public AutocompleterModel getAutocompleter() {
if (autocompleterModel == null) {
autocompleterModel = new AutocompleterModel(stack, req, res);
}
return autocompleterModel;
}
public ComponentModel getComponent() {
if (component == null) {
component = new ComponentModel(stack, req, res);
@@ -229,6 +242,14 @@ public class StrutsModels {
return date;
}
public DateTimePickerModel getDateTimePicker() {
if (dateTimePicker == null) {
dateTimePicker = new DateTimePickerModel(stack, req, res);
}
return dateTimePicker;
}
public TokenModel getToken() {
if (token == null) {
token = new TokenModel(stack, req, res);
@@ -309,6 +330,14 @@ public class StrutsModels {
return text;
}
public TabbedPanelModel getTabbedPanel() {
if (tabbedPanel == null) {
tabbedPanel = new TabbedPanelModel(stack, req, res);
}
return tabbedPanel;
}
public BeanModel getBean() {
if (bean == null) {
bean = new BeanModel(stack, req, res);
@@ -388,6 +417,20 @@ public class StrutsModels {
return optiontransferselect;
}
public TreeModel getTree() {
if (treeModel == null) {
treeModel = new TreeModel(stack,req, res);
}
return treeModel;
}
public TreeNodeModel getTreenode() {
if (treenodeModel == null) {
treenodeModel = new TreeNodeModel(stack, req, res);
}
return treenodeModel;
}
public UpDownSelectModel getUpdownselect() {
if (updownselect == null) {
updownselect = new UpDownSelectModel(stack, req, res);
@@ -1,5 +1,5 @@
/*
* $Id: TabbedPanelModel.java 471756 2006-11-06 15:01:43Z husted $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,14 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.views.freemarker.tags;
package org.apache.struts2.views.freemarker.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.TabbedPanel;
import org.apache.struts2.views.freemarker.tags.TagModel;
import org.apache.struts2.components.TabbedPanel;
import com.opensymphony.xwork2.util.ValueStack;
@@ -1,5 +1,5 @@
/*
* $Id: TreeModel.java 471756 2006-11-06 15:01:43Z husted $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,14 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.views.freemarker.tags;
package org.apache.struts2.views.freemarker.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.Tree;
import org.apache.struts2.views.freemarker.tags.TagModel;
import org.apache.struts2.components.Tree;
import com.opensymphony.xwork2.util.ValueStack;
@@ -1,5 +1,5 @@
/*
* $Id: TreeNodeModel.java 471756 2006-11-06 15:01:43Z husted $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,14 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dojo.views.freemarker.tags;
package org.apache.struts2.views.freemarker.tags;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.TreeNode;
import org.apache.struts2.views.freemarker.tags.TagModel;
import org.apache.struts2.components.TreeNode;
import com.opensymphony.xwork2.util.ValueStack;

Some files were not shown because too many files have changed in this diff Show More