Compare commits

...

161 Commits

Author SHA1 Message Date
Ted Nathan Husted b3f712eb1b WW-1974 Tag r558747 as Struts 2.0.9
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9@558805 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 17:24:17 +00:00
Ted Nathan Husted 0b4762bfab WW-1974 Tag r558747 as Struts 2.0.9
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9@558749 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 14:43:37 +00:00
Ted Nathan Husted 43d490927d WW-1974 Update POM for Struts 2.0.9. Small changes to Showcase prompts. See issue comment, items (5)-(7)
* The Ajax Hangman isn't "broken" anymore, but it does fail to report when a player wins. 
* At Validation/Field Validators <http://planetstruts.org/struts2-showcase/validation/showFieldValidatorsExamples.action>, the prompt for the date field is still misleading and encourages entry of the wrong style. 
* At Validation <http://localhost:8080/struts2-showcase/validation/index.jsp>, Validation (ajax) is no longer "broken". 


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@558747 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 14:39:55 +00:00
Ted Nathan Husted d53c2bfff3 WW-1974 Update for latest Retrotranslator.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@558690 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 11:43:05 +00:00
James Holmes a14bf5e249 Minor error message change.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@558574 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 01:01:37 +00:00
James Holmes 55a551baa2 WW-2051 add additional javascript hooks for optiontransferselect
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@558460 13f79535-47bb-0310-9956-ffa450edef68
2007-07-22 04:16:29 +00:00
Antonio Petrelli 9f68f0446c WW-1724
Merge from trunk to STRUTS_2_0_X branch.
Added code to Struts 2 showcase to show that the content type is present even with a FreeMarker result, i.e. with a FreeMarker layout page.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@558289 13f79535-47bb-0310-9956-ffa450edef68
2007-07-21 10:41:12 +00:00
James Holmes 8db503996d Fix test failures caused by the fix for WW-1887. FreeMarker was complaining about the toString() call when it was applied to the value created by this tag: <#assign itemKey = ''/>.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557736 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 18:57:37 +00:00
Rainer Hermanns 50c3b36776 Tag doc update
Issue Number: WW-1974

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557702 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 17:32:48 +00:00
Rainer Hermanns 329bb930f0 Updating to xwork 2.0.4 release
o xwork 2.0.4 contains the fix for the critical security issue
  (see https://issues.apache.org/struts/browse/WW-2030 for details)

Note: The xwork group id changed from 'opensymphony' to 'com.opensymphony'

Issue Number: WW-2030

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557701 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 17:31:26 +00:00
James Holmes 3ccfbbfde0 Update to conform to the Struts 2 DTD instead of the XWork DTD.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557691 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 17:05:24 +00:00
James Holmes b23b4f0cc3 WW-1887 struts template/simple/select.ftl error/fix
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557644 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 14:47:28 +00:00
James Holmes ac503f6260 WW-1850 struts-default package in struts-default.xml should be abstract
This is a backport of the fix made on the trunk for 2.1.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557639 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 14:23:05 +00:00
James Holmes 165b4e7799 WW-1854 XSLTResult excludingPattern Property is Missing
This is a backport of the fix made on the trunk for 2.1.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557637 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 14:20:13 +00:00
James Holmes 6fcf3cfb56 WW-2020 bug in struts.xml of the portlet demo (bad result URL)
This is a backport of the fix made on the trunk for 2.1.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557624 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 13:49:57 +00:00
James Holmes 3559945b53 Fix some typos and bad english.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557614 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 13:28:49 +00:00
Antonio Petrelli df0084419b WW-1724
Merged from trunk to 2_0_X branch.
The request context for Struts 2 - Tiles 2 integration tries to dispatch the request if possible.
It includes it only if the response has been committed, or if it is a FreeMarker request (this must be fixed).

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557352 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 18:23:36 +00:00
James Holmes 4f11ad0878 Update docs per WW-1954.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557348 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 18:15:37 +00:00
James Holmes 5ae898d0c8 Fix test failures caused by the fix for WW-1618. It turns out that the doubleId was not being handled consistent with the way id is handled. I updated DoubleListUIBean.java to handle doubleId the same way as id. Basically doubleId will now be assigned the same value as doubleName if doubleId does not have a value.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557345 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 18:05:09 +00:00
James Holmes 473deb12f2 WW-2031 Update struts-2.0.dtd for empty interceptor stack
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557317 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 16:33:55 +00:00
James Holmes 68a045ccc7 WW-1851 Struts 2.0 DTD missing "default-class-ref" element
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557299 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 15:41:06 +00:00
James Holmes 2522690491 WW-1618 ww:doubleselect javascript uses name instead of id, resulting in array names that don't work
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557294 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 15:26:59 +00:00
James Holmes 99be8e33cd WW-2011 Struts result are not parsed by default
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557291 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 15:17:41 +00:00
Antonio Petrelli 350ffdcf87 WW-1992
Merge from Struts 2 trunk to 2.0 branch.
Added tiles-jsp to assembly.


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@547709 13f79535-47bb-0310-9956-ffa450edef68
2007-06-15 15:20:10 +00:00
Musachy Barroso e5b380be24 Update version number to 2.0.8
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@546850 13f79535-47bb-0310-9956-ffa450edef68
2007-06-13 12:56:06 +00:00
Antonio Petrelli 3285a37ebd WW-1973
Merge from trunk.
Updated Struts2-Tiles plugin to depend on Tiles 2.0.4.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@545186 13f79535-47bb-0310-9956-ffa450edef68
2007-06-07 14:12:59 +00:00
Rainer Hermanns d4f5483489 Updating link to 2.0.9 release notes
Issue Number: WW-1974

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@544898 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 17:51:00 +00:00
Rainer Hermanns 66a507c643 Adding a translate.sh script to backports for OSX/Linux environments
Issue Number: WW-1974

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@544884 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 16:55:42 +00:00
Rainer Hermanns 9bca8b98cc Preparing 2.0.9 development
o updating pom.xml to 2.0.9-SNAPSHOT

Issue Number: WW-1974

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@544883 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 16:54:35 +00:00
Rainer Hermanns 76b2800d18 Commenting api inclusion for assembly goal
Issue Number: WW-1834

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@544865 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 15:24:26 +00:00
Rainer Hermanns 8373599f01 Removing SNAPSHOT for Struts 2.0.8 release
o updated all pom.xml
o updated backport/translate.bat
o updated dependency on struts-annotations to 1.0.2 release

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@544857 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 14:45:50 +00:00
Musachy Barroso 70341ac8b0 Fix example typo
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@543179 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 16:28:42 +00:00
Musachy Barroso d304ea3ffd Remove confusing comment
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@543174 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 16:04:00 +00:00
Rainer Hermanns 97d6872beb Bundle XWork 2.0.3
o updating XWork dep to 2.0.3 release
o added OpenSymphony maven2 repository

Issue Number: WW-1902

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@542529 13f79535-47bb-0310-9956-ffa450edef68
2007-05-29 14:13:56 +00:00
Donald J. Brown 042e6c0422 Fixing tag output to be more xhtml compliant, adding mapper extension test
WW-1649


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541982 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 13:04:02 +00:00
Antonio Petrelli 157cc6583c WW-1942
Merge from trunk to STRUTS_2_0_X branch.
In the URL spaces are converted into %20, while in the file must be spaces.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541676 13f79535-47bb-0310-9956-ffa450edef68
2007-05-25 14:48:33 +00:00
Donald J. Brown 13e976f502 Fixed request parameters to use linkedhashmap
WW-1942


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541528 13f79535-47bb-0310-9956-ffa450edef68
2007-05-25 04:01:23 +00:00
Donald J. Brown 411ffc127a Changing component parameters to use linkedHashMap (preserve order), fixed tests
to reflect this
WW-1942


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541522 13f79535-47bb-0310-9956-ffa450edef68
2007-05-25 03:33:45 +00:00
Wendy Smoak 2c9a23eaef Use released version 2.0-alpha-4 of maven-dependency-plugin
WW-1943


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541185 13f79535-47bb-0310-9956-ffa450edef68
2007-05-24 05:41:11 +00:00
Wendy Smoak 4a6c4ad085 Update to released 1.0-alpha-10 version of plexus-container-default.
The latest release is 1.0-alpha-24 but the plugin will not compile against it.
WW-1943


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541178 13f79535-47bb-0310-9956-ffa450edef68
2007-05-24 05:33:05 +00:00
Wendy Smoak 53d2f7ea4a Use the 1.0-alpha-2 release (2007-03-14) of retrotranslator-maven-plugin.
WW-1943


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@541159 13f79535-47bb-0310-9956-ffa450edef68
2007-05-24 04:36:53 +00:00
Antonio Petrelli d176c997bf WW-1941
Merge from trunk to STRUTS_2_0_X branch.
Updated Struts 2 - Tiles 2 plugin to use Tiles 2.0.3 in trunk.
Updated Struts 2 showcase to the changes of Struts 2 - Tiles 2 plugin.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540974 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 15:16:35 +00:00
Donald J. Brown d543af34cc Changing id parameter name on restful action mapper to optional
WW-1715


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540814 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 02:46:05 +00:00
Donald J. Brown 845f524255 Fixed NPE in subset iterator tag
WW-1932


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540569 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 12:54:52 +00:00
Donald J. Brown 6b9175c510 Better handling of requests that have no cookies
WW-1920


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540560 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 12:31:49 +00:00
Donald J. Brown 0a70a1e477 Fixing selected item not recognized
WW-1907


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540554 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 12:18:33 +00:00
Donald J. Brown 29b1593301 Restoring the 'id' attribute to the sort and subset tags in the tld
WW-1905


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540552 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 12:13:00 +00:00
Donald J. Brown 77d7527d51 Improving javadoc
WW-1939


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540146 13f79535-47bb-0310-9956-ffa450edef68
2007-05-21 13:54:32 +00:00
Donald J. Brown 4253375672 Adding ability to set id parameter automatically in restful 2 action mapper
WW-1939


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@540141 13f79535-47bb-0310-9956-ffa450edef68
2007-05-21 13:46:48 +00:00
Donald J. Brown 344eaf3e33 Added tests showing WW-1519 has been fixed
WW-1519


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539825 13f79535-47bb-0310-9956-ffa450edef68
2007-05-20 04:28:35 +00:00
Donald J. Brown 9a278838c2 Improving opt groups to use toString on key, adding tests
WW-1672


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539819 13f79535-47bb-0310-9956-ffa450edef68
2007-05-20 03:06:34 +00:00
Donald J. Brown d0f1acad94 Updated blank pom to use newer jetty plugin WW-1715
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539817 13f79535-47bb-0310-9956-ffa450edef68
2007-05-20 03:02:23 +00:00
Donald J. Brown 44c2413ad2 Changed to correct snapshot jar of struts-annotations
WW-1834


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539805 13f79535-47bb-0310-9956-ffa450edef68
2007-05-19 22:18:56 +00:00
Donald J. Brown f796b25f33 Improved how properties are loaded, added closing tr tag for debug tag
WW-1746 WW-1712


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539688 13f79535-47bb-0310-9956-ffa450edef68
2007-05-19 05:12:22 +00:00
Musachy Barroso 862a6ed36e WW-1830 Support non-String attributes to freemarker JSP tag extensions
*  port from fix on WebWork rev 2866

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539660 13f79535-47bb-0310-9956-ffa450edef68
2007-05-19 01:25:31 +00:00
Musachy Barroso 0a1d4d7728 WW-1858 combobox template is not correct when there is '.' in the name attribute (use id instead of name)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539116 13f79535-47bb-0310-9956-ffa450edef68
2007-05-17 21:07:16 +00:00
Musachy Barroso 1b3f6102f6 WW-1752 cssStyle and cssClass are ignored in optiontransfer and doubleselect tags
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@539100 13f79535-47bb-0310-9956-ffa450edef68
2007-05-17 20:19:02 +00:00
Donald J. Brown 2ab4926795 Upgrading spring plugin to 2.0.5
WW-1834


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@538403 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 01:58:46 +00:00
Musachy Barroso b734e6e2e4 WW-1914 attribute tabindex does not get rendered for submit tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@537478 13f79535-47bb-0310-9956-ffa450edef68
2007-05-12 16:25:59 +00:00
Musachy Barroso 2f101588c9 WW-1915 Showcase App, File Download section throws Exception
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@536023 13f79535-47bb-0310-9956-ffa450edef68
2007-05-07 23:44:06 +00:00
René Gielen 30359e5f62 WW-1758:
"disabled" attribute was not rendered for <s:submit> tag - modified template, added tests

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@534889 13f79535-47bb-0310-9956-ffa450edef68
2007-05-03 14:25:50 +00:00
Musachy Barroso 3a14ddcaba Improve how the autocompleter gets the data from the JSON response (backport from 2.1)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@533542 13f79535-47bb-0310-9956-ffa450edef68
2007-04-29 18:47:31 +00:00
Donald J. Brown cae4e442ed Fixing initialisation order problem
WW-1753


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@532759 13f79535-47bb-0310-9956-ffa450edef68
2007-04-26 14:27:47 +00:00
Donald J. Brown b9d365a04c Minor javadoc fix
WW-1834


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@532363 13f79535-47bb-0310-9956-ffa450edef68
2007-04-25 14:18:34 +00:00
Donald J. Brown 34993c7473 Backporting fixes to restful2 mapper (confused post w/ put, bad docs, more tests) from trunk
WW-1834


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@531140 13f79535-47bb-0310-9956-ffa450edef68
2007-04-22 04:16:23 +00:00
Rainer Hermanns 6a46ca7fcd FilterDispatcher not always calling ActionContextCleanUp.cleanUp(Request)
o applied patch submitted by Jasper Rosenberg

Issue Number: WW-1816

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@530439 13f79535-47bb-0310-9956-ffa450edef68
2007-04-19 15:00:20 +00:00
Rainer Hermanns 13b136c559 Updated xwork dependency to release 2.0.2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@530357 13f79535-47bb-0310-9956-ffa450edef68
2007-04-19 10:06:32 +00:00
Musachy Barroso 909f724288 WW-1886 Renaming attribute "searchLimit" to "resultsLimit" as it makes more sense
(the results are the one limited, not the search text)

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@529622 13f79535-47bb-0310-9956-ffa450edef68
2007-04-17 14:24:01 +00:00
Musachy Barroso 60b108e05e WW-1886 Add searchLimit attribute to autocompleter tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@529618 13f79535-47bb-0310-9956-ffa450edef68
2007-04-17 14:13:03 +00:00
Rainer Hermanns 60f1622f3d Unit Test fixes for failing tests in Bamboo
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@527824 13f79535-47bb-0310-9956-ffa450edef68
2007-04-12 07:53:39 +00:00
Rainer Hermanns d62437ee75 Upgrading surefire plugin to version 2.3 to get rid off strange unit test failures
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@527821 13f79535-47bb-0310-9956-ffa450edef68
2007-04-12 07:42:56 +00:00
Ted Nathan Husted 2543a00e62 WW-1834 Update release notes link.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@526420 13f79535-47bb-0310-9956-ffa450edef68
2007-04-07 12:16:44 +00:00
Rainer Hermanns e83468aee5 Updating the xwork dependency to 2.0.2-SNAPSHOT to fix several problems reported to XWork and S2:
WW-1635 struts.xml include dependant packages not loading properly
WW-1856 s18n tag appears to be broken

NOTE on XWork 2.x updates: All validators.xml files are now validated, a DTD header is required.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@526222 13f79535-47bb-0310-9956-ffa450edef68
2007-04-06 16:37:54 +00:00
Musachy Barroso 20f7cdc513 WW-1869 Dojo ContentPane fails to parse paths with "!"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@525342 13f79535-47bb-0310-9956-ffa450edef68
2007-04-04 00:46:57 +00:00
René Gielen 652cd4a899 WW-1856:
Use changed TextProviderFactory (for upcoming XW 2.0.2) to fix issue with broken i18n tag / missing thread safety for TPF

See also:
http://jira.opensymphony.com/browse/XW-487
http://jira.opensymphony.com/browse/XW-476

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@523619 13f79535-47bb-0310-9956-ffa450edef68
2007-03-29 08:31:43 +00:00
James Mitchell 9b8f0a99c5 WW-1840 -- Mailreader -- either show passwords as *** or show them as readonly (text) or remove them
WW-1841 -- Mailreader -- msg text showing in place of logo image (struts.logo.alt)
WW-1842 -- Mailreader -- Remove walking tour

 * 1841 is not resolved, due to an issue with the i18n tag not finding the alternate bundle
 * remove extra extra params from css href and back links





git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@522729 13f79535-47bb-0310-9956-ffa450edef68
2007-03-27 03:47:48 +00:00
Ted Nathan Husted 8df1a49e44 WW-1767 Set STRUTS_2_0_X "head" to 2.0.8-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@520399 13f79535-47bb-0310-9956-ffa450edef68
2007-03-20 14:04:53 +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
1702 changed files with 115516 additions and 137898 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,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,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/).
+9 -2
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.9</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
@@ -48,10 +48,17 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.1</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee_1.4_spec</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
+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.9</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">
@@ -5,7 +5,6 @@ button.doReset=DO_RESULT
button.doCancel=org.apache.struts.taglib.html.CANCEL
button.reset=Reset
button.save=Save
button.logon=Log on
change.message=Your password has expired. Please ask the system administrator to change it.
change.try=Try Again
change.title=Password Has Expired
+1 -1
View File
@@ -17,7 +17,7 @@
<s:password key="password" showPassword="true"/>
<s:submit key="button.logon"/>
<s:submit key="button.save"/>
<s:reset key="button.reset"/>
+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.9</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 -38
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.9</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.3</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>
@@ -66,11 +35,6 @@
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator Config 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
+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.9</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>
@@ -47,7 +47,7 @@ public class DynamicTreeSelectAction extends ActionSupport {
public String getNodeName() {
return currentCategory != null ? currentCategory.getName() : "Node not found";
return currentCategory.getName();
}
}
@@ -1,21 +0,0 @@
package org.apache.struts2.showcase;
import org.apache.struts2.showcase.ajax.tree.Category;
import com.opensymphony.xwork2.ActionSupport;
public class ShowAjaxDynamicTreeAction extends ActionSupport {
private int nodeId = 1;
public Category getCategory() {
return Category.getById(nodeId);
}
public int getNodeId() {
return nodeId;
}
public void setNodeId(int nodeId) {
this.nodeId = nodeId;
}
}
@@ -43,7 +43,6 @@ public class UITagExample extends ActionSupport implements Validateable {
String name;
Date birthday;
Date wakeup;
String bio;
String favouriteColor;
List friends;
@@ -242,13 +241,7 @@ public class UITagExample extends ActionSupport implements Validateable {
return this.thoughts;
}
public Date getWakeup() {
return wakeup;
}
public void setWakeup(Date wakeup) {
this.wakeup = wakeup;
}
public String doSubmit() {
return SUCCESS;
@@ -1,88 +0,0 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase.action;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.opensymphony.xwork2.ActionSupport;
public class ExampleAction extends ActionSupport {
public static final String CONSTANT = "Struts Rocks!";
public static Date getCurrentDate() {
return new Date();
}
public String getName() {
return "John Galt";
}
public String[] getBands() {
return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
}
public List<String> getMovies() {
return Arrays.asList("Lord of the Rings", "Matrix");
}
public Book getBook() {
return new Book("Iliad", "Homer");
}
public Map<String, Book> getBooks() {
Map<String, Book> books = new HashMap<String, Book>();
books.put("Iliad", new Book("Iliad", "Homer"));
books.put("The Republic", new Book("The Replublic", "Plato"));
books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
"Friedrich Nietzsche"));
return books;
}
}
class Book {
private String title;
private String author;
public Book(String title, String author) {
this.title = title;
this.author = author;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
}
@@ -1,77 +0,0 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase.action;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.interceptor.annotations.After;
/**
* Will only work on containers that unzip war files
*
*/
public class JSPEvalAction extends ExampleAction {
private String jsp;
private final static String FILE = "/interactive/demo.jsp";
public String execute() throws IOException {
if (jsp != null) {
//write it to file
URL url = ServletActionContext.getServletContext().getResource(FILE);
BufferedWriter writer = new BufferedWriter(new FileWriter(new File(url
.getFile())));
try {
//directive
writer.write("<%@ taglib prefix=\"s\" uri=\"/struts-tags\" %>");
writer.write(jsp);
} finally {
if (writer != null)
writer.close();
}
}
return Action.SUCCESS;
}
@After
public void cleanUp() throws IOException {
URL url = ServletActionContext.getServletContext().getResource(FILE);
FileOutputStream out = new FileOutputStream(new File(url.getFile()));
try {
out.getChannel().truncate(0);
} finally {
if (out != null)
out.close();
}
}
public void setJsp(String jsp) {
this.jsp = jsp;
}
}
@@ -21,5 +21,5 @@
package org.apache.struts2.showcase.chat;
public class Constants {
public static String UPDATE_FREQ = "5000";
public static String UPDATE_FREQ = "30000";
}
@@ -30,9 +30,7 @@ import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.util.ServletContextAware;
import com.opensymphony.xwork2.ActionSupport;
@@ -83,9 +81,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
classLines = read(in, -1);
}
String rootPath = ServletActionContext.getServletContext().getRealPath("/");
if (config != null && config.trim().length() > 0 && (rootPath == null || config.startsWith(rootPath))) {
if (config != null && config.trim().length() > 0) {
int pos = config.lastIndexOf(':');
configLine = Integer.parseInt(config.substring(pos+1));
config = config.substring(0, pos).replace("//", "/");
@@ -94,7 +90,6 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
return SUCCESS;
}
/**
* @param className the className to set
*/
@@ -1,73 +1,73 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
<validators>
<field name="requiredValidatorField">
<field-validator type="required">
<message><![CDATA[ required ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<field name="requiredValidatorField">
<field-validator type="required">
<message><![CDATA[ required ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="i18n.nothing.here"><![CDATA[ required and must be string ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="i18n.requiredstring"><![CDATA[ required and must be string ]]></message>
</field-validator>
</field>
<field name="integerValidatorField">
<field-validator type="int">
<param name="min">1</param>
<param name="max">10</param>
<message><![CDATA[ must be integer min 1 max 10 if supplied ]]></message>
</field-validator>
</field>
<field name="dateValidatorField">
<field-validator type="date">
<param name="min">01/01/1990</param>
<param name="max">01/01/2000</param>
<message><![CDATA[ must be a min 01-01-1990 max 01-01-2000 if supplied ]]></message>
</field-validator>
</field>
<field name="emailValidatorField">
<field-validator type="email">
<message><![CDATA[ must be a valid email if supplied ]]></message>
</field-validator>
</field>
<field name="urlValidatorField">
<field-validator type="url">
<message><![CDATA[ must be a valid url if supplied ]]></message>
</field-validator>
</field>
<field name="stringLengthValidatorField">
<field-validator type="stringlength">
<param name="maxLength">4</param>
<param name="minLength">2</param>
<param name="trim">true</param>
<message><![CDATA[ must be a String of a specific greater than 1 less than 5 if specified ]]></message>
</field-validator>
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
<field name="fieldExpressionValidatorField">
<field-validator type="fieldexpression">
<param name="expression">(fieldExpressionValidatorField == requiredValidatorField)</param>
<message><![CDATA[ must be the same as the Required Validator Field if specified ]]></message>
</field-validator>
</field>
</field-validator>
</field>
<field name="integerValidatorField">
<field-validator type="int">
<param name="min">1</param>
<param name="max">10</param>
<message><![CDATA[ must be integer min 1 max 10 if supplied ]]></message>
</field-validator>
</field>
<field name="dateValidatorField">
<field-validator type="date">
<param name="min">01/01/1990</param>
<param name="max">01/01/2000</param>
<message><![CDATA[ must be a min 01/01/1990 max 01/01/2000 if supplied ]]></message>
</field-validator>
</field>
<field name="emailValidatorField">
<field-validator type="email">
<message><![CDATA[ must be a valid email if supplied ]]></message>
</field-validator>
</field>
<field name="urlValidatorField">
<field-validator type="url">
<message><![CDATA[ must be a valid url if supplied ]]></message>
</field-validator>
</field>
<field name="stringLengthValidatorField">
<field-validator type="stringlength">
<param name="maxLength">4</param>
<param name="minLength">2</param>
<param name="trim">true</param>
<message><![CDATA[ must be a String of a specific greater than 1 less than 5 if specified ]]></message>
</field-validator>
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
<field name="fieldExpressionValidatorField">
<field-validator type="fieldexpression">
<param name="expression">(fieldExpressionValidatorField == requiredValidatorField)</param>
<message><![CDATA[ must be the same as the Required Validator Field if specified ]]></message>
</field-validator>
</field>
</validators>
<!-- END SNIPPET: fieldValidatorsExample -->
@@ -74,12 +74,5 @@
<action name="AutocompleterExample" class="org.apache.struts2.showcase.ajax.AutocompleterExampleAction">
<result type="freemarker">/ajax/options.ftl</result>
</action>
<action name="quizAjax" class="org.apache.struts2.showcase.validation.QuizAction">
<interceptor-ref name="jsonValidationWorkflowStack"/>
<result>/validation/quiz-success.jsp</result>
</action>
<action name="getNodes" class="org.apache.struts2.showcase.ShowAjaxDynamicTreeAction">
<result type="freemarker">/tags/ui/treeExampleAjaxDynamic.ftl</result>
</action>
</package>
</struts>
@@ -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>
@@ -1,15 +0,0 @@
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ognl" namespace="/nodecorate" extends="struts-default">
<action name="jspEval" class="org.apache.struts2.showcase.action.JSPEvalAction">
<interceptor-ref name="params"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="annotationWorkflow" />
<result>/interactive/demo.jsp</result>
</action>
<action name="example" class="org.apache.struts2.showcase.action.ExampleAction" />
</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>
@@ -47,12 +47,9 @@
<!-- END SNIPPET: treeExampleDynamicXWorkXml -->
<action name="showDynamicAjaxTreeAction">
<result>/tags/ui/treeExampleAjaxDynamic.jsp</result>
</action>
<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>
@@ -20,7 +20,6 @@
</action>
<action name="quizAjax" class="org.apache.struts2.showcase.validation.QuizAction">
<interceptor-ref name="jsonValidationWorkflowStack"/>
<result name="input">quiz-ajax.jsp</result>
<result>quiz-success.jsp</result>
</action>
+5 -5
View File
@@ -9,7 +9,7 @@
<!-- Some or all of these can be flipped to true for debugging -->
<constant name="struts.i18n.reload" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.devMode" value="false" />
<constant name="struts.configuration.xml.reload" value="false" />
<constant name="struts.custom.i18n.resources" value="globalMessages" />
@@ -19,11 +19,11 @@
<constant name="struts.serve.static.browserCache" value="false" />
<include file="struts-chat.xml" />
<include file="struts-interactive.xml" />
<include file="struts-hangman.xml" />
<include file="struts-continuations.xml"/>
<include file="struts-tags.xml"/>
<include file="struts-validation.xml" />
@@ -61,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>
@@ -110,7 +110,7 @@
<interceptor-ref name="basicStack"/>
</action>
<action name="edit-*" class="org.apache.struts2.showcase.action.EmployeeAction">
<param name="empId">{1}</param>
<param name="empId">{1}</param>
<result>/empmanager/editEmployee.jsp</result>
<interceptor-ref name="crudStack"><param name="validation.excludeMethods">execute</param></interceptor-ref>
</action>
@@ -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();
@@ -30,6 +30,23 @@
<head>
<title><decorator:title default="Struts Showcase"/></title>
<link href="<s:url value='/styles/main.css' encode='false' includeParams='none'/>" rel="stylesheet" type="text/css" media="all"/>
<link href="<s:url value='/struts/niftycorners/niftyCorners.css' encode='false' includeParams='none'/>" rel="stylesheet" type="text/css"/>
<link href="<s:url value='/struts/niftycorners/niftyPrint.css' encode='false' includeParams='none'/>" rel="stylesheet" type="text/css" media="print"/>
<script language="JavaScript" type="text/javascript" src="<s:url value='/struts/niftycorners/nifty.js' encode='false' includeParams='none'/>"></script>
<script language="JavaScript" type="text/javascript">
window.onload=function(){
if(!NiftyCheck())
return;
Rounded("blockquote","tr bl","#ECF1F9","#CDFFAA","smooth border #88D84F");
Rounded("div#outer-header", "all", "white", "#818EBD", "smooth border #434F7C");
Rounded("div#footer", "all", "white", "#818EBD", "smooth border #434F7C");
}
</script>
<decorator:head/>
</head>
@@ -41,7 +58,7 @@
<div id="header" class="clearfix">
<div id="branding">
<h1 class="title">Struts Showcase</h1>
<s:action var="dateAction" name="date" namespace="/" executeResult="true" />
<s:action id="dateAction" name="date" namespace="/" executeResult="true" />
</div><!-- end branding -->
<div id="search">
@@ -78,7 +95,6 @@
<li><a href="<s:url value="/tiles/index.action" />">Tiles</a></li>
<li><a href="<s:url value="/token/index.jsp"/>">Token</a></li>
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
<li><a href="<s:url value="/interactive/index.jsp"/>">Interactive Demo</a></li>
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
</ul>
</div>
@@ -88,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>
@@ -10,152 +9,74 @@
<!--// END SNIPPET: common-include-->
</head>
<script type="text/javascript">
dojo.event.topic.subscribe("/before", function(event, widget){
alert('inside a topic event. before request');
//event: set event.cancel = true, to cancel request
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/after", function(data, request, widget){
alert('inside a topic event. after request');
//data : json object from request
//request: XMLHttpRequest object
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/value", function(error, request, widget){
alert('inside a topic event. on error');
//error : error object (error.message has the error message)
//request: XMLHttpRequest object
//widget: widget that published the topic
});
function showKey() {
var autoCompleter = dojo.widget.byId('jsauto');
alert(autoCompleter.getSelectedKey());
}
function showValue() {
var autoCompleter = dojo.widget.byId('jsauto');
alert(autoCompleter.getSelectedValue());
}
</script>
<body>
<s:url var="jsonList" value="/JSONList.action"/>
<s:url id="jsonList" value="/JSONList.action"/>
Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false"), use indicator, search substring (searchType="substring")
<br/>
<sx:autocompleter
indicator="indicator1"
href="%{jsonList}"
cssStyle="width: 200px;"
autoComplete="false"
searchType="substring"
name="state"/>
<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/><br/>
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCount="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"/>
<br/>
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCout="3", it is "3" by default), without the down arrow button (showDownArrow="false")
<br/>
<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/><br/>
<br/>
<br/>
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;"/>
<br/>
<br/><br/>
Using a local list (list="{'apple','banana','grape','pear'}")
<br/>
<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/>
<s:url var="autoex" action="AutocompleterExample" namespace="/nodecorate"/>
<s:url id="autoex" action="AutocompleterExample" namespace="/nodecorate"/>
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"
valueNotifyTopics="/Changed"
forceValidOption="true"/>
</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" />
Autocompleter 2 <s:autocompleter theme="ajax" href="%{#autoex}" autoComplete="false" formId="selectForm" listenTopics="/Changed" forceValidOption="true" id="ops"/>
<br/><br/>
Publish before/after/value notify topics
<br/>
<sx:autocompleter
href="%{#jsonList}"
listenTopics="/reload"
beforeNotifyTopics="/before"
afterNotifyTopics="/after"
valueNotifyTopics="/value"
cssStyle="width: 200px;" />
<s:submit theme="simple" value="Reload Values" onclick="dojo.event.topic.publish('/reload')"/>
<br/><br/>
Get values using JavaScript
<br/>
<sx:autocompleter href="%{#jsonList}" id="jsauto" name="state"/>
<s:submit theme="simple" value="Show Key" onclick="showKey()"/>
<s:submit theme="simple" value="Show Value" onclick="showValue()"/>
<br/><br/>
<s:include value="../footer.jsp"/>
</body>
@@ -1,61 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Bind Examples</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
</head>
<script type="text/javascript">
dojo.event.topic.subscribe("/before", function(event, widget){
alert('inside a topic event. before request');
//event: set event.cancel = true, to cancel request
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/after", function(data, request, widget){
alert('inside a topic event. after request');
//data : text returned from request
//request: XMLHttpRequest object
//widget: widget that published the topic
});
</script>
<body>
<div id="div1">Div 1</div>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<br/><br/>
<p>
1. Attach to "onclick" event on button. Update content of Div 1. Use with indicator.
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" />
<br/>
<s:submit theme="simple" type="submit" value="submit" id="button"/>
</p>
<br/><br/>
<p>
2. Attach to "onmouseover", and "onclick" event on Area below and update content of Div1, highlight targets with green color
<sx:bind id="ex2" href="%{#ajaxTest}" sources="div2" targets="div1" events="onmouseover,onclick" highlightColor="green"/>
<div id="div2" style="width: 300px; height: 50px; border: 1px solid black">
Mouse Over or Click Here!
</div>
</p>
<br/><br/>
<p>
3. Attach to "onkeydown" event on Textbox below update content of Div1. Publish topics.
<sx:bind id="ex4" href="%{#ajaxTest}" sources="txt1" targets="div1" events="onkeydown" beforeNotifyTopics="/before" afterNotifyTopics="/after" />
<br/>
<s:textfield id="txt1"/>
</p>
<br/><br/>
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -1,5 +1,4 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<!--// START SNIPPET: common-include-->
<sx:head cache="true"/>
<s:head theme="ajax"/>
<!--// END SNIPPET: common-include-->
@@ -2,7 +2,7 @@
<hr/>
<s:url var="backToAjaxExamples" value=".." />
<s:url id="backToAjaxExamples" value=".." />
<s:a href="%{backToAjaxExamples}">Back To AJAX Examples</s:a>&nbsp;
+7 -8
View File
@@ -10,15 +10,14 @@ Note: The Ajax tags are experimental. These examples have only been tested under
</p>
<ul>
<li><a href="bind/index.jsp">Bind tag</a></li>
<li><a href="autocompleter/index.jsp">Autocompleter combobox tag</a></li>
<li><a href="remotebutton/index.jsp">Remote button tag</a></li>
<li><a href="remotediv/index.jsp">Remote div tag</a></li>
<li><a href="remotelink/index.jsp">Remote link tag</a></li>
<li><a href="tabbedpanel/index.jsp">Tabbed panel</a></li>
<li><a href="remoteforms/index.jsp">Remote forms</a></li>
<li><a href="widgets/index.jsp">Widgets </a> (may not work in all browsers!)
<li><a href="autocompleter">Autocompleter combobox tag</a></li>
<li><a href="remotebutton">Remote button tag</a></li>
<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!)
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</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,10 +12,10 @@
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("/alltopics", function(data, type, e){
dojo.event.topic.subscribe("/after", function(data, type, e){
alert('inside a topic event. type='+type);
//data : text returned
//type : "before", "load" or "error"
@@ -27,30 +26,26 @@
<body>
<div id="t1">Div 1</div>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<br/><br/>
A submit button, that highlights (blue color) its targets
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" highlightColor="blue"/>
<br/><br/>
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="/alltopics"/>
<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>
@@ -59,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>
@@ -8,15 +7,16 @@
<jsp:include page="/ajax/commonInclude.jsp"/>
</head>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<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>
@@ -15,15 +14,16 @@
}
</script>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<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>
@@ -10,17 +9,18 @@
<body>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{#ajaxTest}"
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>
@@ -10,16 +9,17 @@
<body>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<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>
@@ -10,17 +9,17 @@
<body>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<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"
showLoadingText="true">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,15 +9,16 @@
<body>
<s:url var="ajaxNoUrl" value="/AjaxNoUrl.jsp" />
<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>
@@ -10,16 +9,17 @@
<body>
<s:url var="test3" value="/Test3.action" />
<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>
@@ -34,10 +33,11 @@
<input type=button value="stop timer" onclick="controller.stop()">
<input type=button value="start timer" onclick="controller.start()">
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<sx:div
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}"
loadingText="Loading..."
@@ -46,10 +46,9 @@
stopTimerListenTopics="/stopTimer"
updateFreq="3000"
autoStart="true"
highlightColor="red"
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>
@@ -41,10 +33,11 @@
<input type=button value="start timer" onclick="controller.start()">
<input type=button value="stop timer" onclick="controller.stop()">
<s:url var="ajaxTest" value="/AjaxTest.action" />
<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"/>
@@ -37,7 +37,7 @@
</li>
<li>
<a href="example8.jsp">A div that will listen to events to refresh and start/stop autoupdate, and gets highlighted in red (when it loads)</a>
<a href="example8.jsp">A div that will listen to events to refresh and start/stop autoupdate</a>
</li>
<li>
@@ -1,117 +1,107 @@
<%@ 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>
<sx:head />
<s:head theme="ajax"/>
<script language="JavaScript" type="text/javascript">
dojo.event.topic.subscribe("/beforeSubmit", function(event, widget) {
alert('you can manipulate the form before it gets submitted. To cancel the submit event set event.cancel=true');
event.cancel = true;
});
function doSomething() {
alert('you can manipulate the form before it gets submitted');
return true;
}
</script>
</head>
<body>
<div id='two' style="border: 1px solid yellow;"><b>initial content</b></div>
<br /><br />
Remote form replacing another div:<br/>
<div id='two' style="border: 1px solid yellow;"><b>initial content</b></div>
<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" targets="two"/>
<s:submit value="GO2" theme="ajax" targets="two"/>
</s:form>
<br /><br />
Remote form replacing the forms content:<br/>
<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"/>
</s:form>
<br /><br />
Remote form evaluating suplied JS on completion:<br/>
<s:form
id='theForm4'
cssStyle="border: 1px solid green;"
action='Test3'
method='post'>
action='AjaxRemoteForm'
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
<sx:submit value="GO4" executeScripts="true"/>
<s:submit value="GO4" theme="ajax"/>
</s:form>
<br /><br />
Submit outside form:<br/>
Remote form replacing the forms content after confirming results:<br/>
<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'>
</s:form>
<sx:submit value="GO5" formId="theForm5" targets="two"/>
<br /><br />
<s:url var="remoteUrl" namespace="/remoteforms" action="AjaxRemoteForm"/>
Submit outside form, href in submit tag:<br/>
<s:submit value="GO3" theme="ajax" targets="theForm5" />
</s:form>
Remote form replacing the forms content after running a function:<br/>
<s:form
id='theForm6'
cssStyle="border: 1px solid green;"
method='post'>
action='AjaxRemoteForm'
method='post'
theme="ajax">
<input type='text' name='data' value='Struts User'>
</s:form>
<sx:submit value="GO6" formId="theForm6" targets="two" href="%{#remoteUrl}"/>
<br /><br />
Remote form whose submit is cancelled:<br/>
<s:submit value="GO3" theme="ajax" targets="theForm6" />
</s:form>
A form with no remote submit (so should not be ajaxified):<br/>
<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="GO7" targets="theForm7" beforeNotifyTopics="/beforeSubmit"/>
</s:form>
<br /><br />
A form with no remote submit (so should not be ajaxified):<br/>
<s:form
id='theForm8'
cssStyle="border: 1px solid green;"
action='AjaxRemoteForm'
method='post'>
<input type='text' name='data' value='Struts User'>
<s:submit value="Go AWAY" />
<s:submit value="Go AWAY" targets="theForm7" />
</s:form>
@@ -0,0 +1,18 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<s:head theme="ajax"/>
</head>
<body>
<s:form name="test1" id="test1" action="/ajax/Test1.action" theme="ajax">
Test 1 Form
<s:submit theme="ajax" targets="result2"/>
</s:form>
<s:div id="result2" theme="ajax" >test2 - before</s:div>
<s:div id="result3" theme="ajax">test3 - before</s:div>
</body>
</html>
@@ -0,0 +1,6 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form name="test2" id="test2" action="/ajax/Test2.action" theme="ajax">
Test 2 form
<s:submit theme="ajax" targets="result3"/>
</s:form>
@@ -0,0 +1,8 @@
<html>
<head>
</head>
<body>
Test 3 Page
</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,30 +13,10 @@
dojo.byId(widget.targetsArray[0]).innerHTML = "Done";
}
dojo.event.topic.subscribe("/before", function(event, widget){
alert('inside a topic event. before request');
//event: set event.cancel = true, to cancel request
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/after", function(data, request, widget){
alert('inside a topic event. after request');
//data : text returned from request
//request: XMLHttpRequest object
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/error", function(error, request, widget){
alert('inside a topic event. on error');
//error : error object (error.message has the error message)
//request: XMLHttpRequest object
//widget: widget that published the topic
});
dojo.event.topic.subscribe("/topics", function(data, type, e){
dojo.event.topic.subscribe("/after", function(data, type, e){
alert('inside a topic event. type='+type);
//data : text returned
//type : "before", "load", "error"
//type : "before", "load" or "error"
//e : request object
});
</script>
@@ -52,54 +31,49 @@
<br/><br/>
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url var="test3" value="/Test3.action" />
<sx:a id="link0"
href="%{#ajaxTest}"
targets="t1"
highlightColor="red"
highlightDuration="2000">Update 'Div 1' and use red highligh to notify user of changed content</sx:a>
<s:url id="ajaxTest" value="/AjaxTest.action" />
<s:url id="test3" value="/Test3.action" />
<br/><br/>
<sx:a id="link1"
href="%{#ajaxTest}"
<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"
href="%{#ajaxTest}"
<s:a id="link3"
theme="ajax"
href="%{ajaxTest}"
loadingText="Loading!!!"
showLoadingText="true"
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"
href="%{#test3}"
<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"
href="%{#ajaxTest}"
<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/>
@@ -112,11 +86,12 @@
<br/><br/>
<sx:a id="link6"
href="%{#ajaxTest}"
<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,89 +1,109 @@
<%@ 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 var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<body>
<table cellpadding="0" cellspacing="10" border="0" width="900">
<table cellpadding="0" cellspacing="10" border="0" width="600">
<tr>
<td align="top" width="400">
<sx:tabbedpanel id="test" >
<sx:div id="one" label="one" >
<td align="top">
<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:tabbedpanel id="test11" label="Container 1">
<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:tabbedpanel id="test12" label="Container 2">
<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:tabbedpanel id="test13" label="Container 3">
<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:tabbedpanel>
<s:tabbedPanel id="test3" >
<s:div id="left1" label="out one" theme="ajax">
Outer one<br/>
<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/>
<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/>
<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,15 +1,28 @@
<%@ 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 var="ajaxTest" value="/AjaxTest.action" />
<s:url id="ajaxTest" value="/AjaxTest.action" />
<body>
@@ -17,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" preload="false"/>
<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" preload="false"/>
</sx:tabbedpanel>
</s:div>
<s:div theme="ajax" href="%{ajaxTest}" id="ryh21" label="remote right" />
</s:tabbedPanel>
<!--// END SNIPPET: tabbedpanel-tag-->
</td>
</tr>
@@ -1,57 +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>Ajax examples - tabbled panel</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<title>Example 4</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>" />
</head>
<script>
function enableTab(id) {
var tabContainer = dojo.widget.byId('tabContainer');
tabContainer.enableTab(id);
}
function disableTab(index) {
var tabContainer = dojo.widget.byId('tabContainer');
tabContainer.disableTab(index);
}
</script>
<body>
<sx:tabbedpanel id="tabContainer" cssStyle="width: 500px; height: 300px;" doLayout="true">
<sx:div id="tab1" label="test1" >
Enabled Tab
</sx:div >
<sx:div id="tab2" label="test2" disabled="true" >
Diabled Tab
</sx:div >
<sx:div id="tab3" label="test2" >
Some other Tab
</sx:div >
</sx:tabbedpanel>
<br />
<input type="button" onclick="enableTab(1)" value="Enable Tab 2 using Index" />
<input type="button" onclick="disableTab(1)" value="Disable Tab 2 using Index" />
<br />
<input type="button" onclick="enableTab('tab2')" value="Enable Tab 2 using Id" />
<input type="button" onclick="disableTab('tab2')" value="Disable Tab 2 using Id" />
<br />
<input type="button" onclick="enableTab(dojo.widget.byId('tab2'))" value="Enable Tab 2 using widget" />
<input type="button" onclick="disableTab(dojo.widget.byId('tab2'))" value="Disable Tab 2 using widget" />
<br /> <br />
<s:include value="../footer.jsp"/>
<s:url id="panel1url" action="panel1" namespace="/nodecorate" />
<s:url id="panel2url" action="panel2" namespace="/nodecorate" />
<s:url id="panel3url" action="panel3" namespace="/nodecorate" />
<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" labelposition="bottom">
<sx:div id="left" label="test1" closable="true">
<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" closable="true">
</s:div >
<s:div id="middle" label="test2" theme="ajax" >
I'm the other Tab!!!
</sx:div >
</s:div >
</sx:tabbedpanel>
</s:tabbedPanel>
@@ -1,40 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<title>Ajax examples - tabbled panel</title>
<jsp:include page="/ajax/commonInclude.jsp"/>
</head>
<script>
dojo.event.topic.subscribe('/before', function(event, tab, tabContainer) {
alert("Before selecting tab. Set 'event.cancel=true' to prevent selection");
});
dojo.event.topic.subscribe('/after', function(tab, tabContainer) {
alert("After tab was selected");
});
</script>
<body>
<sx:tabbedpanel
id="tabContainer"
cssStyle="width: 500px; height: 300px;"
doLayout="true"
beforeSelectTabNotifyTopics="/before"
afterSelectTabNotifyTopics="/after">
<sx:div id="tab1" label="test1" >
Tab 1
</sx:div >
<sx:div id="tab2" label="test2" >
Tab 2
</sx:div >
</sx:tabbedpanel>
<br /><br />
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -12,11 +12,10 @@
<p>
<ol>
<li><a href="example2.jsp">A local tabbed panel width fixed size (doLayout="true")</a></li>
<li><a href="example4.jsp">A Local tabbed panel with disabled tabs</a></li>
<li><a href="example6.jsp">A Local tabbed panel that publishes topics when tabs are selected(before and after)</a></li>
<li><a href="example3.jsp">A remote (href != "") and local tabbed panel</a></li>
<li><a href="example1.jsp">Various remote and local tabbed panels (with enclosed tabbed pannels) with layout (doLayout="false")</a></li>
<li><a href="example5.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on the tab pane (closable="true" on tabs), and tabs on the bottom (labelposition="bottom")</a></li>
<li><a href="example4.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on tabs(closeButton="tab"), and tabs on the right (labelposition="right")</a></li>
<li><a href="example5.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on the tab pane (closeButton="pane"), and tabs on the bottom (labelposition="bottom")</a></li>
</ol>
@@ -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>
@@ -2,8 +2,8 @@
<div id="result">
</div>
<@s.form action="panel3Submit" namespace="/nodecorate">
<@sx.autocompleter label="Gender" name="gender" list="%{#{'Male':'Male','Female':'Female'}}" />
<@sx.submit targets="result" />
<@s.form action="panel3Submit" namespace="/nodecorate" theme="ajax">
<@s.select label="Gender" name="gender" list=r"%{#{'Male':'Male','Female':'Female'}}" theme="ajax" />
<@s.submit theme="ajax" resultDivId="result" />
</@s.form>
@@ -4,7 +4,7 @@
<s:iterator value="category.children">
<li>
<s:if test="children.size() > 0">
<sx:a href="toggle.action?catId=%{id}">+</sx:a>
<s:a theme="ajax" href="toggle.action?catId=%{id}">+</s:a>
</s:if>
<s:property value="name"/>
</li>
@@ -15,7 +15,8 @@
<s:set name="display" value="''"/>
</s:else> ›
<sx:div id="children_%{id}"
<s:div theme="ajax"
id="children_%{id}"
cssStyle="display: %{display}"
href="getCategory.action?catId=%{id}"
refreshListenTopic="children_%{id}"/>
@@ -2,7 +2,7 @@
<html>
<head>
<title>Tree</title>
<sx:head />
<s:head theme="ajax"/>
</head>
<body>
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Chat - Login</title>
<@s.head />
<@s.head theme="ajax" />
</head>
<body>
<@s.actionerror />
@@ -3,7 +3,7 @@
<html>
<head>
<title>Showcase - Chat - Room Selection</title>
<@sx.head />
<@s.head theme="ajax" />
<style type="text/css">
div.box {
border: 1px solid darkblue;
@@ -128,11 +128,11 @@
<div class="box">
<h3>Users Available In Chat</h3>
<@s.url id="usersAvailableUrl" action="usersAvailable" namespace="/chat/ajax" />
<@sx.div id="usersAvailable" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
href="%{usersAvailableUrl}"
class="box">
<@s.div id="usersAvailable" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
theme="ajax" href="%{usersAvailableUrl}"
class="box">
Initial Loading Users ...
</@sx.div>
</@s.div>
</div>
</div>
@@ -141,20 +141,20 @@
<div class="box">
<h3>Rooms Available In Chat</h3>
<@s.url id="roomsAvailableUrl" action="roomsAvailable" namespace="/chat/ajax" />
<@sx.div id="roomsAvailable" listenTopics="topicRoomCreated"
updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
href="%{roomsAvailableUrl}" >
<@s.div id="roomsAvailable" listenTopics="topicRoomCreated"
delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
theme="ajax" href="%{roomsAvailableUrl}" >
Initial Loading Rooms ...
</@sx.div>
</@s.div>
</div>
<div id="createRoom" class="box">
<h3>Create Room In Chat</h3>
<div id="createRoomResult"></div>
<@s.form id="createRoomId" action="createRoom" namespace="/chat/ajax" method="POST">
<@s.form id="createRoomId" action="createRoom" namespace="/chat/ajax" method="POST" theme="ajax">
<@s.textfield label="Room Name" required="true" name="name" />
<@s.textarea theme="xhtml" label="Room Description" required="true" name="Description" />
<@sx.submit value="%{'Create Room'}" targets="createRoomResult" afterNotifyTopics="topicRoomCreated" align="left" />
<@s.submit value="%{'Create Room'}" resultDivId="createRoomResult" notifyTopics="topicRoomCreated" theme="ajax" align="left" />
</@s.form>
</div>
</div>
+12 -12
View File
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Chat - Show Room </title>
<@sx.head />
<@s.head theme="ajax" />
<style type="text/css">
div.box {
border: 1px solid darkblue;
@@ -109,10 +109,10 @@
<div class="box">
<h3>Users Available In Chat</h3>
<@s.url id="usersAvailableUrl" action="usersAvailable" namespace="/chat/ajax" />
<@sx.div id="usersAvailable" href="%{usersAvailableUrl}"
updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
<@s.div id="usersAvailable" href="%{usersAvailableUrl}"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
Initial Users Available ...
</@sx.div>
</@s.div>
</div>
</div>
@@ -122,20 +122,20 @@
<@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
<@sx.div id="messagesInRoom" href="%{#url}" includeContext="true"
updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
<@s.div id="messagesInRoom" href="%{#url}" includeContext="true"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}"
listenTopics="topicMessageSend">
Initial Messages In Room ...
</@sx.div>
</@s.div>
</div>
<div class="box">
<h3>Send Messages</h3>
<@s.form id="sendMessageForm" action="sendMessageToRoom" namespace="/chat/ajax" method="POST">
<@s.form id="sendMessageForm" action="sendMessageToRoom" namespace="/chat/ajax" method="POST" theme="ajax">
<div id="sendMessageResult"></div>
<@s.textarea label="Message"name="message" theme="xhtml" />
<@s.hidden name="roomName" value="%{roomName}" />
<@sx.submit id="submit" resultDivId="sendMessageResult" afterNotifyTopics="topicMessageSend" value="%{'Send'}" />
<@s.submit id="submit" theme="ajax" resultDivId="sendMessageResult" notifyTopics="topicMessageSend" value="%{'Send'}" />
</@s.form>
</div>
</div>
@@ -147,10 +147,10 @@
<@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
<@sx.div id="usersAvailableInRoom" href="%{#url}" includeContext="true"
delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
<@s.div id="usersAvailableInRoom" href="%{#url}" includeContext="true"
theme="ajax" delay="1" updateFreq="%{@org.apache.struts2.showcase.chat.Constants@UPDATE_FREQ}">
Initial Users Available In Room ...
</@sx.div>
</@s.div>
</div>
</div>
@@ -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 -->
@@ -14,9 +14,9 @@ An example populating a Set of object (Address.java) into Struts' action (Addres
<p/>
See the jsp code <s:url var="url" action="showAddressJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for PersonAction.java <s:url var="url" action="showAddressActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for Person.java <s:url var="url" action="showAddressJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the jsp code <s:url id="url" action="showAddressJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for PersonAction.java <s:url id="url" action="showAddressActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for Person.java <s:url id="url" action="showAddressJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
<p/>
@@ -9,11 +9,11 @@
</head>
<body>
See the jsp code <s:url var="url" action="showEnumJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for OperationsEnum.java <s:url var="url" action="showOperationsEnumJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for OperationsEnumAction.java <s:url var="url" action="showOperationEnumActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for EnumTypeConverter.java <s:url var="url" action="showEnumTypeConverterJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the properties for OperationsEnumAction-conversion.properties <s:url var="url" action="showOperationsEnumActionConversionProperties" namespace="/conversion" /><s:a href="%{#url}">here.</s:a>
See the jsp code <s:url id="url" action="showEnumJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for OperationsEnum.java <s:url id="url" action="showOperationsEnumJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for OperationsEnumAction.java <s:url id="url" action="showOperationEnumActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for EnumTypeConverter.java <s:url id="url" action="showEnumTypeConverterJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the properties for OperationsEnumAction-conversion.properties <s:url id="url" action="showOperationsEnumActionConversionProperties" namespace="/conversion" /><s:a href="%{#url}">here.</s:a>
<br/>
<br/>
@@ -11,9 +11,9 @@ An example populating a list of object (Person.java) into Struts' action (Person
<p/>
See the jsp code <s:url var="url" action="showPersonJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for PersonAction.java <s:url var="url" action="showPersonActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for Person.java <s:url var="url" action="showPersonJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the jsp code <s:url id="url" action="showPersonJspCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for PersonAction.java <s:url id="url" action="showPersonActionJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
See the code for Person.java <s:url id="url" action="showPersonJavaCode" namespace="/conversion" /><s:a href="%{#url}">here.</s:a><br/>
<p/>
@@ -9,15 +9,15 @@
<ul>
<li>
<s:url var="url" action="enterPersonsInfo" namespace="/conversion" />
<s:url id="url" action="enterPersonsInfo" namespace="/conversion" />
<s:a href="%{#url}">Populate into the Struts action class a List of Person.java Object</s:a>
</li>
<li>
<s:url var="url" action="enterAddressesInfo" namespace="/conversion" />
<s:url id="url" action="enterAddressesInfo" namespace="/conversion" />
<s:a href="%{#url}">Populate into Struts action class a Set of Address.java Object</s:a>
</li>
<li>
<s:url var="url" action="enterOperationEnumInfo" namespace="/conversion" />
<s:url id="url" action="enterOperationEnumInfo" namespace="/conversion" />
<s:a href="%{#url}">Populate into Struts action class a List of OperationEnum.java (Java5 Enum)</s:a>
</li>
</ul>
@@ -1,13 +1,12 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<s:if test="currentEmployee!=null">
<s:text var="title" name="item.edit"><s:param><s:text name="employee"/></s:param></s:text>
<s:text id="title" name="item.edit"><s:param><s:text name="employee"/></s:param></s:text>
</s:if>
<s:else>
<s:text var="title" name="item.create"><s:param><s:text name="employee"/></s:param></s:text>
<s:text id="title" name="item.create"><s:param><s:text name="employee"/></s:param></s:text>
</s:else>
<html>
<head>
@@ -18,13 +17,13 @@
<body>
<h1><s:property value="#title"/></h1>
<s:action var="skillAction" namespace="/skill" name="list"/>
<s:action id="skillAction" namespace="/skill" name="list"/>
<s:form name="editForm" action="save">
<s:textfield label="Employee Id" name="currentEmployee.empId"/>
<s:textfield label="%{getText('employee.firstName')}" name="currentEmployee.firstName"/>
<s:textfield label="%{getText('employee.lastName')}" name="currentEmployee.lastName"/>
<sx:datetimepicker label="Birthdate" name="currentEmployee.birthDate"/>
<s:datetimepicker label="Birthdate" name="currentEmployee.birthDate"/>
<s:textfield label="Salary" name="currentEmployee.salary"/>
<s:checkbox fieldValue="true" label="Married" name="currentEmployee.married"/>
<s:combobox list="availablePositions" label="Position" name="currentEmployee.position"/>
@@ -8,7 +8,7 @@
</s:if>
<s:else>
<s:set name="submitType" value="'create'"/>
<s:text var="title" name="item.create"><s:param><s:text name="skill"/></s:param></s:text>
<s:text id="title" name="item.create"><s:param><s:text name="skill"/></s:param></s:text>
</s:else>
<html>
<head><title><s:property value="#title"/></title></head>
@@ -9,10 +9,10 @@
<p>
<ul>
<li><s:url var="url" namespace="/skill" action="list"/><s:a href="%{url}">List available Skills</s:a></li>
<li><s:url var="url" namespace="/skill" action="edit"/><s:a href="%{url}">Create/Edit Skill</s:a></li>
<li><s:url var="url" namespace="/employee" action="list"/><s:a href="%{url}">List available Employees</s:a></li>
<li><s:url var="url" namespace="/employee" action="edit"/><s:a href="%{url}">Create/Edit Employee</s:a></li>
<li><s:url id="url" namespace="/skill" action="list"/><s:a href="%{url}">List available Skills</s:a></li>
<li><s:url id="url" namespace="/skill" action="edit"/><s:a href="%{url}">Create/Edit Skill</s:a></li>
<li><s:url id="url" namespace="/employee" action="list"/><s:a href="%{url}">List available Employees</s:a></li>
<li><s:url id="url" namespace="/employee" action="edit"/><s:a href="%{url}">Create/Edit Employee</s:a></li>
</ul>
</p>
@@ -9,11 +9,11 @@
<ul>
<li>
<s:url var="url" action="download"/><s:a href="%{url}">Download image file.</s:a>
<s:url id="url" action="download"/><s:a href="%{url}">Download image file.</s:a>
The browser should display the Struts logo.
</li>
<li>
<s:url var="url" action="download2"/><s:a href="%{url}">Download ZIP file.</s:a>
<s:url id="url" action="download2"/><s:a href="%{url}">Download ZIP file.</s:a>
The browser should prompt for a location to save the ZIP file.
</li>
</ul>
@@ -7,16 +7,16 @@
<ul>
<li>
<s:url var="url" action="upload" namespace="/fileupload" />
<s:url id="url" action="upload" namespace="/fileupload" />
<s:a href="%{#url}">Single File Upload</s:a>
</li>
<li>
<s:url var="url" action="multipleUploadUsingList" namespace="/fileupload" />
<s:url id="url" action="multipleUploadUsingList" namespace="/fileupload" />
<s:a href="%{#url}">Multiple File Upload (List)</s:a>
</li>
<li>
<s:url var="url" action="multipleUploadUsingArray" namespace="/fileupload" />
<s:url id="url" action="multipleUploadUsingArray" namespace="/fileupload" />
<s:a href="%{#url}">Multiple File Upload (Array)</s:a>
</li>
</ul>
@@ -9,11 +9,10 @@
<ul>
<li>
<s:url var="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
<s:url id="url" action="customFreemarkerManagerDemo" namespace="/freemarker" />
<s:a href="%{#url}">Demo of usage of a Custom Freemarker Manager</s:a>
</li>
<li>
<s:url var="url" action="standardTags" namespace="/freemarker" />
<p/>
<s:url id="url" action="standardTags" namespace="/freemarker" />
<s:a href="%{#url}">Demo of Standard Struts Freemarker Tags</s:a>
</li>
</ul>
@@ -2,7 +2,7 @@
<html>
<head>
<title>Showcase - Hangman</title>
<@sx.head />
<@s.head theme="ajax" debug="false" />
</head>
<body>
@@ -17,13 +17,14 @@
}
var _listeners = {
guessMade: function(request, widget) {
var sourceId = widget.widgetId;
this.guessMadeFunc(sourceId);
this.updateCharacterAvailable(sourceId);
this.updateVocab(sourceId);
this.updateScaffold(sourceId);
this.updateGuessLeft(sourceId);
guessMade: function(sourceId, type) {
if(type == "before") {
this.guessMadeFunc(sourceId);
this.updateCharacterAvailable(sourceId);
this.updateVocab(sourceId);
this.updateScaffold(sourceId);
this.updateGuessLeft(sourceId);
}
},
guessMadeFunc: function(sourceId) {
var requestAttr = { character: sourceId };
@@ -215,11 +216,13 @@
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
<@sx.a id="%{#currentCharacter}"
beforeNotifyTopics="topicGuessMade"
<@s.a theme="ajax"
href="%{blankUrl}"
id="%{#currentCharacter}"
notifyTopics="topicGuessMade"
showErrorTransportText="true">
<img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
</@sx.a>
</@s.a>
</@s.iterator>
</div>
@@ -0,0 +1,21 @@
<html>
<head>
<@s.head theme="ajax" debug="true" />
</head>
<body>
<a href="#" id="myAnchor">click</a>
<script>
var anchor = dojo.byId("myAnchor");
alert(anchor);
dojo.event.connect(anchor, "onclick", function(event) {
alert('Custom onclick handler triggered before submitting form... Press OK!');
});
</script>
</body>
</html>
@@ -22,11 +22,13 @@
<@s.url id="spacerUrl" value="/hangman/images/letter-spacer.png" />
<@s.url id="blankUrl" value="ajax/blank.action" includeContext="false" />
<@sx.a id="%{#currentCharacter}"
afterNotifyTopics="topicGuessMade"
<@s.a theme="ajax"
id="%{#currentCharacter}"
href="%{blankUrl}"
notifyTopics="topicGuessMade"
showErrorTransportText="true">
<img height="36" alt="" src="<@s.property value="%{#chalkboardImageUrl}" />" width="36" border="0" />
</@sx.a>
</@s.a>
<#--
<a href="#" id="<@s.property value="%{#currentCharacter}"/>" >
@@ -1,76 +0,0 @@
<%
request.setAttribute("decorator", "none");
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<pre style="font-style: normal;">
<span class="kw">package</span> org.apache.struts2.showcase.action;
<span class="kw">import</span> java.util.Arrays;
<span class="kw">import</span> java.util.Date;
<span class="kw">import</span> java.util.HashMap;
<span class="kw">import</span> java.util.List;
<span class="kw">import</span> java.util.Map;
<span class="kw">import</span> com.opensymphony.xwork2.ActionSupport;
<span class="kw">public class</span> ExampleAction <span class="kw">extends</span> ActionSupport {
<span class="kw">public static final</span> String CONSTANT = "Struts Rocks!";
<span class="kw">public static</span> Date getCurrentDate() {
return new Date();
}
<span class="kw">public</span> String getName() {
return "John Galt";
}
<span class="kw">public</span> String[] getBands() {
return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
}
<span class="kw">public</span> List&lt;String&gt; getMovies() {
return Arrays.asList("Lord of the Rings", "Matrix");
}
<span class="kw">public</span> Book getBook() {
<span class="kw">return</span> new Book("Iliad", "Homer");
}
<span class="kw">public</span> Map&lt;String, Book&gt; getBooks() {
Map&lt;String, Book&gt; books = new HashMap&lt;String, Book&gt;();
books.put("Iliad", new Book("Iliad", "Homer"));
books.put("The Republic", new Book("The Replublic", "Plato"));
books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
"Friedrich Nietzsche"));
return books;
}
}
<span class="kw">class</span> Book {
<span class="kw">private</span> String title;
<span class="kw">private</span> String author;
<span class="kw">public</span> Book(String title, String author) {
this.title = title;
this.author = author;
}
<span class="kw">public</span> String getTitle() {
<span class="kw">return</span> title;
}
<span class="kw">public void</span> setTitle(String title) {
this.title = title;
}
<span class="kw">public</span> String getAuthor() {
return author;
}
<span class="kw">public void</span> setAuthor(String author) {
this.author = author;
}
}
</pre>
@@ -1,247 +0,0 @@
<%@ 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>OGNL and tags demo</title>
<s:url var="struts" value="/struts" includeParams="none"/>
<s:url var="jspEval" action="jspEval" namespace="/nodecorate" includeParams="none"/>
<s:url var="viewClass" value="/interactive/example-action.jsp" includeParams="none"/>
<s:url var="ognlBase" value="/interactive/ognl_" includeParams="none"/>
<s:url var="jspBase" value="/interactive/jsp_" includeParams="none"/>
<script src="${struts}/webconsole.js"></script>
<sx:head/>
<script>
var index = -1;
var runningOgnl = true;
var ognlBase = "${ognlBase}";
var jspBase = "${jspBase}";
var ognlCount = 10;
var jspCount = 5;
dojo.addOnLoad(function() {
var classSrc = dojo.byId("classSrc");
dojo.io.updateNode(classSrc, "${viewClass}");
dojo.html.hide("previous");
dojo.html.hide("next");
});
dojo.event.topic.subscribe("/reloadGuide", function() {
next();
});
function startOgnl() {
selectOGNLTab();
index = -1;
runningOgnl = true;
change(1);
updateNavigation();
}
function startJSP() {
selectJSPTab();
index = -1;
runningOgnl = false;
change(1);
updateNavigation();
}
function execOgnl(id) {
var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
dojo.byId("wc-command").value = exp;
keyEvent({keyCode : 13}, '${jspEval}');
}
function execJSP(id) {
var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
dojo.byId("jsp").value = unscape(exp);
dojo.event.topic.publish("/evalJSP")
}
function unscape(str) {
return str.replace(/&amp;/gm, "&").replace(/&lt;/gm, "<").replace(/&gt;/gm, ">").replace(/&quot;/gm, '"');
}
function selectClassSrcTab() {
dojo.widget.byId("mainTabContainer").selectTab("classTab");
}
function selectJSPTab() {
dojo.widget.byId("mainTabContainer").selectTab("jspTab");
}
function selectOGNLTab() {
dojo.widget.byId("mainTabContainer").selectTab("ognlTab");
}
function change(delta) {
index+=delta;
var url = (runningOgnl ? ognlBase : jspBase) + index + ".jsp";
var bind = dojo.widget.byId("guideBind");
bind.href = url;
dojo.event.topic.publish("/loadContent");
updateNavigation();
}
function updateNavigation() {
if(index <= 0) {
dojo.html.hide("previous");
} else {
dojo.html.show("previous");
}
var top = runningOgnl ? ognlCount : jspCount;
if(index == top - 1) {
dojo.html.hide("next");
} else {
dojo.html.show("next");
}
}
</script>
<style type="">
.wc-results {
overflow: auto;
margin: 0px;
padding: 5px;
font-family: courier;
color: white;
background-color: black;
height: 200px;
}
.wc-results pre {
display: inline;
}
.wc-command {
margin: 1px 0 0 0;
border-style: none;
font-family: courier;
color: white;
background-color: black;
width: 100%;
padding: 0px;
}
.shell {
width: 100%;
}
.jsp {
border-style: solid;
width: 100%;
height: 200px;
}
.jspResult {
border-style: none;
width: 100%;
height: 200px;
padding: 5px;
}
.jspResultHeader {
background-color: #818EBD;
color: white;
width: 100%;
height: 15px;
}
.jspResultHeader span {
padding: 5px;
}
.classSrc {
font-family:Courier;
font-size:11px;
line-height:13px;
overflow: auto;
height: 400px;
width: 100%;
}
.tabContainer {
width: 1000px;
margin: 0 auto;
}
.guideContainer {
width: 600px;
border-width: 1px;
border-style: solid;
margin: 0 auto;
}
.guide {
padding: 5px;
}
pre {
font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;
font-style: italic;
}
span.kw {
color: rgb(127, 0, 85);
font-weight: bold;;
}
</style>
</head>
<sx:bind id="guideBind" targets="guide" listenTopics="/loadContent"/>
<body>
<sx:tabbedpanel id="mainTabContainer" cssClass="tabContainer">
<sx:div label="OGNL Console" id="ognlTab">
<div id="shell" class="shell">
<form onsubmit="return false" id="wc-form">
<div class="wc-results" id="wc-result">
Welcome to the OGNL console!
<br />
:-&gt;
</div>
<input type="hidden" name="debug" value="command" />
OGNL Expression <input name="expression" onkeyup="keyEvent(event, '${jspEval}')" class="wc-command" id="wc-command" type="text" />
</form>
</div>
</sx:div>
<sx:div label="JSP Console" id="jspTab">
<table style="width: 100%" cellpadding="1">
<tr valign="top">
<td width="50%">
<form theme="simple" namespace="/nodecorate" action="jspEval" method="post">
<s:textarea cssClass="jsp" theme="simple" name="jsp" />
<sx:submit
value="Eval JSP Fragment"
href="%{#jspEval}"
targets="jspResult"
listenTopics="/evalJSP"/>
</form>
</td>
<td width="50%">
<div class="jspResultHeader">
<span>JSP Eval Result</span>
</div>
<div id="jspResult" class="jspResult">
</div>
</td>
</tr>
</table>
</sx:div>
<sx:div label="Class on top of the Value Stack" id="classTab">
<div id="classSrc" class="classSrc">
</div>
</sx:div>
</sx:tabbedpanel>
<br/><br/>
<div class="guideContainer">
<div class="jspResultHeader">
<span>Interactive Guide</span>
</div>
<sx:div id="guide" listenTopics="/reloadGuide" cssClass="guide">
<p><a href="#" onclick="startOgnl()">Start OGNL Interactive Demo</a></p>
<p><a href="#" onclick="startJSP()">Start JSP Interactive Demo</a></p>
</sx:div>
<div>
<a href="#" id="previous" onclick="change(-1)" style="float: left"><< Previous</a>
<a href="#" id="next" onclick="change(1)" style="float: right">Next >></a>
</div>
</div>
</body>
</html>
@@ -1,62 +0,0 @@
<%
request.setAttribute("decorator", "none");
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<p>
<b>String Attributes</b>
</p>
<p>
Some tag attributes are expected to be Strings in which case String literals
can be passed as the value, like the <i>href</i> attribute in the <i>a</i> tag.
</p>
<p>
<i>
&lt;s:a href=&quot;http://struts.apache.org/&quot; /&gt;
</i>
</p>
<p>
If the value that you want to use in one of these string literal attributes is stored on the Value Stack,
then the <i>%{#name}</i> syntax (alternative syntax) needs to be used. Assuming there is a value
with the name "url" stored on the stack:
</p>
<p>
<i>
&lt;s:a href=&quot;%{#url}&quot; /&gt;
</i>
</p>
<p>
will create an anchor and use the value of "url" for the <i>href</i> attribute.
</p>
<p>
<b>Value Attributes</b>
</p>
<p>
Other attributes expect an object as their value(not an string literal). In these attributes you can specify
the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the
<i>value</i> attribute in the <i>property</i> tag. Assuming there is an object stored on the Value Stack with
the name "movie", then:
</p>
<p>
<i>
&lt;s:property value=&quot;movie&quot; /&gt;
</i>
</p>
<p>
will print the value to the page. To pass an String literal to an attribute that expects a value use the <i>%{'string'}</i>
notation.
</p>
<p>
If you don't remember if an attribute expects an string literal or a value, you can always use the <i>%{value}</i> notation:
</p>
<p>
<i>
&lt;s:a href=&quot;%{'http://struts.apache.org/'}&quot; /&gt;
<br />
&lt;s:property value=&quot;%{#movie}&quot; /&gt;
</i>
</p>
<p>
<a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/tag-syntax.html')">[More details]</a>
</p>
@@ -1,52 +0,0 @@
<%
request.setAttribute("decorator", "none");
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<p>
<b>Print property value, using the <i>property tag</i></b>
</p>
<p>
On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions.
The <i>property</i> tag is used to print to the page the result of an OGNL expression. The expression
is specified in the <i>value</i> attribute.
</p>
<p>To print the value of the expression <i>name</i> to the page type:
<p>
<i id="example0">
&lt;s:property value=&quot;name&quot; /&gt;
</i>
</p>
<p>
on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
</p>
<p>
As you saw in the OGNL demo, to print a property of an object that is not on top of the stack,
use the <i>#object.property</i> notation.
</p>
<p>To print the value for the key "struts.view_uri" in <i>request</i> to the page type:
<p>
<i id="example1">
&lt;s:property value=&quot;#request['struts.view_uri']&quot; /&gt;
</i>
</p>
<p>
on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
</p>
<p>
<b>Print property value, using the <i>$</i> operator</b>
</p>
<p>Use the <i>${name}</i> notation to print values from the Value Stack to the page.
<p>To print the value of the expression <i>name</i> to the page type:
<p>
<i id="example2">
&#36;{name}
</i>
</p>
<p>
on the JSP console and hit enter. <a href="#" onclick="execJSP('example2')">Do it for me</a>
</p>
<p>
<a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More details]</a>
</p>
@@ -1,54 +0,0 @@
<%
request.setAttribute("decorator", "none");
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<p>
<b><i>if</i> tag</b>
</p>
<p>
The <i>if</i> tag allows you to optionally execute a JSP section. Multiple <i>elseif</i> tags
and one <i>else</i> tag can be associated to an <i>if tag</i>.
</p>
<p>
To say hello to John Galt type:
</p>
<p>
<pre id="example0">
&lt;s:if test="name == 'John Galt'"&gt;
Hi John
&lt;/s:if&gt;
&lt;s:else&gt;
I don't know you!
&lt;/s:else&gt;
</pre>
</p>
<p>
on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
</p>
<p>
<b><i>iterator</i> tag</b>
</p>
<p>
The <i>iterator</i> tag loops over an <i>Iterable</i> object one object at a time into
the Value Stack (the value will be on top of the stack).
</p>
<p>
To print the all the elements in the "bands" property type:
</p>
<p>
<pre id="example1">
&lt;s:iterator value="bands"&gt;
&lt;s:property /&gt;
&lt;br /&gt;
&lt;/s:iterator&gt;
</pre>
</p>
<p>
on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
</p>
<p>
<a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More on the <i>if</i> tag]</a>
<a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/iterator.html')">[More on the <i>iterator</i> tag]</a>
</p>

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