tapestry-5 git commit: TAP5-2480: HTML5 vs. Form Fragment, in Chrome
Repository: tapestry-5 Updated Branches: refs/heads/master 450b36abb - 6e1ebb30c TAP5-2480: HTML5 vs. Form Fragment, in Chrome This changes FormFragment to disable all input fields inside the fragment when it is hidden (including if it is hidden on initial render). When the fragment is shown, it finds the hidden fields and enables them. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6e1ebb30 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6e1ebb30 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6e1ebb30 Branch: refs/heads/master Commit: 6e1ebb30ce572efde8cb6ebc83f5ca46f80a04e7 Parents: 450b36a Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 10:56:08 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 10:56:08 2015 -0700 -- .../modules/t5/core/form-fragment.coffee| 43 ++-- .../corelib/components/FormFragment.java| 18 2 files changed, 39 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6e1ebb30/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/form-fragment.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/form-fragment.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/form-fragment.coffee index 24c8fd8..f4b92ea 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/form-fragment.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/form-fragment.coffee @@ -1,5 +1,3 @@ -# Copyright 2012, 2013 The Apache Software Foundation -# # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -20,21 +18,31 @@ define [underscore, ./dom, ./events, ./forms], SELECTOR = [data-component-type='core/FormFragment'] -# When any form fires the prepareForSubmit event, check to see if -# any form fragments are contained within, and give them a chance -# to enabled/disable their hidden field. -dom.onDocument events.form.prepareForSubmit, form, (event) - +REENABLE = data-re-enable-when-fragment-visible + +disableInputFields = (fragment) - + + # This is an example of where the t5/core/dom abstraction label is problematic, + # as this is very inefficient vs. the native jQuery approach. + for field in fragment.find input:not(:disabled) +field.attr disabled, true +field.attr REENABLE, true + +renableInputFields = (fragment) - - fragments = @find SELECTOR + for field in fragment.find input[#{REENABLE}] +field.attr disabled, null +field.attr REENABLE, null - _.each fragments, (frag) - +updateFields = (fragment, makeVisible) - -fragmentId = frag.attr id + # This is a server side option that says the content of the fragment should always be submitted, + # even if the fragment is not currently visible. + return if fragment.attr data-always-submit -hidden = frag.findFirst input[type=hidden][data-for-fragment='#{fragmentId}'] + f = if makeVisible then renableInputFields else disableInputFields -# If found (e.g., not alwaysSubmit), then enable/disable the field. -hidden hidden.attr disabled, not frag.deepVisible() + f fragment # Again, a DOM event to make the FormFragment visible or invisible; this is useful # because of the didShow/didHide events ... but we're really just seeing the evolution @@ -45,10 +53,19 @@ define [underscore, ./dom, ./events, ./forms], this[if makeVisible then show else hide]() +updateFields this, makeVisible + @trigger events.element[if makeVisible then didShow else didHide] return false +# When a FormFragment is initially rendered as hidden, then we need to do some +# book-keeping on the client side. +hide = (id) - + field = dom(id) + + updateFields field, false + # Initializes a trigger for a FormFragment # # * spec.triggerId - id of checkbox or radio button @@ -72,4 +89,4 @@ define [underscore, ./dom, ./events, ./forms], trigger.on click, update # Module exports: -{ linkTrigger } +{ linkTrigger, hide } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6e1ebb30/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java
tapestry-5 git commit: TAP5-2471: DefaultRequestExceptionHandler creating absolute links for xhr request
Repository: tapestry-5 Updated Branches: refs/heads/master 6e1ebb30c - e25fac7e4 TAP5-2471: DefaultRequestExceptionHandler creating absolute links for xhr request Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e25fac7e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e25fac7e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e25fac7e Branch: refs/heads/master Commit: e25fac7e44f4f043ec8e1787e1b3597173d70bbb Parents: 6e1ebb3 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 13:50:08 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 13:50:08 2015 -0700 -- .../apache/tapestry5/ContextAwareException.java | 10 +--- .../tapestry5/ExceptionHandlerAssistant.java| 26 +--- .../DefaultRequestExceptionHandler.java | 2 +- .../services/RequestExceptionHandler.java | 11 - 4 files changed, 40 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e25fac7e/tapestry-core/src/main/java/org/apache/tapestry5/ContextAwareException.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ContextAwareException.java b/tapestry-core/src/main/java/org/apache/tapestry5/ContextAwareException.java index 9c8b22c..a046fc7 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ContextAwareException.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ContextAwareException.java @@ -1,5 +1,3 @@ -// Copyright 2006, 2008, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,6 +12,12 @@ package org.apache.tapestry5; -public interface ContextAwareException { +/** + * An interface implemented by exceptions that get special handling in the default {@link org.apache.tapestry5.services.RequestExceptionHandler} + * service. + */ +public interface ContextAwareException +{ +/** @returns A page activation context for reporting the exception. */ Object[] getContext(); } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e25fac7e/tapestry-core/src/main/java/org/apache/tapestry5/ExceptionHandlerAssistant.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ExceptionHandlerAssistant.java b/tapestry-core/src/main/java/org/apache/tapestry5/ExceptionHandlerAssistant.java index 7f76075..bfbc553 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ExceptionHandlerAssistant.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ExceptionHandlerAssistant.java @@ -1,5 +1,3 @@ -// Copyright 2006, 2008, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,9 +12,29 @@ package org.apache.tapestry5; +import org.apache.tapestry5.services.RequestExceptionHandler; + import java.io.IOException; import java.util.List; -public interface ExceptionHandlerAssistant { -public Object handleRequestException(Throwable exception, ListObject exceptionContext) throws IOException; +/** + * A contribution to the default {@link RequestExceptionHandler} service, this is mapped to an exception class, + * allowing class specific (based on an inheritance search) handling of an exception. + * + * @see ContextAwareException + */ +public interface ExceptionHandlerAssistant +{ +/** + * Handles the exception, returning a page class or link to redirect to. + * + * @param exception + * the exception as thrown + * @param exceptionContext + * a page activation context that is derived from the root-most exception + * @return either a page class or a {@link Link}; a page will be redirected to, with the exception context + * as the page activation context + * @throws IOException + */ +Object handleRequestException(Throwable exception, ListObject exceptionContext) throws IOException; } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e25fac7e/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java index 26c0a63..39c4bac 100644
tapestry-5 git commit: TAP5-2339: Ajax exception frame complains about Function expected in IE8
Repository: tapestry-5 Updated Branches: refs/heads/master 1dbcb377e - a949d55e7 TAP5-2339: Ajax exception frame complains about Function expected in IE8 Resolution involves not re-using the exception container; this seems like it can be a race condition in IE8 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a949d55e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a949d55e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a949d55e Branch: refs/heads/master Commit: a949d55e7b5dfbc590e5b0ad3e557ef1143922ae Parents: 1dbcb37 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 15:21:37 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 15:21:37 2015 -0700 -- .../modules/t5/core/exception-frame.coffee | 79 +--- 1 file changed, 37 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a949d55e/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-frame.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-frame.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-frame.coffee index 759a4b9..3be3da8 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-frame.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-frame.coffee @@ -1,5 +1,3 @@ -# Copyright 2012-2013 The Apache Software Foundation -# # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -16,54 +14,51 @@ # # Manages a special element used to present an HTML exception report from an Ajax request (where a non-markup response # was expected, including a partial page render response). -define [./dom, underscore], - (dom, _) - -container = null -iframe = null -iframeDocument = null +define [./dom], (dom) - -write = (content) - - # Clear current content: - iframeDocument.open() - # Write new content: - iframeDocument.write content - iframeDocument.close() + write = (container, content) - +iframe = (container.findFirst iframe).element -clear = - - write - container.hide() - return false +# See http://xkr.us/articles/dom/iframe-document/ -create = - - return if container +iframeDocument = iframe.contentWindow or iframe.contentDocument +if iframeDocument.document + iframeDocument = iframeDocument.document - container = dom.create -class: exception-container - - iframe /iframe - div -button class=pull-right btn btn-primary - i class=icon-remove icon-white/i - Close -/button - /div - +# Clear current content: +iframeDocument.open() +# Write new content: +iframeDocument.write content +iframeDocument.close() - dom.body.append container.hide() + clear = - +container = @closest '.exception-container' +container.remove() +return false - iframe = (container.findFirst iframe).element + create = - - # See http://xkr.us/articles/dom/iframe-document/ +container = dom.create + class: exception-container + +iframe /iframe +div + button class=pull-right btn btn-primary +i class=icon-remove icon-white/i +Close + /button +/div + - iframeDocument = iframe.contentWindow or iframe.contentDocument - if iframeDocument.document -iframeDocument = iframeDocument.document +dom.body.append container.hide() - container.on click, button, clear +container.on click, button, clear +container -# Export single function: + # Export single function: -(exceptionContent) - - create() - write exceptionContent - container.show() \ No newline at end of file + (exceptionContent) - +container = create() +write container, exceptionContent +container.show() +return \ No newline at end of file
tapestry-5 git commit: TAP5-2109: t:content ignores text just before the closing tag
Repository: tapestry-5 Updated Branches: refs/heads/master a949d55e7 - 2619a327f TAP5-2109: t:content ignores text just before the closing tag Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2619a327 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2619a327 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2619a327 Branch: refs/heads/master Commit: 2619a327f9f1082dd95f6e97f7d43c76abb88a22 Parents: a949d55 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 15:44:20 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 15:44:20 2015 -0700 -- .../internal/services/SaxTemplateParser.java| 2 ++ .../services/TemplateParserImplTest.java| 22 2 files changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2619a327/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SaxTemplateParser.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SaxTemplateParser.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SaxTemplateParser.java index 3deaa8d..62f84d6 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SaxTemplateParser.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SaxTemplateParser.java @@ -634,6 +634,8 @@ public class SaxTemplateParser // parse is aborted, leaving // tokens with just tokens defined inside t:content. +processTextBuffer(newState); + active = false; break; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2619a327/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java index 0b3e915..b00215a 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java @@ -1058,4 +1058,26 @@ public class TemplateParserImplTest extends InternalBaseTestCase return builder.toString(); } + +@Test +public void text_from_content_not_dropped() { +ListTemplateToken tokens = tokens(content-TAP5-2109.tml); + +System.out.println(tokens); + +assertEquals(tokens.size(), 4); + +TextToken t0 = get(tokens, 0); + +assertEquals(t0.text.trim(), BEGIN); + +StartComponentToken t1 = get(tokens, 1); +assertEquals(t1.getComponentType(), somecomponent); + +EndElementToken t2 = get(tokens, 2); + +TextToken t3 = get(tokens, 3); + +assertEquals(t3.text.trim(), END); +} }
tapestry-5 git commit: Add test file
Repository: tapestry-5 Updated Branches: refs/heads/master 2619a327f - a5436 Add test file Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a543 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a543 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a543 Branch: refs/heads/master Commit: a54368d23f44c21e917fe31dfdf630978430 Parents: 2619a32 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 15:46:46 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 15:46:46 2015 -0700 -- .../apache/tapestry5/internal/services/content-TAP5-2109.TML | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a543/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML -- diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML b/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML new file mode 100644 index 000..6b938a4 --- /dev/null +++ b/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML @@ -0,0 +1,7 @@ +html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; +t:content +BEGIN +t:somecomponent/ +END +/t:content +/html \ No newline at end of file
tapestry-5 git commit: Fix one of those unfortunate Git-vs.-Mac-vs.-filename case situations
Repository: tapestry-5 Updated Branches: refs/heads/master a5436 - c63aeab5f Fix one of those unfortunate Git-vs.-Mac-vs.-filename case situations Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c63aeab5 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c63aeab5 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c63aeab5 Branch: refs/heads/master Commit: c63aeab5f385d002fbae751d2a3dd6f5bf834118 Parents: a54 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jun 1 15:49:06 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jun 1 15:49:06 2015 -0700 -- .../tapestry5/internal/services/TemplateParserImplTest.java | 2 +- .../org/apache/tapestry5/internal/services/TAP5-2109.tml | 7 +++ .../apache/tapestry5/internal/services/content-TAP5-2109.TML | 7 --- 3 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c63aeab5/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java index b00215a..1812043 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/TemplateParserImplTest.java @@ -1061,7 +1061,7 @@ public class TemplateParserImplTest extends InternalBaseTestCase @Test public void text_from_content_not_dropped() { -ListTemplateToken tokens = tokens(content-TAP5-2109.tml); +ListTemplateToken tokens = tokens(TAP5-2109.tml); System.out.println(tokens); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c63aeab5/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/TAP5-2109.tml -- diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/TAP5-2109.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/TAP5-2109.tml new file mode 100644 index 000..6b938a4 --- /dev/null +++ b/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/TAP5-2109.tml @@ -0,0 +1,7 @@ +html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; +t:content +BEGIN +t:somecomponent/ +END +/t:content +/html \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c63aeab5/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML -- diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML b/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML deleted file mode 100644 index 6b938a4..000 --- a/tapestry-core/src/test/resources/org/apache/tapestry5/internal/services/content-TAP5-2109.TML +++ /dev/null @@ -1,7 +0,0 @@ -html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; -t:content -BEGIN -t:somecomponent/ -END -/t:content -/html \ No newline at end of file
[1/3] tapestry-5 git commit: A little whitespace tweak
Repository: tapestry-5 Updated Branches: refs/heads/master faaf0b025 - cf5858fbb A little whitespace tweak Somehow, not committed with the rest Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/009a6ae4 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/009a6ae4 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/009a6ae4 Branch: refs/heads/master Commit: 009a6ae47c429fbb11729cf452a2f7413b828f65 Parents: faaf0b0 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 16:52:59 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 16:52:59 2015 -0700 -- .../src/main/resources/components/Layout.tml | 10 +- .../src/main/resources/pages/Index.tml| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/009a6ae4/quickstart/filtered/archetype-resources/src/main/resources/components/Layout.tml -- diff --git a/quickstart/filtered/archetype-resources/src/main/resources/components/Layout.tml b/quickstart/filtered/archetype-resources/src/main/resources/components/Layout.tml index 6e3523b..cdd27ff 100644 --- a/quickstart/filtered/archetype-resources/src/main/resources/components/Layout.tml +++ b/quickstart/filtered/archetype-resources/src/main/resources/components/Layout.tml @@ -3,13 +3,13 @@ xmlns:t=http://tapestry.apache.org/schema/tapestry_5_4.xsd; head -meta charset=utf-8 / +meta charset=utf-8/ title${D}{title}/title -meta name=viewport content=width=device-width, initial-scale=1.0 / -meta name=description content= / -meta name=author content= / +meta name=viewport content=width=device-width, initial-scale=1.0/ +meta name=description content=/ +meta name=author content=/ !-- Fav and touch icons -- -link rel=shortcut icon href=${D}{asset:context:/favicon.ico} / +link rel=shortcut icon href=${D}{asset:context:/favicon.ico}/ /head body http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/009a6ae4/quickstart/filtered/archetype-resources/src/main/resources/pages/Index.tml -- diff --git a/quickstart/filtered/archetype-resources/src/main/resources/pages/Index.tml b/quickstart/filtered/archetype-resources/src/main/resources/pages/Index.tml index ca21cfb..c670fcd 100644 --- a/quickstart/filtered/archetype-resources/src/main/resources/pages/Index.tml +++ b/quickstart/filtered/archetype-resources/src/main/resources/pages/Index.tml @@ -1,6 +1,6 @@ html t:type=layout title=${artifactId} Index xmlns:t=http://tapestry.apache.org/schema/tapestry_5_4.xsd; - xmlns:p=tapestry:parameter + !-- Most of the page content, including head, body, etc. tags, comes from Layout.tml -- @@ -8,7 +8,7 @@ div class=hero-unit p img src=${D}{asset:context:images/tapestry.png} - alt=${D}{message:greeting} title=${D}{message:greeting} / + alt=${D}{message:greeting} title=${D}{message:greeting}/ /p h3${D}{message:greeting}/h3 pThe current time is: strong${D}{currentTime}/strong/p
[2/3] tapestry-5 git commit: Rework how the action link on the ExceptionReport page are constructed
Rework how the action link on the ExceptionReport page are constructed Previously, the approach was very susceptible to further exceptions while generating the page activation context for the failed page. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7d9b1bb2 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7d9b1bb2 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7d9b1bb2 Branch: refs/heads/master Commit: 7d9b1bb21e478ee58e0b1793856ba5a05dab9561 Parents: 009a6ae Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 16:53:51 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 16:53:51 2015 -0700 -- .../corelib/pages/ExceptionReport.java | 85 ++-- .../tapestry5/corelib/pages/ExceptionReport.tml | 28 ++- 2 files changed, 83 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7d9b1bb2/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java index 248b347..06208e0 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java @@ -12,7 +12,9 @@ package org.apache.tapestry5.corelib.pages; +import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.EventContext; +import org.apache.tapestry5.Link; import org.apache.tapestry5.SymbolConstants; import org.apache.tapestry5.alerts.AlertManager; import org.apache.tapestry5.annotations.ContentType; @@ -78,9 +80,6 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe @Property private String propertyName; -@Property -private String failurePage; - @Inject private RequestGlobals requestGlobals; @@ -108,6 +107,29 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe @Property private ThreadInfo thread; +@Inject +private ComponentResources resources; + +private String failurePage; + +/** + * A link the user may press to perform an action (e.g., Reload page). + */ +public static class ActionLink +{ +public final String uri, label; + + +public ActionLink(String uri, String label) +{ +this.uri = uri; +this.label = label; +} +} + +@Property +private ActionLink actionLink; + public class ThreadInfo implements ComparableThreadInfo { public final String className, name, state, flags; @@ -153,26 +175,73 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe { rootException = exception; +rootURL = baseURLSource.getBaseURL(request.isSecure()); + +// Capture this now ... before the gears are shifted around to make ExceptionReport the active page. failurePage = (request.getAttribute(InternalConstants.ACTIVE_PAGE_LOADED) == null) ? null : requestGlobals.getActivePageName(); +} -rootURL = baseURLSource.getBaseURL(request.isSecure()); +private static void add(ListActionLink links, Link link, String format, Object... arguments) +{ +String label = String.format(format, arguments); +links.add(new ActionLink(link.toURI(), label)); } -public Object[] getReloadContext() +public ListActionLink getActionLinks() { -return pageActivationContextCollector.collectPageActivationContext(failurePage); +ListActionLink links = CollectionFactory.newList(); + +if (failurePage != null) +{ + +try +{ + +Object[] pac = pageActivationContextCollector.collectPageActivationContext(failurePage); + +add(links, + linkSource.createPageRenderLinkWithContext(failurePage, pac), +Go to page strong%s/strong, failurePage); + +if (! productionMode) +{ +add(links, +resources.createEventLink(reloadFirst, pac).addParameter(loadPage, failurePage), +Go to page strong%s/strong (with reload), failurePage); +} + +} catch (Throwable t) +{ +// Ignore. +} + +links.add(new ActionLink(rootURL, +String.format(Go to strong%s/strong,
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-30 [created] 7d9b1bb21
[3/5] tapestry-5 git commit: Revert the introduction of the Field2 interface
Revert the introduction of the Field2 interface This was a dead-end, rather than fixing everything during Ajax requests. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/eff79410 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/eff79410 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/eff79410 Branch: refs/heads/master Commit: eff794101b8eb1c3bf00dc12d76f17e7d72182e7 Parents: 04a7edc Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 14:50:35 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 14:50:35 2015 -0700 -- .../main/java/org/apache/tapestry5/Field2.java | 38 .../apache/tapestry5/ValidationTrackerImpl.java | 6 .../tapestry5/corelib/base/AbstractField.java | 26 +- 3 files changed, 1 insertion(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eff79410/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java b/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java deleted file mode 100644 index 6382f39..000 --- a/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package org.apache.tapestry5; - -/** - * Due to how control names and client ids are allocated inside during an Ajax request, it is difficult to - * to connect input data and field validation errors to the fields, since the control name and client id are different - * during the processing of the submitted form data and during the subsequent render. Starting in 5.4, the - * key used to identify a field inside the {@link ValidationTracker} is this new validation id, - * which is assigned on first read. - * - * If a field implements {@link Field} but not Field2, then the control name is used as the - * validation id (which will work correctly during non-Ajax requests). - * - * This assumes a flat field structure, where a given component renders only once (not multiple times, inside - * a {@link org.apache.tapestry5.corelib.components.Loop}. - * - * @since 5.4 - */ -public interface Field2 extends Field -{ -/** - * Returns a request-scoped unique validation id for the field. This returns the same value regardless of how - * many times the field is rendered, which means that the behavior will be incorrect when the - * field component is placed inside a loop. - */ -String getValidationId(); -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eff79410/tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java index c77e154..bccb1ee 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java @@ -70,12 +70,6 @@ public final class ValidationTrackerImpl extends BaseOptimizedSessionPersistedOb private String getKey(Field field) { -if (field instanceof Field2) -{ -Field2 field2 = (Field2) field; -return field2.getValidationId(); -} - return field.getControlName(); } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eff79410/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java index c8331b8..cd56f3c 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java @@ -30,7 +30,6 @@ import org.apache.tapestry5.services.Request; import
[4/5] tapestry-5 git commit: Add a demo page to test out TAP5-2391
Add a demo page to test out TAP5-2391 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/db0255cf Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/db0255cf Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/db0255cf Branch: refs/heads/master Commit: db0255cfc88a9737d0865446155b12d6aa606900 Parents: eff7941 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 14:55:11 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 14:55:11 2015 -0700 -- .../integration/app1/pages/ZoneFormDemo.groovy | 65 .../tapestry5/integration/app1/pages/Index.java | 2 + .../integration/app1/pages/ZoneFormDemo.tml | 24 3 files changed, 91 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/db0255cf/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.groovy new file mode 100644 index 000..560a0b0 --- /dev/null +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.groovy @@ -0,0 +1,65 @@ +package org.apache.tapestry5.integration.app1.pages + +import org.apache.tapestry5.Field +import org.apache.tapestry5.ValidationTracker +import org.apache.tapestry5.alerts.AlertManager +import org.apache.tapestry5.annotations.Environmental +import org.apache.tapestry5.annotations.InjectComponent +import org.apache.tapestry5.beaneditor.Validate +import org.apache.tapestry5.corelib.components.Zone +import org.apache.tapestry5.ioc.annotations.Inject + +/** + * Used to demonstrate Ajax updates to a form including decoration. + */ +public class ZoneFormDemo { + +@Validate(required) +String handle + +@Validate(required) +Integer rating + +@InjectComponent +Zone zone + +@Inject +AlertManager alertManager + +@Environmental +ValidationTracker tracker + +@InjectComponent(handle) +Field handleField + +@InjectComponent(rating) +Field ratingField + +def onValidateFromForm() { + +if (handle.startsWith(x)) { +tracker.recordError(handleField, No X here, please.) +} + +if (rating 3) { +tracker.recordError(ratingField, Too stringy!) +} + +if (rating 8 !(handle.startsWith(hl))) { +tracker.recordError(ratingField, Too nice!) +} +} + +def onSuccessFromForm() { + +alertManager.info(Rated '${handle}' as ${rating}. Rate another!) + +handle = null +rating = null +} + +def onSubmitFromForm() { +zone.body +} + +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/db0255cf/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java index 4d4c4f3..b14add8 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java @@ -57,6 +57,8 @@ public class Index private static final ListItem ITEMS = CollectionFactory .newList( +new Item(ZoneFormDemo, Zone Form Decoration, Fields inside an Ajax-updatd Form are still decorated properly.), + new Item(AjaxValidationDemo, Ajax Validation, Demonstrated proper integration of server-side validation and client-side field decoration.), new Item(OverrideEventHandlerDemo, Event Handler Override Demo, Event Handler methods overridden by sub-classes invoke base-class correctly.), http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/db0255cf/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml -- diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml new file mode 100644 index 000..203ca8b --- /dev/null +++ b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ZoneFormDemo.tml @@ -0,0 +1,24 @@ +html t:type=Border xmlns:t=http://tapestry.apache.org/schema/tapestry_5_4.xsd; + +h1Zone Form
[1/5] tapestry-5 git commit: Fix typo
Repository: tapestry-5 Updated Branches: refs/heads/master cf5858fbb - 4c8d83efe Fix typo Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d5c3bead Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d5c3bead Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d5c3bead Branch: refs/heads/master Commit: d5c3bead2369aae89e170e540410127bf8f5ad83 Parents: cf5858f Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 14:16:24 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 14:16:24 2015 -0700 -- .../main/java/org/apache/tapestry5/corelib/components/Errors.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d5c3bead/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java index d2abbf5..2d54b76 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java @@ -48,7 +48,7 @@ public class Errors /** * If true, then only errors global to the form (unassociated with any specific field) are - * presented. By default all errors (associated with fields, or not) are presented; with unassoicated + * presented. By default all errors (associated with fields, or not) are presented; with unassociated * errors presented first. * * @since 5.4
[5/5] tapestry-5 git commit: Update release notes
Update release notes Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4c8d83ef Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4c8d83ef Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4c8d83ef Branch: refs/heads/master Commit: 4c8d83efeae4198bd5fc75fb7385271a066e5290 Parents: db0255c Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 15:15:34 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 15:15:34 2015 -0700 -- 54_RELEASE_NOTES.md | 47 +-- 1 file changed, 29 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4c8d83ef/54_RELEASE_NOTES.md -- diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md index 8dc74df..3c543e1 100644 --- a/54_RELEASE_NOTES.md +++ b/54_RELEASE_NOTES.md @@ -50,8 +50,9 @@ Prior versions of Tapestry created cacheable URLs for Assets that incorporated t Assets were served with a far-future expires header: the client browser would not even need to check to see if the asset had changed. -Unfortunately, when any asset changed in a new deployment of the application, the version number needed to -change, resulting in all assets being downloaded (because the application version number in their URLs changed). +Unfortunately, when any asset changed in a new deployment of the application, the version number of the entire +application needed to change, resulting in *all* assets being downloaded +(because the application version number in their URLs changed). In this release, individual assets are given a URL containing a checksum based on the asset's content. When the underlying file is changed, the asset will be served with the new URL, but unchanged assets will not be affected. This means @@ -99,8 +100,8 @@ mode (but disabled in production mode): - Re-render the current page with component rendering comments - Reset the current page's persistent state - Kill (invalidate) any HttpSession -- Open the T5 Dashboard in a new window -- Reload component classes +- Open the T5 Dashboard in a new tab +- Force the reload of component classes ## T5Dashboard Page @@ -146,12 +147,15 @@ never, or always. # Breaking Changes: +## Java 1.6 required + +As of version 5.4, Tapestry requires Java 1.6 at least. + ## clientId required for Ajax field decoration Applications that perform server-side validation of form control data (such as TextField) *as part of -an Ajax Zone update* must now -set the clientId parameter of the TextField in order for client-side validation decoration and error messages -to appear. +an Ajax Zone update* should bind the Zone's simpleIds parameter to true. This disables the injection of a per-request +unique id into allocated client-side ids and client-side control names. Non-Ajax requests are not affected. Client-side validation is not affected. Only the rare case where validation only occurs on the server is affected; Tapestry has lost the ability to coordinate the Tapestry-generated id @@ -199,7 +203,11 @@ resurface in the future as a CSS expression, but is currently not supported. ## ExceptionReport Page -The default exception report page has been modified to display a list of threads. +The default exception report page has been improved dramatically: +- Formatting improvements, care of Bootstrap +- New links at the top of the page, to reload the failed page, or back to the root +- In development mode, additional links to reload pages after clearing the component cache +- A list of all threads, including their status ## Page Suffix for Page Names @@ -235,7 +243,7 @@ properties to the global JavaScript window object, rather than assume that the c Only a limited number of properties exported in the `T5` and `Tapestry` namespaces (on the client) still exist; enough to continue to support the `T5.initializers` approach to page initialization that was used in Tapestry 5.3 and earlier. -These will be eliminated in Tapestry 5.5. +These will be eliminated entirely in Tapestry 5.5. ## New method on ResourceTransformer @@ -287,12 +295,19 @@ Support for validating fields on blur (i.e., when tabbing out of a field) has be the form is submitted, or not at all. The ClientValidation.BLUR enum value has been deprecated and is now treated identically to SUBMIT. +## Page loading mask + +Tapestry now adds a page loading mask to the page; this mask will dim the browser window and add a spinning +wait cursor until all JavaScript on the page has been loaded and initialized. The mask prevents all interaction +with the page. + +CSS animations are used to fade in the mask after a short period
[3/3] tapestry-5 git commit: Finish backing out the validationId changes (commit ef0d1448aca3bca3ed4f8aea6fbedd6b77438fcc)
Finish backing out the validationId changes (commit ef0d1448aca3bca3ed4f8aea6fbedd6b77438fcc) Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/93d06899 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/93d06899 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/93d06899 Branch: refs/heads/master Commit: 93d06899a95161f3c27e3e1b5aaa8dfa83f36f7f Parents: 22bd2c1 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 16:26:29 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 16:26:29 2015 -0700 -- .../corelib/components/BeanEditor.java | 18 ++--- .../tapestry5/corelib/components/Form.java | 4 +- .../corelib/pages/PropertyEditBlocks.java | 83 +--- .../internal/BeanValidationContext.java | 20 ++--- .../internal/BeanValidationContextImpl.java | 18 ++--- 5 files changed, 39 insertions(+), 104 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/93d06899/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java index c44c9fa..45a9711 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java @@ -33,13 +33,11 @@ import org.apache.tapestry5.services.BeanModelSource; import org.apache.tapestry5.services.Environment; import org.apache.tapestry5.services.FormSupport; -import java.util.UUID; - /** * A component that generates a user interface for editing the properties of a bean. This is the central component of * the {@link BeanEditForm}, and utilizes a {@link PropertyEditor} for much of its functionality. This component places * a {@link BeanEditContext} into the environment. - * + * * @tapestrydoc */ @SupportsInformalParameters @@ -181,8 +179,6 @@ public class BeanEditor formSupport.storeAndExecute(this, CLEANUP_ENVIRONMENT); } -private String validationId; - /** * Used to initialize the model if necessary, to instantiate the object being edited if necessary, and to push the * BeanEditContext into the environment. @@ -206,7 +202,8 @@ public class BeanEditor try { object = model.newInstance(); -} catch (Exception ex) +} +catch (Exception ex) { String message = String.format(Exception instantiating instance of %s (for component '%s'): %s, PlasticUtils.toTypeName(model.getBeanType()), resources.getCompleteId(), ex); @@ -214,18 +211,13 @@ public class BeanEditor } } -// Set to a new value on each request; the value lasts until the end of the request. -if (validationId == null) { -validationId = UUID.randomUUID().toString(); -} - BeanEditContext context = new BeanEditContextImpl(model.getBeanType()); cachedObject = object; environment.push(BeanEditContext.class, context); // TAP5-2101: Always provide a new BeanValidationContext -environment.push(BeanValidationContext.class, new BeanValidationContextImpl(object, validationId)); +environment.push(BeanValidationContext.class, new BeanValidationContextImpl(object)); } void cleanupEnvironment() @@ -236,7 +228,7 @@ public class BeanEditor // For testing void inject(ComponentResources resources, PropertyOverrides overrides, BeanModelSource source, -Environment environment) +Environment environment) { this.resources = resources; this.overrides = overrides; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/93d06899/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java index 6147565..0102260 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java @@ -353,7 +353,7 @@ public class Form implements ClientElement, FormValidationControl resources.triggerEvent(EventConstants.PREPARE, context, null); // Push BeanValidationContext only after
[2/3] tapestry-5 git commit: Base form control names of component's id, not allocated client-side id
Base form control names of component's id, not allocated client-side id Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/22bd2c14 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/22bd2c14 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/22bd2c14 Branch: refs/heads/master Commit: 22bd2c14b3c7d91ebd97cbc264882552c12044f7 Parents: c9aa3cb Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 16:23:42 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 16:23:42 2015 -0700 -- 54_RELEASE_NOTES.md| 17 - .../tapestry5/corelib/base/AbstractField.java | 2 +- .../tapestry5/integration/app1/AlertsTests.groovy | 8 .../integration/app1/pages/ZoneFormDemo.tml| 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/22bd2c14/54_RELEASE_NOTES.md -- diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md index 3c543e1..9181675 100644 --- a/54_RELEASE_NOTES.md +++ b/54_RELEASE_NOTES.md @@ -151,15 +151,14 @@ never, or always. As of version 5.4, Tapestry requires Java 1.6 at least. -## clientId required for Ajax field decoration - -Applications that perform server-side validation of form control data (such as TextField) *as part of -an Ajax Zone update* should bind the Zone's simpleIds parameter to true. This disables the injection of a per-request -unique id into allocated client-side ids and client-side control names. - -Non-Ajax requests are not affected. Client-side validation is not affected. Only the rare case where validation -only occurs on the server is affected; Tapestry has lost the ability to coordinate the Tapestry-generated id -for the field (this is related to big improvements in rendering described below). +## Form Control names + +The rules for how a form control's name attribute is generated on the server has changed; previously, it was +based on the field component's client-side id. It is now based on the component's simple Tapestry id. + +As before, the id is made unique with an optional numeric suffix; however with this change it is possible, +in some complex Ajax-related cases (involving FormFragment or FormInjector components) for there to be name +collisions that were not possible before. ## Charset for Assets http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/22bd2c14/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java index cd56f3c..cce49e4 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java @@ -194,7 +194,7 @@ public abstract class AbstractField implements Field assignedClientId = allocateClientId(); -String controlName = formSupport.allocateControlName(assignedClientId); +String controlName = formSupport.allocateControlName(resources.getId()); formSupport.storeAndExecute(this, new Setup(controlName)); formSupport.store(this, PROCESS_SUBMISSION_ACTION); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/22bd2c14/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy index 081445b..ec441c9 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy @@ -97,10 +97,10 @@ class AlertsTests extends App1TestCase { void ajax_update_and_remove() { openLinks Alerts Demo, Reset Alerts Storage -def severitySelector = css=#ajax select[name='severity_0'] -def durationSelector = css=#ajax select[name='duration_0'] -def messageSelector = css=#ajax input[name='message_0'] -def markupSelector = css=#ajax input[name='markup_0'] +def severitySelector = css=#ajax select[name='select_0'] +def durationSelector = css=#ajax select[name='select_1'] +def messageSelector = css=#ajax input[name='textField'] +def markupSelector = css=#ajax
[1/3] tapestry-5 git commit: Properly handle nested page names (with a '/') via URLEncoder
Repository: tapestry-5 Updated Branches: refs/heads/master 4c8d83efe - 93d06899a Properly handle nested page names (with a '/') via URLEncoder Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c9aa3cb6 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c9aa3cb6 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c9aa3cb6 Branch: refs/heads/master Commit: c9aa3cb62355b91ca14c80b97b2313a741b2ab4d Parents: 4c8d83e Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Apr 7 16:23:00 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Apr 7 16:23:00 2015 -0700 -- .../java/org/apache/tapestry5/corelib/pages/ExceptionReport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c9aa3cb6/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java index 3dfae92..87d0d2f 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java @@ -208,7 +208,8 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe if (!productionMode) { add(links, -resources.createEventLink(reloadFirst, pac).addParameter(loadPage, failurePage), +resources.createEventLink(reloadFirst, pac).addParameter(loadPage, +urlEncoder.encode(failurePage)), Go to page strong%s/strong (with reload), failurePage); }
[7/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java index ae1d129..408f021 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java @@ -1,5 +1,3 @@ -// Copyright 2008, 2009 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,20 +12,21 @@ package org.apache.tapestry5.annotations; +import org.apache.tapestry5.ioc.annotations.UseWith; + import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.FIELD; import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.PAGE; -import org.apache.tapestry5.ioc.annotations.UseWith; /** * Annotation for a field for which the page activation context handlers (onActivate and onPassivate) should be created. * In order to use this annotation you must contribute a {@link org.apache.tapestry5.ValueEncoder} for the class of the * annotated property. - * p/ + * * If using this annotation more than once per page class you must specify unique indexes for each. Indexes must start * at 0 and increment by 1 (eg. if 3 annotations are present they must have indexes of 0, 1 and 2) */ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageAttached.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageAttached.java b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageAttached.java index 2914ac5..c646573 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageAttached.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageAttached.java @@ -26,10 +26,10 @@ import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.*; * Method annotation used for methods that should be invoked when the page is first attached to a request. This is * useful for initializations that should occur on each request that involves the page. Often, such initializations will * be balanced by cleanups when the page is detached. - * p/ + * * PageAttached methods should take no parameters and return void. They must either have this annotation, or be named * pageAttached. - * p/ + * * To be clear: methods with this annotation (or name) are still invoked even in Tapestry 5.2, which does away with * the page pool. * http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageDetached.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageDetached.java b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageDetached.java index b9d3f82..2a3deb8 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageDetached.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageDetached.java @@ -25,10 +25,10 @@ import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.*; /** * Method annotation used for methods that should be invoked when the page is detached at the end of a request, before * it is returned to the page pool for later reuse. - * p/ + * * PageDetached methods should take no parameters and return void. They must either have this annotation, or be named * pageDetached. - * p/ + * * To be clear: methods with this annotation (or name) are still invoked even in Tapestry 5.2, which does away with the * page pool. * http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageLoaded.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageLoaded.java b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageLoaded.java index ccbecd1..e50017e 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageLoaded.java +++
[8/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClass.java -- diff --git a/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClass.java b/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClass.java index 85478cd..e212fe5 100644 --- a/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClass.java +++ b/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClass.java @@ -1,5 +1,3 @@ -// Copyright 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -24,15 +22,15 @@ import java.util.Set; * for an imperative style of development: the PlasticClass is provided to other objects; they can query it * for relevant fields or methods, and invoke methods that modify the class in various ways. Ultimately, the * end result is a {@link ClassInstantiator} used to create instances of the fully instrumented and transformed class. - * p/ + * * The terminology is that a class that is being transformed is plastic, but the end result is a normal concrete class * (albeit in a different class loader). - * p/ + * * Implements {@link AnnotationAccess} to provide access to annotations on the type itself. - * p/ + * * This class is expressly emnot thread safe/em; only a single thread should be responsible for operating on a * PlasticClass. - * p/ + * * TODO: what about annotation inheritance? */ @SuppressWarnings(rawtypes) @@ -113,7 +111,7 @@ public interface PlasticClass extends AnnotationAccess * implemented in a emtransformed/em super class, the the default behavior is to invoke that method and return * its value. Otherwise, the default behavior is to ignore parameters and return 0, false, or null. Void methods * will invoke the super-class implementation (if it exists) and return no value. - * p/ + * * It is allowed for the method description to indicate an abstract method; however the abstract flag will be * removed, and a non-abstract method will be created. * @@ -126,7 +124,7 @@ public interface PlasticClass extends AnnotationAccess /** * Returns an existing method declared in this class, or introduces a new method into this class. * The method is created with default behavior. - * p/ + * * It is allowed for the method description to indicate an abstract method; however the abstract flag will be * removed, and a non-abstract method will be created. * @@ -140,7 +138,7 @@ public interface PlasticClass extends AnnotationAccess /** * A convenience that creates a {@link MethodDescription} from the Method and introduces that. This is often * invoked when walking the methods of an interface and introducing each of those methods. - * p/ + * * Introduced methods are always concrete, not abstract. The abstract flag on the method modifiers will always be * stripped off, which is handy when {@linkplain #introduceInterface(Class) introducing methods from an interface}. * http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClassTransformation.java -- diff --git a/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClassTransformation.java b/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClassTransformation.java index 37ba2d4..2d80ba4 100644 --- a/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClassTransformation.java +++ b/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticClassTransformation.java @@ -1,5 +1,3 @@ -// Copyright 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -33,7 +31,7 @@ public interface PlasticClassTransformationT * Terminates the class transformation process, finishes any final bookkeeping, and * returns an object used to instantiate the transformed class. Once this method is invoked, * no other methods of the {@link PlasticClass} (or related objects) can be invoked. - * p + * * The returned ClassInstantiator has an empty {@link InstanceContext} map. Use * {@link ClassInstantiator#with(Class, Object)} to create a new ClassInstantiator with new InstanceContext entries. */ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/plastic/src/main/java/org/apache/tapestry5/plastic/PlasticField.java -- diff --git
[1/9] tapestry-5 git commit: Update copyright year in generated JavaDoc
Repository: tapestry-5 Updated Branches: refs/heads/master feb1737ac - 840533975 Update copyright year in generated JavaDoc Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/df55ff6e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/df55ff6e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/df55ff6e Branch: refs/heads/master Commit: df55ff6e96dc9d420fce120cdc987cb44399530a Parents: feb1737 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 09:23:39 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 09:23:39 2015 -0700 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/df55ff6e/build.gradle -- diff --git a/build.gradle b/build.gradle index aa9033b..696465d 100755 --- a/build.gradle +++ b/build.gradle @@ -328,7 +328,7 @@ task aggregateJavadoc(type: Javadoc) { windowTitle Tapestry API - ${project.version} header Tapestry API - ${project.version} docTitle Tapestry API - ($project.version) -bottom '${project.version} - Copyright copy; 2003-2014 a href=http://tapestry.apache.org;The Apache Software Foundation/a.' +bottom '${project.version} - Copyright copy; 2003-2015 a href=http://tapestry.apache.org;The Apache Software Foundation/a.' use = true // 'use' seems to be a reserved word for the DSL links http://download.oracle.com/javase/6/docs/api/; links http://download.oracle.com/javaee/6/api/;
[3/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java index e2a3c75..1a71ca9 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java @@ -1,5 +1,3 @@ -// Copyright 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -16,98 +14,83 @@ package org.apache.tapestry5.ioc.internal.services.cron; import java.io.Serializable; import java.text.ParseException; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.SortedSet; -import java.util.StringTokenizer; -import java.util.TimeZone; -import java.util.TreeSet; +import java.util.*; /** * Provides a parser and evaluator for unix-like cron expressions. Cron * expressions provide the ability to specify complex time combinations such as * quot;At 8:00am every Monday through Fridayquot; or quot;At 1:30am every * last Friday of the monthquot;. - * P + * * Cron expressions are comprised of 6 required fields and one optional field * separated by white space. The fields respectively are described as follows: - * p/ + * * table cellspacing=8 * tr * th align=leftField Name/th * th align=leftnbsp;/th * th align=leftAllowed Values/th - * th align=leftnbsp;/th * th align=leftAllowed Special Characters/th * /tr * tr * td align=leftcodeSeconds/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode0-59/code/td - * td align=leftnbsp;/th * td align=leftcode, - * //code/td * /tr * tr * td align=leftcodeMinutes/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode0-59/code/td - * td align=leftnbsp;/th * td align=leftcode, - * //code/td * /tr * tr * td align=leftcodeHours/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode0-23/code/td - * td align=leftnbsp;/th * td align=leftcode, - * //code/td * /tr * tr * td align=leftcodeDay-of-month/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode1-31/code/td - * td align=leftnbsp;/th * td align=leftcode, - * ? / L W/code/td * /tr * tr * td align=leftcodeMonth/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode1-12 or JAN-DEC/code/td - * td align=leftnbsp;/th * td align=leftcode, - * //code/td * /tr * tr * td align=leftcodeDay-of-Week/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcode1-7 or SUN-SAT/code/td - * td align=leftnbsp;/th * td align=leftcode, - * ? / L #/code/td * /tr * tr * td align=leftcodeYear (Optional)/code/td - * td align=leftnbsp;/th + * td align=leftnbsp;/td * td align=leftcodeempty, 1970-2199/code/td - * td align=leftnbsp;/th * td align=leftcode, - * //code/td * /tr + * captionCron Expressions/caption * /table - * P + * * The '*' character is used to specify all values. For example, quot;*quot; * in the minute field means quot;every minutequot;. - * P + * * The '?' character is allowed for the day-of-month and day-of-week fields. It * is used to specify 'no specific value'. This is useful when you need to * specify something in one of the two fields, but not the other. - * P + * * The '-' character is used to specify ranges For example quot;10-12quot; in * the hour field means quot;the hours 10, 11 and 12quot;. - * P + * * The ',' character is used to specify additional values. For example * quot;MON,WED,FRIquot; in the day-of-week field means quot;the days Monday, * Wednesday, and Fridayquot;. - * P + * * The '/' character is used to specify increments. For example quot;0/15quot; * in the seconds field means quot;the seconds 0, 15, 30, and 45quot;. And * quot;5/15quot; in the seconds field means quot;the seconds 5, 20, 35, and @@ -119,7 +102,7 @@ import java.util.TreeSet; * on every quot;nthquot; value in the given set. Thus quot;7/6quot; in the * month field only turns on month quot;7quot;, it does NOT mean every 6th * month, please note that subtlety. - * P + * * The 'L' character is allowed for the day-of-month and day-of-week fields. * This character is short-hand for quot;lastquot;, but it has different * meaning in each of the two fields. For example, the value quot;Lquot; in @@ -132,7 +115,7 @@ import java.util.TreeSet; *
[4/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java index b9f55d9..777c7a1 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java @@ -26,17 +26,17 @@ import java.util.List; * and the may be no libraries in the core stack by Tapestry 5.5). Other component libraries may * define additional stacks for related sets of resources, for example, to bundle together some portion * of the ExtJS or YUI libraries. - * p/ + * * The JavaScript assets of a stack may (when {@linkplain SymbolConstants#COMBINE_SCRIPTS enabled}) be exposed to the * client as a single URL (identifying the stack by name). The individual JavaScript assets are combined into a single virtual * asset, which is then streamed to the client. The individual JavaScript libraries, or the combined virtual library, * may be {@linkplain SymbolConstants#MINIFICATION_ENABLED minimized} and the content (both compressed and * uncompressed) cached. - * p/ + * * Implementations may need to inject the {@link ThreadLocale} service in order to determine the current locale (if any * of the JavaScript library or stylesheet assets are localized). They will generally need to inject the * {@link AssetSource} service as well. - * p/ + * * The {@link ExtensibleJavaScriptStack} is the best way to create new stacks. * * @see ThreadLocale http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java index 3ea1bee..526144d 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java @@ -1,5 +1,3 @@ -// Copyright 2010-2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -28,17 +26,17 @@ import org.apache.tapestry5.services.EnvironmentalShadowBuilder; * The JavaScriptSupport environmental is very stateful, accumulating JavaScript stacks, libraries and initialization * code until the end of the main page render; it then updates the rendered DOM (adding lt;scriptgt; tags to the * lt;headgt; and lt;bodygt;) before the document is streamed to the client. - * p/ + * * JavaScriptSupport is normally accessed within a component by using the {@link Environmental} annotation on a * component field. In addition, JavaScriptSupport may also be accessed as a service (the service * {@linkplain EnvironmentalShadowBuilder internally delegates to the current environmental instance}), which is useful * for service-layer objects. - * p/ + * * The term import is used on many methods to indicate that the indicated resource (stack, library or stylesheet) will * only be added to the final cocument once, even when there are repeated calls. - * p/ + * * The name is slightly a misnomer, since there's a side-line of {@linkplain #importStylesheet(StylesheetLink)} as well. - * p/ + * * JavaScriptSupport works equally well inside an Ajax request that produces a JSON-formatted partial page update response. * * @see org.apache.tapestry5.internal.services.DocumentLinker @@ -213,7 +211,7 @@ public interface JavaScriptSupport * {@linkplain SymbolConstants#COMBINE_SCRIPTS JavaScript aggregation} in enabled, the stack will be represented by * a single virtual URL; otherwise the individual asset URLs of the stack * will be added to the document. - * p/ + * * Please refer to the {@linkplain #importJavaScriptLibrary(Asset) notes about libraries vs. modules}. * * @param stackName @@ -224,7 +222,7 @@ public interface JavaScriptSupport /** * Import a Javascript library with an arbitrary URL. - * p/ + * * Please refer to the {@linkplain #importJavaScriptLibrary(Asset) notes about libraries vs. modules}. */ JavaScriptSupport importJavaScriptLibrary(String libraryURL); @@ -248,11 +246,11 @@ public interface JavaScriptSupport * (optionally) de-reference a function exported by the module
[5/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetFactory.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetFactory.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetFactory.java index a06dc5a..faf8f35 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetFactory.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetFactory.java @@ -1,5 +1,3 @@ -// Copyright 2006, 2007, 2008, 2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -19,16 +17,16 @@ import org.apache.tapestry5.ioc.Resource; /** * Used by {@link AssetSource} to create new {@link Asset}s as needed. - * p/ + * * Starting in Tapestry 5.4, the built-in implementations of this interface (for context assets, and for classpath assets) * were changed so that when underlying resources changed, the client URLs for Assets are discarded; this is necessitated by two factors: - * p/1) the {@linkplain org.apache.tapestry5.Asset#toClientURL() client URL} + * 1) the {@linkplain org.apache.tapestry5.Asset#toClientURL() client URL} * for an Asset now includes a checksum based on the content of the underlying resource, so a change to resource content * (during development) results in a change to the URL. - * p/2) {@link org.apache.tapestry5.services.javascript.JavaScriptStack} (especially the {@link org.apache.tapestry5.services.javascript.ExtensibleJavaScriptStack} implementation) + * 2) {@link org.apache.tapestry5.services.javascript.JavaScriptStack} (especially the {@link org.apache.tapestry5.services.javascript.ExtensibleJavaScriptStack} implementation) * made no provision for rebuilding the Assets post-construction, and there is no backwards compatible way to * introduce this concept (and JavaScriptStacks are something many applications and third-party libraries make use of). - * p/So, starting in Tapestry 5.4, the implementations of {@link Asset} should be + * So, starting in Tapestry 5.4, the implementations of {@link Asset} should be * * @see org.apache.tapestry5.services.AssetSource */ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetPathConverter.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetPathConverter.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetPathConverter.java index 6fbb3e6..8040612 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetPathConverter.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetPathConverter.java @@ -1,5 +1,3 @@ -// Copyright 2009, 2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -18,7 +16,7 @@ package org.apache.tapestry5.services; * Converts the {@linkplain org.apache.tapestry5.Asset#toClientURL() path (or URI) of an asset} into a new format. This * is the emhook/em needed to make use of a a href=http://en.wikipedia.org/wiki/Content_Delivery_Network;Content * Delivery Network/a. - * p/ + * * The default implementation of this is emidentity/em, the URI is passed through unchanged. Using a contribution to * the {@link org.apache.tapestry5.ioc.services.ServiceOverride} service, you may override the default implementation. * http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java index 111b2f9..df82262 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java @@ -23,11 +23,11 @@ import java.util.Locale; /** * Used to find or create an {@link org.apache.tapestry5.Asset} with a given path. - * p/ + * * Assets are defined with a domain, and the domain is indicated by a prefix. The two builtin domains are context: * (for files inside the web application context) and classpath: for files stored on the classpath (typically, inside * a JAR, such as a component library). Other domains can be defined via contributions to the AssetSource service. - * p/ + * * Since 5.1.0.0, is is preferred that * {@link
[2/9] tapestry-5 git commit: Update JavaDoc template selection to work under JDK 1.8 (and later)
Update JavaDoc template selection to work under JDK 1.8 (and later) Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/99600b97 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/99600b97 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/99600b97 Branch: refs/heads/master Commit: 99600b97fa6a35fd506b3bff83f1f6b748617822 Parents: df55ff6 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 09:48:28 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 09:48:28 2015 -0700 -- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/99600b97/build.gradle -- diff --git a/build.gradle b/build.gradle index 696465d..e1cc52a 100755 --- a/build.gradle +++ b/build.gradle @@ -319,7 +319,7 @@ task aggregateJavadoc(type: Javadoc) { maxMemory 512m destinationDir file($buildDir/documentation/javadocs) -def tapestryStylesheet = isJDK7() ? file(src/javadoc/stylesheet7.css) : file(src/javadoc/stylesheet.css); +def tapestryStylesheet = isJDKAfter6() ? file(src/javadoc/stylesheet7.css) : file(src/javadoc/stylesheet.css); configure(options) { splitIndex true @@ -579,8 +579,8 @@ boolean isWindows() { System.properties['os.name'].toLowerCase().contains('windows') } -boolean isJDK7() { -System.properties['java.version'].startsWith(1.7.) +boolean isJDKAfter6() { +! System.properties['java.version'].matches('1\\.[5|6]\\..*') } // Check JDK version to prevent VU#225657 see:
[6/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java index 03a96da..1dfcd3d 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java @@ -28,11 +28,11 @@ import java.util.List; /** * A mixin for a text field that allows for autocompletion of text fields. This is based on * Twttter a href=http://twitter.github.io/typeahead.js/;typeahead.js/a version 0.10.5. - * p/ + * * The container is responsible for providing an event handler for event providecompletions. The context will be the * partial input string sent from the client. The return value should be an array or list of completions, in * presentation order. e.g. - * p/ + * * pre * String[] onProvideCompletionsFromMyField(String input) * { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java index 1464129..0a746ef 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java @@ -22,7 +22,7 @@ import org.apache.tapestry5.services.javascript.JavaScriptSupport; /** * A mixin that can be placed on a clickable component, such as {@link org.apache.tapestry5.corelib.components.LinkSubmit}, * and will raise a confirmation dialog when the element is clicked. - * p/ + * * Due to conflicts between jQuery (as used by Bootstrap's JavaScript library) and Prototype, this mixin does not operate * when the {@linkplain org.apache.tapestry5.SymbolConstants#JAVASCRIPT_INFRASTRUCTURE_PROVIDER JavaScript infrastructure provider} * is prototype. http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java index 82e2aaf..9fcc124 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormFieldFocus.java @@ -1,5 +1,3 @@ -// Copyright (c) 2011. The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -15,7 +13,6 @@ package org.apache.tapestry5.corelib.mixins; import org.apache.tapestry5.BindingConstants; -import org.apache.tapestry5.ClientElement; import org.apache.tapestry5.Field; import org.apache.tapestry5.FieldFocusPriority; import org.apache.tapestry5.annotations.AfterRender; @@ -30,7 +27,7 @@ import org.slf4j.Logger; /** * A mixin that instruments the outer {@link org.apache.tapestry5.corelib.components.Form} on which * component the focus should be activated. - * p/ + * * This is meant to be used only with {@link org.apache.tapestry5.corelib.components.Form} component. * * @since 5.3 http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84053397/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java index 424fc5a..f90bcc5 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java @@ -1,5 +1,3 @@ -// Copyright 2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -26,7 +24,7 @@ import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.ioc.annotations.Symbol; /** - * pApplied to a {@link org.apache.tapestry5.Field}, this provides the outer layers of markup to correctly + * Applied to a {@link org.apache.tapestry5.Field}, this provides
[9/9] tapestry-5 git commit: Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules
Clean up markup inside JavaDoc to confirm to JDK 1.8's stricter rules Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/84053397 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/84053397 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/84053397 Branch: refs/heads/master Commit: 840533975a33d9094789bc09e40557a5c3ec7ba8 Parents: 99600b9 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 12:18:21 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 12:18:25 2015 -0700 -- .../apache/tapestry5/beaneditor/BeanModel.java | 8 +-- .../beaneditor/BeanModelSourceBuilder.java | 16 ++--- .../tapestry5/beaneditor/PropertyModel.java | 6 +- .../tapestry5/services/BeanModelSource.java | 6 +- .../services/PropertyConduitSource.java | 4 +- .../org/apache/tapestry5/ioc/Configuration.java | 8 +-- .../tapestry5/ioc/MappedConfiguration.java | 6 +- .../org/apache/tapestry5/ioc/ObjectLocator.java | 13 ++-- .../tapestry5/ioc/OrderedConfiguration.java | 10 ++- .../java/org/apache/tapestry5/ioc/Resource.java | 10 +-- .../ioc/internal/services/TypeCoercerImpl.java | 8 +-- .../ioc/internal/util/CollectionFactory.java| 10 ++- .../ioc/internal/util/GenericsUtils.java| 28 .../ioc/internal/util/InheritanceSearch.java| 14 ++-- .../ioc/services/ClassPropertyAdapter.java | 6 +- .../tapestry5/ioc/services/PropertyAccess.java | 6 +- .../tapestry5/ioc/services/PropertyAdapter.java | 4 +- .../tapestry5/ioc/services/TypeCoercer.java | 6 +- .../apache/tapestry5/ioc/util/TimeInterval.java | 14 ++-- .../tapestry5/services/DataTypeAnalyzer.java| 8 +-- .../services/InvalidationEventHub.java | 4 +- .../tapestry5/util/StringToEnumCoercion.java| 8 +-- .../internal/plastic/asm/MethodWriter.java | 4 +- .../plastic/asm/commons/AdviceAdapter.java | 10 +-- .../internal/plastic/asm/util/ASMifier.java | 12 +--- .../plastic/asm/util/CheckClassAdapter.java | 32 +++--- .../internal/plastic/asm/util/Textifier.java| 15 ++--- .../plastic/asm/util/TraceClassVisitor.java | 16 ++--- .../internal/plastic/asm/xml/Processor.java | 48 +- .../internal/plastic/PlasticInternalUtils.java | 38 +++ .../apache/tapestry5/plastic/FieldConduit.java | 6 +- .../tapestry5/plastic/InstructionBuilder.java | 8 +-- .../tapestry5/plastic/MethodDescription.java| 12 ++-- .../tapestry5/plastic/MethodInvocation.java | 4 +- .../apache/tapestry5/plastic/PlasticClass.java | 16 ++--- .../plastic/PlasticClassTransformation.java | 4 +- .../apache/tapestry5/plastic/PlasticField.java | 6 +- .../tapestry5/plastic/PlasticManager.java | 12 ++-- .../apache/tapestry5/plastic/PlasticMethod.java | 10 +-- .../apache/tapestry5/plastic/PlasticUtils.java | 4 +- .../apache/tapestry5/plastic/TryCatchBlock.java | 4 +- .../src/main/java/services/AppModule.java | 8 +-- .../ClientConstraintDescriptor.java | 4 +- .../main/java/org/apache/tapestry5/Asset.java | 12 ++-- .../BaseOptimizedSessionPersistedObject.java| 6 +- .../main/java/org/apache/tapestry5/Binding.java | 4 +- .../main/java/org/apache/tapestry5/Block.java | 4 +- .../org/apache/tapestry5/ClientElement.java | 4 +- .../org/apache/tapestry5/ComponentAction.java | 6 +- .../tapestry5/ComponentEventCallback.java | 4 +- .../apache/tapestry5/ComponentResources.java| 4 +- .../tapestry5/ComponentResourcesCommon.java | 4 +- .../java/org/apache/tapestry5/ContentType.java | 2 +- .../main/java/org/apache/tapestry5/Field.java | 4 +- .../main/java/org/apache/tapestry5/Field2.java | 8 +-- .../main/java/org/apache/tapestry5/Link.java| 14 ++-- .../java/org/apache/tapestry5/MarkupWriter.java | 4 +- .../OptimizedSessionPersistedObject.java| 4 +- .../java/org/apache/tapestry5/PageCallback.java | 8 +-- .../java/org/apache/tapestry5/SelectModel.java | 4 +- .../org/apache/tapestry5/SymbolConstants.java | 38 +-- .../org/apache/tapestry5/TapestryConstants.java | 4 +- .../org/apache/tapestry5/TapestryFilter.java| 8 +-- .../TrackableComponentEventCallback.java| 8 +-- .../apache/tapestry5/ValidationDecorator.java | 6 +- .../org/apache/tapestry5/ValidationTracker.java | 10 ++- .../java/org/apache/tapestry5/Validator.java| 4 +- .../java/org/apache/tapestry5/ValueEncoder.java | 10 ++- .../java/org/apache/tapestry5/VersionUtils.java | 4 +- .../apache/tapestry5/ajax/MultiZoneUpdate.java | 4 +- .../annotations/ActivationRequestParameter.java | 24 +++ .../tapestry5/annotations/BeforeRenderBody.java | 13 ++-- .../tapestry5/annotations/BeginRender.java | 13 ++-- .../tapestry5/annotations/BindParameter.java
tapestry-5 git commit: TAP5-1862: DateField component: allow 'type' attribute to be specified
Repository: tapestry-5 Updated Branches: refs/heads/master 840533975 - dcd31d68a TAP5-1862: DateField component: allow 'type' attribute to be specified Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/dcd31d68 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/dcd31d68 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/dcd31d68 Branch: refs/heads/master Commit: dcd31d68a7bf755fe0e5a8bf922646a4f86553f5 Parents: 8405339 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 12:50:54 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 12:50:54 2015 -0700 -- .../tapestry5/corelib/components/DateField.java | 37 ++-- 1 file changed, 27 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dcd31d68/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java index 2e47739..94a9a1f 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java @@ -18,6 +18,7 @@ import org.apache.tapestry5.annotations.Import; import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.annotations.RequestParameter; import org.apache.tapestry5.corelib.base.AbstractField; +import org.apache.tapestry5.dom.Element; import org.apache.tapestry5.ioc.Messages; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.ioc.annotations.Symbol; @@ -35,11 +36,11 @@ import java.util.Locale; /** * A component used to collect a provided date from the user using a client-side JavaScript calendar. Non-JavaScript * clients can simply type into a text field. - * + * p/ * One aspect here is that, because client-side JavaScript formatting and parsing is so limited, we (currently) * use Ajax to send the user's input to the server for parsing (before raising the popup) and formatting (after closing * the popup). Weird and inefficient, but easier than writing client-side JavaScript for that purpose. - * + * p/ * Tapestry's DateField component is a wrapper around a * href=http://webfx.eae.net/dhtml/datepicker/datepicker.html;WebFX DatePicker/a. * @@ -66,12 +67,22 @@ public class DateField extends AbstractField */ @Parameter(required = true, allowNull = false, defaultPrefix = BindingConstants.LITERAL) private DateFormat format; - + +/** + * Allows the type of field to be output; normally this is text, but can be updated to date or datetime + * as per the HTML 5 specification. + * + * @since 5.4 + */ +@Parameter(allowNull = false, defaultPrefix = BindingConstants.LITERAL, value = text) +private String type; + /** * When the codeformat/code parameter isn't used, this parameter defines whether the * codeDateFormat/code created by this component will be lenient or not. * The default value of this parameter is the value of the {@link SymbolConstants#LENIENT_DATE_FORMAT} * symbol. + * * @see DateFormat#setLenient(boolean) * @see SymbolConstants#LENIENT_DATE_FORMAT * @since 5.4 @@ -93,7 +104,7 @@ public class DateField extends AbstractField @Parameter(defaultPrefix = BindingConstants.VALIDATE) @SuppressWarnings(unchecked) private FieldValidatorObject validate; - + /** * Icon used for the date field trigger button. This was used in Tapestry 5.3 and earlier and is now ignored. * @@ -116,7 +127,7 @@ public class DateField extends AbstractField @Inject private DeprecationWarning deprecationWarning; - + @Inject @Symbol(SymbolConstants.LENIENT_DATE_FORMAT) private boolean lenientDateFormatSymbolValue; @@ -142,7 +153,7 @@ public class DateField extends AbstractField String pattern = simpleDateFormat.toPattern(); String revised = pattern.replaceAll(([^y])yy$, $1); - + final SimpleDateFormat revisedDateFormat = new SimpleDateFormat(revised); revisedDateFormat.setLenient(lenient); return revisedDateFormat; @@ -158,8 +169,9 @@ public class DateField extends AbstractField { return defaultProvider.defaultValidatorBinding(value, resources); } - -final boolean defaultLenient() { + +final boolean defaultLenient() +{ return lenientDateFormatSymbolValue; } @@ -233,9 +245,9 @@
[6/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/css/bootstrap.css -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/css/bootstrap.css b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/css/bootstrap.css index 3ee1744..057ff46 100644 --- a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/css/bootstrap.css +++ b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/css/bootstrap.css @@ -1,47 +1,18 @@ -@import url(http://fonts.googleapis.com/css?family=Lato:400,700,900,400italic;); - /*! - * Bootstrap v2.3.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -.clearfix { -*zoom: 1; -} - -.clearfix:before, -.clearfix:after { -display: table; -line-height: 0; -content: ; -} - -.clearfix:after { -clear: both; -} - -.hide-text { -font: 0/0 a; -color: transparent; -text-shadow: none; -background-color: transparent; -border: 0; +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; } - -.input-block-level { -display: block; -width: 100%; -min-height: 30px; --webkit-box-sizing: border-box; --moz-box-sizing: border-box; -box-sizing: border-box; +body { + margin: 0; } - article, aside, details, @@ -50,6802 +21,6568 @@ figure, footer, header, hgroup, +main, +menu, nav, -section { -display: block; +section, +summary { + display: block; } - audio, canvas, +progress, video { -display: inline-block; -*display: inline; -*zoom: 1; + display: inline-block; + vertical-align: baseline; } - audio:not([controls]) { -display: none; + display: none; + height: 0; } - -html { -font-size: 100%; --webkit-text-size-adjust: 100%; --ms-text-size-adjust: 100%; +[hidden], +template { + display: none; } - -a:focus { -outline: thin dotted #333; -outline: 5px auto -webkit-focus-ring-color; -outline-offset: -2px; +a { + background-color: transparent; } - -a:hover, -a:active { -outline: 0; +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; } - sub, sup { -position: relative; -font-size: 75%; -line-height: 0; -vertical-align: baseline; + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; } - sup { -top: -0.5em; + top: -.5em; } - sub { -bottom: -0.25em; + bottom: -.25em; } - img { -width: auto\9; -height: auto; -max-width: 100%; -vertical-align: middle; -border: 0; --ms-interpolation-mode: bicubic; + border: 0; } - -#map_canvas img, -.google-maps img { -max-width: none; +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; } - button, input, +optgroup, select, textarea { -margin: 0; -font-size: 100%; -vertical-align: middle; + margin: 0; + font: inherit; + color: inherit; } - -button, -input { -*overflow: visible; -line-height: normal; +button { + overflow: visible; } - -button::-moz-focus-inner, -input::-moz-focus-inner { -padding: 0; -border: 0; +button, +select { + text-transform: none; } - button, html input[type=button], input[type=reset], input[type=submit] { -cursor: pointer; --webkit-appearance: button; + -webkit-appearance: button; + cursor: pointer; } - -label, -select, -button, -input[type=button], -input[type=reset], -input[type=submit], -input[type=radio], -input[type=checkbox] { -cursor: pointer; +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type=checkbox], +input[type=radio] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type=number]::-webkit-inner-spin-button,
[5/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 000..b93a495 Binary files /dev/null and b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot differ
[4/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.svg -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.svg b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 000..94fb549 --- /dev/null +++ b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ +?xml version=1.0 standalone=no? +!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; +svg xmlns=http://www.w3.org/2000/svg; +metadata/metadata +defs +font id=glyphicons_halflingsregular horiz-adv-x=1200 +font-face units-per-em=1200 ascent=960 descent=-240 / +missing-glyph horiz-adv-x=500 / +glyph horiz-adv-x=0 / +glyph horiz-adv-x=400 / +glyph unicode= / +glyph unicode=* d=M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z / +glyph unicode=+ d=M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z / +glyph unicode=#xa0; / +glyph unicode=#xa5; d=M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z / +glyph unicode=#x2000; horiz-adv-x=650 / +glyph unicode=#x2001; horiz-adv-x=1300 / +glyph unicode=#x2002; horiz-adv-x=650 / +glyph unicode=#x2003; horiz-adv-x=1300 / +glyph unicode=#x2004; horiz-adv-x=433 / +glyph unicode=#x2005; horiz-adv-x=325 / +glyph unicode=#x2006; horiz-adv-x=216 / +glyph unicode=#x2007; horiz-adv-x=216 / +glyph unicode=#x2008; horiz-adv-x=162 / +glyph unicode=#x2009; horiz-adv-x=260 / +glyph unicode=#x200a; horiz-adv-x=72 / +glyph unicode=#x202f; horiz-adv-x=260 / +glyph unicode=#x205f; horiz-adv-x=325 / +glyph unicode=#x20ac; d=M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z / +glyph unicode=#x20bd; d=M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z / +glyph unicode=#x2212; d=M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z / +glyph unicode=#x231b; d=M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z / +glyph unicode=#x25fc; horiz-adv-x=500 d=M0 0z / +glyph
[2/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/collapse.js -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/collapse.js b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/collapse.js new file mode 100644 index 000..954513c --- /dev/null +++ b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/collapse.js @@ -0,0 +1,211 @@ +/* + * Bootstrap: collapse.js v3.3.4 + * http://getbootstrap.com/javascript/#collapse + * + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // + + var Collapse = function (element, options) { +this.$element = $(element) +this.options = $.extend({}, Collapse.DEFAULTS, options) +this.$trigger = $('[data-toggle=collapse][href=#' + element.id + '],' + + '[data-toggle=collapse][data-target=#' + element.id + ']') +this.transitioning = null + +if (this.options.parent) { + this.$parent = this.getParent() +} else { + this.addAriaAndCollapsedClass(this.$element, this.$trigger) +} + +if (this.options.toggle) this.toggle() + } + + Collapse.VERSION = '3.3.4' + + Collapse.TRANSITION_DURATION = 350 + + Collapse.DEFAULTS = { +toggle: true + } + + Collapse.prototype.dimension = function () { +var hasWidth = this.$element.hasClass('width') +return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { +if (this.transitioning || this.$element.hasClass('in')) return + +var activesData +var actives = this.$parent this.$parent.children('.panel').children('.in, .collapsing') + +if (actives actives.length) { + activesData = actives.data('bs.collapse') + if (activesData activesData.transitioning) return +} + +var startEvent = $.Event('show.bs.collapse') +this.$element.trigger(startEvent) +if (startEvent.isDefaultPrevented()) return + +if (actives actives.length) { + Plugin.call(actives, 'hide') + activesData || actives.data('bs.collapse', null) +} + +var dimension = this.dimension() + +this.$element + .removeClass('collapse') + .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) + +this.$trigger + .removeClass('collapsed') + .attr('aria-expanded', true) + +this.transitioning = 1 + +var complete = function () { + this.$element +.removeClass('collapsing') +.addClass('collapse in')[dimension]('') + this.transitioning = 0 + this.$element +.trigger('shown.bs.collapse') +} + +if (!$.support.transition) return complete.call(this) + +var scrollSize = $.camelCase(['scroll', dimension].join('-')) + +this.$element + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { +if (this.transitioning || !this.$element.hasClass('in')) return + +var startEvent = $.Event('hide.bs.collapse') +this.$element.trigger(startEvent) +if (startEvent.isDefaultPrevented()) return + +var dimension = this.dimension() + +this.$element[dimension](this.$element[dimension]())[0].offsetHeight + +this.$element + .addClass('collapsing') + .removeClass('collapse in') + .attr('aria-expanded', false) + +this.$trigger + .addClass('collapsed') + .attr('aria-expanded', false) + +this.transitioning = 1 + +var complete = function () { + this.transitioning = 0 + this.$element +.removeClass('collapsing') +.addClass('collapse') +.trigger('hidden.bs.collapse') +} + +if (!$.support.transition) return complete.call(this) + +this.$element + [dimension](0) + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION) + } + + Collapse.prototype.toggle = function () { +this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + Collapse.prototype.getParent = function () { +return $(this.options.parent) + .find('[data-toggle=collapse][data-parent=' + this.options.parent + ']') + .each($.proxy(function (i, element) { +var $element = $(element) +this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) + }, this))
[2/2] tapestry-5 git commit: Advance version number for 5.4-beta-30
Advance version number for 5.4-beta-30 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/faaf0b02 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/faaf0b02 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/faaf0b02 Branch: refs/heads/master Commit: faaf0b025aea1443ac5be9c0cdb17bf43c413ea3 Parents: 9aac4fa Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 14:43:39 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 14:43:39 2015 -0700 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/faaf0b02/build.gradle -- diff --git a/build.gradle b/build.gradle index e1cc52a..10f944a 100755 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-29 +def minor = -beta-30 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
[1/2] tapestry-5 git commit: Remove p/ from JavaDoc
Repository: tapestry-5 Updated Branches: refs/heads/master ee6b0cade - faaf0b025 Updated Tags: refs/tags/5.4-beta-29 [created] 9aac4fa3b Remove p/ from JavaDoc Turns out, I had an IntelliJ setting providing these; turned off now. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9aac4fa3 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9aac4fa3 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9aac4fa3 Branch: refs/heads/master Commit: 9aac4fa3b05df5a33611355b4a20e1c9a5d09851 Parents: ee6b0ca Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 14:24:27 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 14:24:27 2015 -0700 -- .../java/org/apache/tapestry5/corelib/components/DateField.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9aac4fa3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java index 94a9a1f..0e23ba2 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java @@ -36,11 +36,11 @@ import java.util.Locale; /** * A component used to collect a provided date from the user using a client-side JavaScript calendar. Non-JavaScript * clients can simply type into a text field. - * p/ + * * One aspect here is that, because client-side JavaScript formatting and parsing is so limited, we (currently) * use Ajax to send the user's input to the server for parsing (before raising the popup) and formatting (after closing * the popup). Weird and inefficient, but easier than writing client-side JavaScript for that purpose. - * p/ + * * Tapestry's DateField component is a wrapper around a * href=http://webfx.eae.net/dhtml/datepicker/datepicker.html;WebFX DatePicker/a. *
[1/7] tapestry-5 git commit: Upgrade RequireJS to version 2.1.17
Repository: tapestry-5 Updated Branches: refs/heads/master dcd31d68a - ee6b0cade Upgrade RequireJS to version 2.1.17 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b21c7b3a Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b21c7b3a Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b21c7b3a Branch: refs/heads/master Commit: b21c7b3a9a137b8f05008dbcf7a0948db933ed19 Parents: dcd31d6 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 13:13:27 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 13:13:27 2015 -0700 -- .../src/main/resources/META-INF/assets/tapestry5/require.js| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b21c7b3a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/require.js -- diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/require.js b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/require.js index bc43457..babfa9a 100644 --- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/require.js +++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/require.js @@ -1,5 +1,5 @@ /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.16 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. + * @license RequireJS 2.1.17 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ @@ -12,7 +12,7 @@ var requirejs, require, define; (function (global) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, -version = '2.1.16', +version = '2.1.17', commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*[']([^'\s]+)[']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -244,7 +244,7 @@ var requirejs, require, define; // still work when converted to a path, even though // as an ID it is less than ideal. In larger point // releases, may be better to just kick out an error. -if (i === 0 || (i == 1 ary[2] === '..') || ary[i - 1] === '..') { +if (i === 0 || (i === 1 ary[2] === '..') || ary[i - 1] === '..') { continue; } else if (i 0) { ary.splice(i - 1, 2);
[3/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.ttf -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.ttf b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 000..1413fc6 Binary files /dev/null and b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.ttf differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 000..9e61285 Binary files /dev/null and b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff2 -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff2 b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 000..64539b5 Binary files /dev/null and b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.woff2 differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings-white.png -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings-white.png b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484..000 Binary files a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings-white.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings.png -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings.png b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings.png deleted file mode 100644 index a996999..000 Binary files a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/img/glyphicons-halflings.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/affix.js -- diff --git a/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/affix.js b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/affix.js new file mode 100644 index 000..9819764 --- /dev/null +++ b/quickstart/src/main/resources/archetype-resources/src/main/webapp/mybootstrap/js/affix.js @@ -0,0 +1,162 @@ +/* + * Bootstrap: affix.js v3.3.4 + * http://getbootstrap.com/javascript/#affix + * + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * */ + + ++function ($) { + 'use strict'; + + // AFFIX CLASS DEFINITION + // == + + var Affix = function (element, options) { +this.options = $.extend({}, Affix.DEFAULTS, options) + +this.$target = $(this.options.target) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + +this.$element = $(element) +this.affixed = null +
[7/7] tapestry-5 git commit: Simplify streamline the quickstart archetype
Simplify streamline the quickstart archetype - Improve most formatting / identation - The mybootstrap override is now based on Bootstrap 3.3.4 - Upgrade templates to 5.4 DTD Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ee6b0cad Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ee6b0cad Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ee6b0cad Branch: refs/heads/master Commit: ee6b0cade768bee12f0f5793db40491acc8ae39d Parents: b21c7b3 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Apr 6 14:03:37 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Apr 6 14:03:37 2015 -0700 -- .../filtered/archetype-resources/build.gradle |23 +- quickstart/filtered/archetype-resources/pom.xml |18 +- .../src/main/java/components/Layout.java|60 +- .../src/main/java/pages/About.java |16 +- .../src/main/java/pages/Index.java |78 +- .../src/main/java/pages/Login.java |69 +- .../src/main/java/services/AppModule.java |48 +- .../src/main/resources/components/Layout.tml|16 +- .../src/main/resources/pages/About.tml | 2 +- .../src/main/resources/pages/Contact.tml| 2 +- .../src/main/resources/pages/Error404.tml | 2 +- .../src/main/resources/pages/Index.tml | 8 +- .../src/main/resources/pages/Login.tml |10 +- .../mybootstrap/css/bootstrap-responsive.css| 1109 -- .../webapp/mybootstrap/css/bootstrap-theme.css | 476 + .../main/webapp/mybootstrap/css/bootstrap.css | 11735 - .../fonts/glyphicons-halflings-regular.eot | Bin 0 - 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 - 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 - 23424 bytes .../fonts/glyphicons-halflings-regular.woff2| Bin 0 - 18028 bytes .../img/glyphicons-halflings-white.png | Bin 8777 - 0 bytes .../mybootstrap/img/glyphicons-halflings.png| Bin 12799 - 0 bytes .../src/main/webapp/mybootstrap/js/affix.js | 162 + .../src/main/webapp/mybootstrap/js/alert.js |94 + .../src/main/webapp/mybootstrap/js/bootstrap.js | 2280 .../src/main/webapp/mybootstrap/js/button.js| 116 + .../src/main/webapp/mybootstrap/js/carousel.js | 237 + .../src/main/webapp/mybootstrap/js/collapse.js | 211 + .../src/main/webapp/mybootstrap/js/dropdown.js | 161 + .../src/main/webapp/mybootstrap/js/modal.js | 339 + .../src/main/webapp/mybootstrap/js/popover.js | 108 + .../src/main/webapp/mybootstrap/js/scrollspy.js | 172 + .../src/main/webapp/mybootstrap/js/tab.js | 153 + .../src/main/webapp/mybootstrap/js/tooltip.js | 476 + .../main/webapp/mybootstrap/js/transition.js|59 + 36 files changed, 8946 insertions(+), 9582 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ee6b0cad/quickstart/filtered/archetype-resources/build.gradle -- diff --git a/quickstart/filtered/archetype-resources/build.gradle b/quickstart/filtered/archetype-resources/build.gradle index 3df6f01..44ff71a 100644 --- a/quickstart/filtered/archetype-resources/build.gradle +++ b/quickstart/filtered/archetype-resources/build.gradle @@ -20,19 +20,8 @@ repositories { name JBoss url http://repository.jboss.org/nexus/content/groups/public/; } - -// For stable versions of the tapx libraries -maven { -name HLS -url http://howardlewisship.com/repository/; -} - -// For non-stable versions of the tapx libraries -maven { -name HLS Snapshots -url http://howardlewisship.com/snapshot-repository/; -} - + + // For access to Apache Staging (Preview) packages maven { name Apache Staging @@ -67,8 +56,10 @@ dependencies { // Uncomment this to add support for file uploads: // compile org.apache.tapestry:tapestry-upload:@tapestryReleaseVersion@ -// Uncomment this to add support resource minification and runtime compilation: -// compile org.apache.tapestry:tapestry-wro4j:@tapestryReleaseVersion@ +// CoffeeScript Less support, plus resource minification: +compile org.apache.tapestry:tapestry-webresources:@tapestryReleaseVersion@ + +test org.apache.tapestry:tapestry-test:@tapestryReleaseVersion@ // Log implementation choose one: // Log4j 1.x @@ -96,7 +87,7 @@ test { } task wrapper(type: Wrapper) { -gradleVersion = '1.6' +gradleVersion = '2.3' } // TODO: Configure execution mode for jettyRun task
tapestry-5 git commit: Update dependency for less4j to current, 1.10.0
Repository: tapestry-5 Updated Branches: refs/heads/master f39dc7261 - feb1737ac Update dependency for less4j to current, 1.10.0 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/feb1737a Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/feb1737a Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/feb1737a Branch: refs/heads/master Commit: feb1737ac9d5f1efeac28f174b1807d9f74f486a Parents: f39dc72 Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Apr 3 07:54:37 2015 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Apr 3 07:54:37 2015 -0700 -- tapestry-webresources/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/feb1737a/tapestry-webresources/build.gradle -- diff --git a/tapestry-webresources/build.gradle b/tapestry-webresources/build.gradle index 581b333..b95ff17 100644 --- a/tapestry-webresources/build.gradle +++ b/tapestry-webresources/build.gradle @@ -2,7 +2,7 @@ description = Integration with WRO4J to perform runtime CoffeeScript compilatio dependencies { compile project(:tapestry-core) -compile com.github.sommeri:less4j:1.9.0 +compile com.github.sommeri:less4j:1.10.0 compile com.google.javascript:closure-compiler:v20131014 compile org.mozilla:rhino:1.7R5
[1/2] tapestry-5 git commit: Upgrade CoffeeScript to version 1.9.0
Repository: tapestry-5 Updated Branches: refs/heads/master 5d14ccfa9 - 755cd23aa http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/755cd23a/tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/coffee-script.js -- diff --git a/tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/coffee-script.js b/tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/coffee-script.js index 1c6c327..7772fc6 100644 --- a/tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/coffee-script.js +++ b/tapestry-webresources/src/main/resources/org/apache/tapestry5/webresources/internal/coffee-script.js @@ -1,12 +1,12 @@ /** - * CoffeeScript Compiler v1.7.1 + * CoffeeScript Compiler v1.9.0 * http://coffeescript.org * * Copyright 2011, Jeremy Ashkenas * Released under the MIT License */ -(function(root){var CoffeeScript=function(){function require(e){return require[e]}return require[./helpers]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a;e.starts=function(e,t,n){return t===e.substr(n,t.length)},e.ends=function(e,t,n){var i;return i=t.length,t===e.substr(e.length-i-(n||0),i)},e.repeat=s=function(e,t){var n;for(n=;t0;)1t(n+=e),t=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;in;n++)t=e[n],tr.push(t);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,s;for(n=[],r=0,s=e.length;sr;r++)t=e[r],t instanceof Array?n=n.concat(i(t)):n.push(t);return n},e.del=function(e,t){var n;return n=e[t],delete e[t],n},e.last=r=function(e,t){return e[e.length-(t||0)-1]},e.some=null!=(a=Array.prototype.some)?a:function(e){va r t,n,i;for(n=0,i=this.length;in;n++)if(t=this[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,s,o;for(s=e.split(\n),o=[],n=0,r=s.length;rn;n++)t=s[n],i/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(i=/^\s*$/.test(t))?o.push(t):o.push(# +t);return o}(),n.join(\n)},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){returnobject==typeof ii.updateLocationDataIfMissingi.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return2in efirst_linein e[2]?t=e[2]:first_linein e(t=e),t?+(t.first_line+1)+:+(t.first_column+1)+-+(+(t.last_line+1)+:+(t.last_column+1)):No location data},e.baseFileName=function(e,t,n){var i,r;return null==t(t=!1),null==n(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],te.indexOf(.)=0?(i=e.split(.),i.pop(),coffe e===i[i.length-1]i.length1i.pop(),i.join(.)):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=o,n.stack=+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===o(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=+e),e},o=function(){var e,t,n,i,r,o,a,c,h,l,u,p,d;return this.codethis.location?(p=this.location,a=p.first_line,o=p.first_column,h=p.last_line,c=p.last_column,null==h(h=a),null==c(c=o),r=this.filename||[stdin],e=this.code.split(\n)[a],u=o,i=a===h?c+1:e.length,l=s( ,u)+s(^,i-u),undefined!=typeof processnull!==process(n=process.stdout.isTTY!process.env.NODE_DISABLE_COLORS),(null!=(d=this.colorful)?d:n)(t=function(e){return[1;31m+e+[0m},e=e.slice(0,u)+t(e.slice(u,i))+e.slice(i),l=t(l)),+r+:+(a+1)+:+(o+1)+: error: +this.message+\n+e+\n+ l):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case :returnspace;case\n:returnnewline;case\r:returncarriage return;case :returntab;default:return e}}}.call(this),t.exports}(),require[./rewriter]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,b,g,k,y,v=[].indexOf||function(e){for(var t=0,n=this.length;nt;t++)if(t in thisthis[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){v ar i,o,a,c,h;for(a=this.tokens,i=0;o=a[e];){if(0===it.call(this,o,e))return n.call(this,o,e);if(!o||0i)return
[2/2] tapestry-5 git commit: Upgrade CoffeeScript to version 1.9.0
Upgrade CoffeeScript to version 1.9.0 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/755cd23a Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/755cd23a Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/755cd23a Branch: refs/heads/master Commit: 755cd23aafe5d63e6b9677085dcb90515f8842a4 Parents: 5d14ccf Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Feb 11 11:59:07 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Feb 11 11:59:07 2015 -0800 -- .../tapestry5/webresources/internal/coffee-script.js| 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) --
tapestry-5 git commit: Fix a formatting error in the text excepton report
Repository: tapestry-5 Updated Branches: refs/heads/master defcffcd7 - 5d14ccfa9 Fix a formatting error in the text excepton report Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/5d14ccfa Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/5d14ccfa Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/5d14ccfa Branch: refs/heads/master Commit: 5d14ccfa96ccb9aa171e625eb597c290994496da Parents: defcffc Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Feb 11 11:52:34 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Feb 11 11:52:34 2015 -0800 -- .../internal/services/exceptions/ExceptionReportWriterImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/5d14ccfa/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java index 51909b8..439dfdd 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java @@ -67,7 +67,7 @@ public class ExceptionReportWriterImpl implements ExceptionReportWriter }; /** - * A little closure that understands how to write a key/value pair represening a property. + * A little closure that understands how to write a key/value pair representing a property. */ interface PropertyWriter { @@ -234,7 +234,7 @@ public class ExceptionReportWriterImpl implements ExceptionReportWriter } if (!request.getParameterNames().isEmpty()) { -writer.print(%nParameters:%n); +writer.printf(%nParameters:%n); for (String name : request.getParameterNames()) { // TODO: Support multi-value parameters
[1/2] tapestry-5 git commit: Advance version number to 5.4-beta-28
Repository: tapestry-5 Updated Branches: refs/heads/master 755cd23aa - 6aa999465 Advance version number to 5.4-beta-28 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/957e453e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/957e453e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/957e453e Branch: refs/heads/master Commit: 957e453e48f1b2977a942d70f6038cf31ab5a4e0 Parents: 755cd23 Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Feb 11 12:04:24 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Feb 11 12:04:24 2015 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/957e453e/build.gradle -- diff --git a/build.gradle b/build.gradle index 45dbcc2..34779d1 100755 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-27 +def minor = -beta-28 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-28 [created] 957e453e4
tapestry-5 git commit: Revert don't have Jenkins upload the generated artifacts. Currently, this is not adapted to the new SVN based upload process and causes the CI builds to fail.
Repository: tapestry-5 Updated Branches: refs/heads/master ef0d1448a - fa7634ac7 Revert don't have Jenkins upload the generated artifacts. Currently, this is not adapted to the new SVN based upload process and causes the CI builds to fail. This reverts commit 15a0276584a529a5e4b08e6c90450936d000eec9. Reverted because it made it impossible to execute generateRelease. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/fa7634ac Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/fa7634ac Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/fa7634ac Branch: refs/heads/master Commit: fa7634ac7496b35a08e30d5f5fb92e27727f9516 Parents: ef0d144 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Feb 3 07:07:09 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Feb 3 07:07:09 2015 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fa7634ac/build.gradle -- diff --git a/build.gradle b/build.gradle index 6b47623..45dbcc2 100755 --- a/build.gradle +++ b/build.gradle @@ -398,7 +398,7 @@ dependencies { } task continuousIntegration { -dependsOn subprojects.build, aggregateJavadoc +dependsOn subprojects.build, aggregateJavadoc, subprojects.uploadPublished description Task executed on Jenkins CI server after SVN commits }
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-27 [created] fa7634ac7
tapestry-5 git commit: Add a disabled parameter to the Confirm mixin
Repository: tapestry-5 Updated Branches: refs/heads/master 27bf34c4b - ad5cca595 Add a disabled parameter to the Confirm mixin Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ad5cca59 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ad5cca59 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ad5cca59 Branch: refs/heads/master Commit: ad5cca5951b1133d15d445384f0af52a69b8be37 Parents: 27bf34c Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Feb 2 15:53:21 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Feb 2 15:53:21 2015 -0800 -- .../tapestry5/corelib/mixins/Confirm.java | 24 +++- 1 file changed, 18 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ad5cca59/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java index 2d39a8f..1464129 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Confirm.java @@ -1,5 +1,3 @@ -// Copyright 2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -16,9 +14,10 @@ package org.apache.tapestry5.corelib.mixins; import org.apache.tapestry5.BindingConstants; import org.apache.tapestry5.MarkupWriter; -import org.apache.tapestry5.annotations.Import; +import org.apache.tapestry5.annotations.Environmental; import org.apache.tapestry5.annotations.MixinAfter; import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.services.javascript.JavaScriptSupport; /** * A mixin that can be placed on a clickable component, such as {@link org.apache.tapestry5.corelib.components.LinkSubmit}, @@ -32,7 +31,6 @@ import org.apache.tapestry5.annotations.Parameter; * @since 5.4 */ @MixinAfter -@Import(module = t5/core/confirm-click) public class Confirm { /** @@ -47,9 +45,23 @@ public class Confirm @Parameter(value = message:private-default-confirm-title, defaultPrefix = BindingConstants.LITERAL) private String title; +/** + * If true, then the mixin does nothing (no attributes added, no module imported). + */ +@Parameter(false) +private boolean disabled; + +@Environmental +private JavaScriptSupport javaScriptSupport; + void beginRender(MarkupWriter writer) { -writer.attributes(data-confirm-title, title, -data-confirm-message, message); +if (!disabled) +{ +javaScriptSupport.require(t5/core/confirm-click); + +writer.attributes(data-confirm-title, title, +data-confirm-message, message); +} } }
tapestry-5 git commit: Fix bugs related to field validation inside a BeanEditor component
Repository: tapestry-5 Updated Branches: refs/heads/master ad5cca595 - ef0d1448a Fix bugs related to field validation inside a BeanEditor component Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ef0d1448 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ef0d1448 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ef0d1448 Branch: refs/heads/master Commit: ef0d1448aca3bca3ed4f8aea6fbedd6b77438fcc Parents: ad5cca5 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Feb 2 16:39:40 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Feb 2 16:39:40 2015 -0800 -- .../tapestry5/corelib/base/AbstractField.java | 10 +++ .../corelib/components/BeanEditor.java | 20 +++-- .../tapestry5/corelib/components/Form.java | 4 +- .../corelib/pages/PropertyEditBlocks.java | 83 +++- .../internal/BeanValidationContext.java | 22 -- .../internal/BeanValidationContextImpl.java | 20 +++-- 6 files changed, 113 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ef0d1448/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java index 851de73..4f977d0 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java @@ -364,6 +364,16 @@ public abstract class AbstractField implements Field2 beanValidationContext.setCurrentProperty(null); } +/** + * The validation id is used by Tapestry to coordinate an incoming request (with input for fields, + * an validation errors) with a render of the form containing a field. Normally, a validationId is assigned + * on first access and persists for the remainder of the request; however the {@link org.apache.tapestry5.corelib.components.BeanEditor} + * (or rather, the components used by the BeanEditor) may need to override this as the same fields render and re-render + * multiple times in the same request. + * + * @since 5.4 + */ +@Parameter private String validationId; @Override http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ef0d1448/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java index 03344fe..c44c9fa 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java @@ -1,5 +1,3 @@ -// Copyright 2007, 2008, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -35,13 +33,13 @@ import org.apache.tapestry5.services.BeanModelSource; import org.apache.tapestry5.services.Environment; import org.apache.tapestry5.services.FormSupport; -import java.lang.annotation.Annotation; +import java.util.UUID; /** * A component that generates a user interface for editing the properties of a bean. This is the central component of * the {@link BeanEditForm}, and utilizes a {@link PropertyEditor} for much of its functionality. This component places * a {@link BeanEditContext} into the environment. - * + * * @tapestrydoc */ @SupportsInformalParameters @@ -183,6 +181,8 @@ public class BeanEditor formSupport.storeAndExecute(this, CLEANUP_ENVIRONMENT); } +private String validationId; + /** * Used to initialize the model if necessary, to instantiate the object being edited if necessary, and to push the * BeanEditContext into the environment. @@ -206,8 +206,7 @@ public class BeanEditor try { object = model.newInstance(); -} -catch (Exception ex) +} catch (Exception ex) { String message = String.format(Exception instantiating instance of %s (for component '%s'): %s, PlasticUtils.toTypeName(model.getBeanType()), resources.getCompleteId(), ex); @@ -215,13 +214,18 @@ public class BeanEditor } } +
tapestry-5 git commit: TAP5-2391: Properly track Fields in ValidationTracker, even during Ajax requests
Repository: tapestry-5 Updated Branches: refs/heads/master fa691e262 - 280940fb0 TAP5-2391: Properly track Fields in ValidationTracker, even during Ajax requests Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/280940fb Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/280940fb Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/280940fb Branch: refs/heads/master Commit: 280940fb098a4766effe297c20812042723529a8 Parents: fa691e2 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jan 5 12:42:39 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jan 5 12:42:39 2015 -0800 -- .../main/java/org/apache/tapestry5/Field.java | 5 +-- .../main/java/org/apache/tapestry5/Field2.java | 38 .../apache/tapestry5/ValidationTrackerImpl.java | 26 +- .../tapestry5/corelib/base/AbstractField.java | 16 - .../integration/app1/AjaxGroovyTests.groovy | 12 +++ 5 files changed, 86 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/280940fb/tapestry-core/src/main/java/org/apache/tapestry5/Field.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/Field.java b/tapestry-core/src/main/java/org/apache/tapestry5/Field.java index eabc532..c22b28d 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/Field.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/Field.java @@ -1,5 +1,3 @@ -// Copyright 2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -22,6 +20,9 @@ package org.apache.tapestry5; * component's {@link #getControlName()} will only be accurate after it has rendered. In some cases, when generating * JavaScript for example, it is necessary to {@linkplain org.apache.tapestry5.services.Heartbeat#defer(Runnable) wait * until the end of the current Heartbeat} to ensure that all components have had their chance to render. + * p/ + * Most Fields also implement {@link org.apache.tapestry5.Field2}, which was introduced to bridge a gap related to + * re-rendering a form as part of an Ajax request. */ public interface Field extends ClientElement { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/280940fb/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java b/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java new file mode 100644 index 000..3322325 --- /dev/null +++ b/tapestry-core/src/main/java/org/apache/tapestry5/Field2.java @@ -0,0 +1,38 @@ +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.apache.tapestry5; + +/** + * Due to how control names and client ids are allocated inside during an Ajax request, it is difficult to + * to connect input data and field validation errors to the fields, since the control name and client id are different + * during the processing of the submitted form data and during the subsequent render. Starting in 5.4, the + * key used to identify a field inside the {@link org.apache.tapestry5.ValidationTracker is this new validation id, + * which is assigned on first read. + * p/ + * If a field inplements {@link org.apache.tapestry5.Field} but not Field2, then the control name is used as the + * validation id (which will work correctly during non-Ajax requests). + * p/ + * This assumes a flat field structure, where a given component renders only once (not multiple times, inside + * a {@link org.apache.tapestry5.corelib.components.Loop}. + * + * @since 5.4 + */ +public interface Field2 extends Field +{ +/** + * Returns a request-scoped unique validation id for the field. This returns the same value regardless of how + * many times the field is rendered, which means that the behavior will be incorrect when the + * field component is placed inside a loop. + */ +String getValidationId(); +}
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-26 [created] 280940fb0
tapestry-5 git commit: Advance version number to 5.4-beta-27
Repository: tapestry-5 Updated Branches: refs/heads/master 280940fb0 - b01e6aeab Advance version number to 5.4-beta-27 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b01e6aea Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b01e6aea Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b01e6aea Branch: refs/heads/master Commit: b01e6aeab319f2d0668869022364d9b9fc84ae48 Parents: 280940f Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Jan 5 13:04:19 2015 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Jan 5 13:04:19 2015 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b01e6aea/build.gradle -- diff --git a/build.gradle b/build.gradle index e878569..6d56d46 100755 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-26 +def minor = -beta-27 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
tapestry-5 git commit: Layout and UI improvements on the default ExceptionReport page
Repository: tapestry-5 Updated Branches: refs/heads/master 030899832 - 48d1f6409 Layout and UI improvements on the default ExceptionReport page Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/48d1f640 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/48d1f640 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/48d1f640 Branch: refs/heads/master Commit: 48d1f640911faf0116c30015f67ec359e8326f66 Parents: 0308998 Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Dec 31 10:55:34 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Dec 31 10:55:34 2014 -0800 -- .../corelib/pages/ExceptionReport.java | 2 +- .../META-INF/assets/core/ExceptionReport.css| 4 .../tapestry5/corelib/pages/ExceptionReport.tml | 25 +--- 3 files changed, 16 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/48d1f640/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java index 98d0b21..8bdaf9e 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java @@ -134,7 +134,7 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe public boolean isShowActions() { -return failurePage != null !request.isXHR(); +return ! productionMode failurePage != null !request.isXHR(); } public void reportException(Throwable exception) http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/48d1f640/tapestry-core/src/main/resources/META-INF/assets/core/ExceptionReport.css -- diff --git a/tapestry-core/src/main/resources/META-INF/assets/core/ExceptionReport.css b/tapestry-core/src/main/resources/META-INF/assets/core/ExceptionReport.css index 87fdab6..023d210 100644 --- a/tapestry-core/src/main/resources/META-INF/assets/core/ExceptionReport.css +++ b/tapestry-core/src/main/resources/META-INF/assets/core/ExceptionReport.css @@ -13,4 +13,8 @@ table.exception-report-threads tr th:last-child { table.exception-report-threads tr.active-thread { font-weight: bold; +} + +table.exception-report-threads { +font-size: small; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/48d1f640/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml -- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml index 9bd1f25..0f6dbac 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml @@ -40,7 +40,7 @@ div class=panel-footer -div class=btn-toolbar col-md-12 +div class=btn-toolbar btn-group-xs t:if test=failurePage t:pagelink page=prop:failurePage class=btn btn-defaultGo to page @@ -62,21 +62,19 @@ /t:actionLink /div /div +t:if test=showActions +div class=panel-footer +pstrongwith reload/strong: Force a reload of component +classes. This is often necessary +after fixing a class that previously failed to compile due to errors. +/p +/div +/t:if /t:if /div t:if test=! productionMode -t:if test=showActions - -p class=help-text col-md-12strongwith reload/strong: Force a reload of component -classes. This is -often -necessary -after fixing a class that previously failed to compile due to errors. -/p -/t:if - t:exceptiondisplay exception=rootException/ h3Request/h3 @@ -97,16 +95,15 @@
[2/2] tapestry-5 git commit: Some more improvements to the exception report page
Some more improvements to the exception report page Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/fa691e26 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/fa691e26 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/fa691e26 Branch: refs/heads/master Commit: fa691e262a35b36cd8de25b2dc7269f9566f1db9 Parents: ede56bc Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Dec 31 16:55:15 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Dec 31 16:55:15 2014 -0800 -- .../corelib/pages/ExceptionReport.java | 14 +- .../tapestry5/corelib/pages/ExceptionReport.tml | 27 +++- 2 files changed, 28 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fa691e26/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java index 8bdaf9e..248b347 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ExceptionReport.java @@ -132,9 +132,21 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe private final String pathSeparator = System.getProperty(PATH_SEPARATOR_PROPERTY); +/** + * Returns true for normal, non-XHR requests. Links (to the failure page, or to root page) are only + * presented if showActions is true. + */ public boolean isShowActions() { -return ! productionMode failurePage != null !request.isXHR(); +return !request.isXHR(); +} + +/** + * Returns true in development mode; enables the with reload actions. + */ +public boolean isShowReload() +{ +return !productionMode; } public void reportException(Throwable exception) http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fa691e26/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml -- diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml index 0f6dbac..74cdc1e 100644 --- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/ExceptionReport.tml @@ -41,28 +41,31 @@ div class=panel-footer div class=btn-toolbar btn-group-xs - t:if test=failurePage t:pagelink page=prop:failurePage class=btn btn-defaultGo to page strong${failurePage}/strong /t:pagelink -t:actionlink t:id=reloadFirst parameters={'loadPage': failurePage} - context=reloadContext class=btn btn-defaultGo to page -strong${failurePage}/strong -(with reload) -/t:actionlink +t:if test=showReload +t:actionlink t:id=reloadFirst parameters={'loadPage': failurePage} + context=reloadContext class=btn btn-defaultGo to page +strong${failurePage}/strong +(with reload) +/t:actionlink +/t:if /t:if a href=/ class=btn btn-defaultGo to strong${rootURL}/strong /a -t:actionLink t:id=reloadRoot class=btn btn-default -Go to -strong${rootURL}/strong -(with reload) -/t:actionLink +t:if test=showReload +t:actionLink t:id=reloadRoot class=btn btn-default +Go to +strong${rootURL}/strong +(with reload) +/t:actionLink +
[1/2] tapestry-5 git commit: Extract ExceptionReportWriter from ExceptionReporterImpl
Repository: tapestry-5 Updated Branches: refs/heads/master 48d1f6409 - fa691e262 Extract ExceptionReportWriter from ExceptionReporterImpl Do a better job formatting the output, and display session attributes if present. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ede56bc6 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ede56bc6 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ede56bc6 Branch: refs/heads/master Commit: ede56bc6fb85694b969a1ffd348960e72a04f936 Parents: 48d1f64 Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Dec 31 16:45:37 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Dec 31 16:45:37 2014 -0800 -- .../exceptions/ExceptionReportWriterImpl.java | 313 +++ .../exceptions/ExceptionReporterImpl.java | 251 +-- .../tapestry5/modules/TapestryModule.java | 15 +- .../services/ExceptionReportWriter.java | 38 +++ .../tapestry5/services/ExceptionReporter.java | 4 +- 5 files changed, 369 insertions(+), 252 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ede56bc6/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java new file mode 100644 index 000..51909b8 --- /dev/null +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReportWriterImpl.java @@ -0,0 +1,313 @@ +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.apache.tapestry5.internal.services.exceptions; + +import org.apache.tapestry5.SymbolConstants; +import org.apache.tapestry5.func.F; +import org.apache.tapestry5.func.Flow; +import org.apache.tapestry5.func.Mapper; +import org.apache.tapestry5.func.Reducer; +import org.apache.tapestry5.internal.TapestryInternalUtils; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.ioc.annotations.Symbol; +import org.apache.tapestry5.ioc.internal.util.CollectionFactory; +import org.apache.tapestry5.ioc.internal.util.InternalUtils; +import org.apache.tapestry5.ioc.services.ExceptionAnalysis; +import org.apache.tapestry5.ioc.services.ExceptionAnalyzer; +import org.apache.tapestry5.ioc.services.ExceptionInfo; +import org.apache.tapestry5.services.ExceptionReportWriter; +import org.apache.tapestry5.services.Request; +import org.apache.tapestry5.services.RequestGlobals; +import org.apache.tapestry5.services.Session; + +import java.io.PrintWriter; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class ExceptionReportWriterImpl implements ExceptionReportWriter +{ +private static final ReducerInteger, Integer MAX = new ReducerInteger, Integer() +{ +@Override +public Integer reduce(Integer accumulator, Integer element) +{ +return Math.max(accumulator, element); +} +}; + +private static final MapperString, Integer STRING_TO_LENGTH = new MapperString, Integer() +{ +@Override +public Integer map(String element) +{ +return element.length(); +} +}; + +private final static MapperExceptionInfo, FlowString EXCEPTION_INFO_TO_PROPERTY_NAMES = +new MapperExceptionInfo, FlowString() +{ +@Override +public FlowString map(ExceptionInfo element) +{ +return F.flow(element.getPropertyNames()); +} +}; + +/** + * A little closure that understands how to write a key/value pair represening a property. + */ +interface PropertyWriter +{ +void write(String name, Object value); +} + +@Inject +private ExceptionAnalyzer analyzer; + +@Inject +private RequestGlobals requestGlobals; + +@Inject +@Symbol(SymbolConstants.CONTEXT_PATH) +private String contextPath; + +
tapestry-5 git commit: Change the deployment script to work with Apache svnpubsub system
Repository: tapestry-5 Updated Branches: refs/heads/master f88ed9a30 - 687abdf28 Change the deployment script to work with Apache svnpubsub system Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/687abdf2 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/687abdf2 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/687abdf2 Branch: refs/heads/master Commit: 687abdf28c5422c2ec130f4422259f685673d868 Parents: f88ed9a Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 30 09:40:01 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 30 10:04:58 2014 -0800 -- build.gradle | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/687abdf2/build.gradle -- diff --git a/build.gradle b/build.gradle index 20f00f4..1d97274 100755 --- a/build.gradle +++ b/build.gradle @@ -62,10 +62,15 @@ project.ext { deployUsernameProperty = isSnapshot() ? snapshotDeployUserName : apacheDeployUserName deployPasswordProperty = isSnapshot() ? snapshotDeployPassword : apacheDeployPassword -canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) } +canDeploy = [deployUsernameProperty, deployPasswordProperty, apacheArchivesFolder].every { project.hasProperty(it) } +// These are all deferred inside closures, to allow people without the necessary values in their +// gradle.properties to build locally, just not deploy. getProperty() throws an exception if the property +// is not present. deployUsername = { getProperty(deployUsernameProperty) } deployPassword = { getProperty(deployPasswordProperty) } + +archiveDeployFolder = { getProperty(apacheArchivesFolder) } } sonar { @@ -512,29 +517,34 @@ if (canDeploy) { } } -task uploadArtifacts(type: Scp) { -group Release artifact -description Uploads top-level artifacts to people.apache.org, along with MD5 checksums and PGP signatures (if signing is enabled) +// This requires that you have the apacheArchivesFolder property configured in your +// ~/.gradle/gradle.properties. The folder should be a Subversion workspace for +// https://dist.apache.org/repos/dist/dev/tapestry +// after the build, you must manually add the new files to the workspace (using svn add) +// then commit (svn commit). + +// The files will be visible in https://dist.apache.org/repos/dist/dev/tapestry/, allowing +// committers to download and verify them. -source files(generateMD5Checksums, configurations.uploads.allArtifacts.files) +// After a successful release vote, the files can be moved to a second Subversion workspace +// for https://dist.apache.org/repos/dist/release/tapestry. Adding the files and committing +// there will publish them to http://www.apache.org/dist/tapestry ... and from there +// to all Apache mirrors (after about a 24 hour delay). -host people.apache.org -userName deployUsername() -password deployPassword() +task copyArchives(type: Copy) { +group Release artifact +description Copies build archives (source, bin, docs) to a configured deployment folder, along with MD5 checksums and PGP signatures (if signing is enabled) -// The destination folder at people.apache.org needs to already exist. -destination public_html/tapestry-releases +destinationDir file(archiveDeployFolder()) -doFirst { -logger.info Uploading the following files to people.apache.org (as user '${userName}'): -source.files.each { logger.info $it } -} +from generateMD5Checksums +from configurations.uploads.allArtifacts.files } task generateRelease { -dependsOn quickstart:clean, continuousIntegration, subprojects.uploadPublished, uploadArtifacts +dependsOn quickstart:clean, continuousIntegration, subprojects.uploadPublished, copyArchives group Release artifact -description Generates and uploads a final release to Apache Nexus +description Generates and uploads a final release to Apache Nexus and copies archives for deployment } }
[2/2] tapestry-5 git commit: Improve the Javadoc
Improve the Javadoc Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7a9b2e81 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7a9b2e81 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7a9b2e81 Branch: refs/heads/master Commit: 7a9b2e81d8984e8d538bd2eb4ed7c398c3176e7d Parents: d025536 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 30 17:11:29 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 30 17:11:29 2014 -0800 -- .../java/org/apache/tapestry5/modules/TapestryModule.java| 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7a9b2e81/tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java b/tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java index 8a72a4d..d215095 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/modules/TapestryModule.java @@ -99,7 +99,6 @@ import org.slf4j.Logger; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import java.io.IOException; import java.io.InputStream; import java.lang.annotation.Annotation; @@ -1706,8 +1705,13 @@ public final class TapestryModule * dtPageNameMeta (since 5.4)/dt * ddRenders a {@code meta/} tag describing the active page name (development mode only)/dd * dtImportCoreStack (since 5.4) /dt - * ddImports to core stack (necessary to get the Bootstrap CSS, if nothing else)./dd + * ddImports the core stack (necessary to get the Bootstrap CSS, if nothing else)./dd * /dl + * + * @see org.apache.tapestry5.SymbolConstants#OMIT_GENERATOR_META + * @see org.apache.tapestry5.SymbolConstants#PRODUCTION_MODE + * @see org.apache.tapestry5.SymbolConstants#INCLUDE_CORE_STACK + * @see org.apache.tapestry5.SymbolConstants#ENABLE_PAGELOADING_MASK */ public void contributeMarkupRenderer(OrderedConfigurationMarkupRendererFilter configuration,
[1/2] tapestry-5 git commit: Allow the component's render phase methods to execute before the advice provided by the ImportWorker
Repository: tapestry-5 Updated Branches: refs/heads/master 687abdf28 - 7a9b2e81d Allow the component's render phase methods to execute before the advice provided by the ImportWorker This is the last piece necessary for TAP5-2435 (the rest was implemented previously). Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d025536f Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d025536f Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d025536f Branch: refs/heads/master Commit: d025536f5af206c10744c884fde41b87ae37fc7f Parents: 687abdf Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 30 17:11:16 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 30 17:11:16 2014 -0800 -- .../org/apache/tapestry5/internal/transform/ImportWorker.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d025536f/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java index 17bddc4..a3801a6 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java @@ -268,11 +268,11 @@ public class ImportWorker implements ComponentClassTransformWorker2 { public void advise(MethodInvocation invocation) { +invocation.proceed(); + Asset[] assets = (Asset[]) access.get(invocation.getInstance()); F.flow(assets).each(operation); - -invocation.proceed(); } }); }
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-25 [created] 7a9b2e81d
tapestry-5 git commit: Advance version number to 5.4-beta-26
Repository: tapestry-5 Updated Branches: refs/heads/master 7a9b2e81d - 030899832 Advance version number to 5.4-beta-26 Really feeling close to a RC! Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/03089983 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/03089983 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/03089983 Branch: refs/heads/master Commit: 030899832df14c5d526d494b92ea347138f7596e Parents: 7a9b2e8 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 30 17:29:58 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 30 17:29:58 2014 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/03089983/build.gradle -- diff --git a/build.gradle b/build.gradle index 1d97274..e878569 100755 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-25 +def minor = -beta-26 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
[3/4] tapestry-5 git commit: Make a correction to how the event link is created
Make a correction to how the event link is created Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8caf479f Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8caf479f Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8caf479f Branch: refs/heads/master Commit: 8caf479fd3998b24b0fe5e7c0c6eff243643 Parents: 91ab2f9 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 08:59:53 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 08:59:53 2014 -0800 -- .../tapestry5/integration/app1/pages/ActionViaLinkDemo.java| 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8caf479f/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ActionViaLinkDemo.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ActionViaLinkDemo.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ActionViaLinkDemo.java index dbafd37..5289cac 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ActionViaLinkDemo.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ActionViaLinkDemo.java @@ -29,7 +29,7 @@ public class ActionViaLinkDemo Object[] onPassivate() { -return new Object[] { }; +return new Object[]{}; } public String getMessage() @@ -39,14 +39,12 @@ public class ActionViaLinkDemo void onUpdateMessage(String message) { -getActionURL(); - this.message = message; } public String getActionURL() { -Link link = resources.createEventLink(UpdateMessage, false, from getActionURL()); +Link link = resources.createEventLink(UpdateMessage, from getActionURL()); return link.toURI(); }
[2/4] tapestry-5 git commit: Compute year (displayed in page footer) based on Calendar, rather than hard-coded.
Compute year (displayed in page footer) based on Calendar, rather than hard-coded. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/91ab2f9d Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/91ab2f9d Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/91ab2f9d Branch: refs/heads/master Commit: 91ab2f9dad9583ac11c812c58840830912442330 Parents: 4a74819 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 08:57:31 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 08:59:00 2014 -0800 -- .../tapestry5/integration/app1/components/Border.java | 12 +--- .../tapestry5/integration/app1/components/Border.tml| 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/91ab2f9d/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Border.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Border.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Border.java index ef117a1..e2d99fe 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Border.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Border.java @@ -1,5 +1,3 @@ -// Copyright 2006-2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -20,6 +18,8 @@ import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Request; +import java.util.Calendar; + /** * Here's a component with a template, including a t:body element. Really should rename this to Layout as that's the * T5 naming. @@ -34,6 +34,13 @@ public class Border @Inject private ComponentResources resources; +public static final int year; + +static +{ +year = Calendar.getInstance().get(Calendar.YEAR); +} + public String getSecure() { return request.isSecure() ? secure : insecure; @@ -45,5 +52,4 @@ public class Border return true; } - } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/91ab2f9d/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml -- diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml index 555d51d..36c8b00 100644 --- a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml +++ b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml @@ -55,7 +55,7 @@ t:renderobject object=request/ p class=well -copy; 2008-2013 +copy; 2008-${year} a href=http://apache.org/;Apache Software Foundation/a /p /div
[4/4] tapestry-5 git commit: Remove long deprecated createPageLink() methods from ComponentResourcesCommon
Remove long deprecated createPageLink() methods from ComponentResourcesCommon Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ff08ad57 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ff08ad57 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ff08ad57 Branch: refs/heads/master Commit: ff08ad572b9faa04c0add703debc53965d6c77c8 Parents: 8caf479 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 09:23:21 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 09:23:21 2014 -0800 -- .../tapestry5/ComponentResourcesCommon.java | 37 .../tapestry5/internal/services/LinkSource.java | 29 +++ .../structure/ComponentPageElementImpl.java | 10 -- .../InternalComponentResourcesImpl.java | 10 -- .../services/PageRenderLinkSource.java | 28 --- .../tapestry5/integration/app1/pages/Index.java | 16 + .../integration/app1/pages/PageLinkContext.java | 8 ++--- .../integration/app1/pages/ReturnTypes.java | 23 ++-- 8 files changed, 54 insertions(+), 107 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ff08ad57/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java index e60597a..6d2b20c 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java @@ -206,41 +206,4 @@ public interface ComponentResourcesCommon extends Locatable * @return link object for the callback */ Link createFormEventLink(String eventType, Object... context); - -/** - * Creates a page render request link to render a specific page. - * - * @param pageName - *the logical name of the page to link to - * @param override - *if true, the context is used even if empty (normally, the target page is allowed to passivate, - *providing a context, when the provided context is empty) - * @param context - *the activation context for the page. If omitted, the activation context is obtained from the - *target page - * @return link for a render request to the targeted page - * @deprecated Use {@link org.apache.tapestry5.services.PageRenderLinkSource#createPageRenderLink(String)} or - * {@link org.apache.tapestry5.services.PageRenderLinkSource#createPageRenderLinkWithContext(String, Object[])} - * instead - */ -Link createPageLink(String pageName, boolean override, Object... context); - -/** - * Creates a page render request link to render a specific page. Using a page class, rather than a page name, is - * more refactoring safe (in the even the page is renamed or moved). - * - * @param pageClass - *identifies the page to link to - * @param override - *if true, the context is used even if empty (normally, the target page is allowed to passivate, - *providing a context, when the provided context is empty) - * @param context - *the activation context for the page. If omitted, the activation context is obtained from the - *target page - * @return link for a render request to the targeted page - * @deprecated Use {@link org.apache.tapestry5.services.PageRenderLinkSource#createPageRenderLink(Class)} or - * {@link org.apache.tapestry5.services.PageRenderLinkSource#createPageRenderLinkWithContext(Class, Object[])} - * instead - */ -Link createPageLink(Class pageClass, boolean override, Object... context); } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ff08ad57/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java index c967c06..3ec9ef6 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java @@ -20,7 +20,7 @@ import org.apache.tapestry5.services.LinkCreationListener2; /** * A source for {@link org.apache.tapestry5.Link} objects. - * +
[1/4] tapestry-5 git commit: Remove createActionLink() method, deprecated in 2008
Repository: tapestry-5 Updated Branches: refs/heads/master 2cc30a6bd - ff08ad572 Remove createActionLink() method, deprecated in 2008 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4a74819f Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4a74819f Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4a74819f Branch: refs/heads/master Commit: 4a74819f31434d6f37e065318fc5fa7efe34d034 Parents: 2cc30a6 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 08:19:18 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 08:19:18 2014 -0800 -- .../tapestry5/ComponentResourcesCommon.java | 23 .../tapestry5/internal/services/LinkSource.java | 4 +--- .../structure/ComponentPageElementImpl.java | 7 -- .../InternalComponentResourcesImpl.java | 6 - .../app1/pages/ActionViaLinkDemo.java | 7 +- 5 files changed, 2 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4a74819f/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java index c15e254..e60597a 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentResourcesCommon.java @@ -1,5 +1,3 @@ -// Copyright 2006-2013 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -196,27 +194,6 @@ public interface ComponentResourcesCommon extends Locatable * the page name and nested component id) will be encoded into a URL. A request for the URL will * {@linkplain #triggerEvent(String, Object[], org.apache.tapestry5.ComponentEventCallback)} trigger} the named * event on the - * component. - * - * @param eventType - *the type of event to be triggered. Event types should be Java identifiers (contain only - *letters, numbers and the underscore). - * @param forForm - *if true, the link will be used as the eventType for an HTML form submission, which may affect - *what information is encoded into the link - * @param context - *additional objects to be encoded into the path portion of the link; each is converted to a - *string and URI encoded - * @return link object for the callback - * @deprecated Use {@link #createEventLink(String, Object[])} instead - */ -Link createActionLink(String eventType, boolean forForm, Object... context); - -/** - * Creates a component event request link as a callback for this component. The event type and context (as well as - * the page name and nested component id) will be encoded into a URL. A request for the URL will - * {@linkplain #triggerEvent(String, Object[], org.apache.tapestry5.ComponentEventCallback)} trigger} the named - * event on the * component. This is only used for form submission events, as extra data may be encoded in the form as hidden * fields. * http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4a74819f/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java index d2868e5..c967c06 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/LinkSource.java @@ -1,5 +1,3 @@ -// Copyright 2009, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -44,7 +42,7 @@ public interface LinkSource * @param context *Additional path data, each value will be converted to a string and appended to the URI @return a *link - * @see org.apache.tapestry5.ComponentResources#createActionLink(String, boolean, Object[]) + * @see org.apache.tapestry5.ComponentResources#createEventLink(String, Object...) */ Link
tapestry-5 git commit: TAP5-2338: Work around some IE8 wierdness
Repository: tapestry-5 Updated Branches: refs/heads/master ff08ad572 - e71688962 TAP5-2338: Work around some IE8 wierdness The T5 floating console was always visible since there was an error trying to write to the native console, which simply does not exist in IE8 unless the developer tools are enabled. This fix drops attempts to write to the native console when it is missing. It is then possible to dismiss the floating console normally. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e7168896 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e7168896 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e7168896 Branch: refs/heads/master Commit: e7168896299efb68a0ad5bb000b968465bb10c8a Parents: ff08ad5 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 11:16:17 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 11:16:17 2014 -0800 -- .../META-INF/modules/t5/core/console.coffee | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e7168896/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee index d57697e..ab7ccc2 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee @@ -156,10 +156,14 @@ define [./dom, underscore, ./bootstrap], if _.isFunction consolefn # Use the available native console, calling it like an instance method consolefn.call console, message -else - # And IE just has to be different. The properties of console are callable, like functions, - # but aren't proper functions that work with `call()` either. - consolefn message + return + +# On IE8, the console object appears empty unless debugging tools are enabled. +return unless consolefn + +# And IE just has to be different. The properties of console are callable, like functions, +# but aren't proper functions that work with `call()` either. +consolefn message return
[1/2] tapestry-5 git commit: Remove t- prefix from CSS style t-ajax-insertion-point
Repository: tapestry-5 Updated Branches: refs/heads/master e71688962 - ffeaabc04 Remove t- prefix from CSS style t-ajax-insertion-point Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9769b0db Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9769b0db Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9769b0db Branch: refs/heads/master Commit: 9769b0db2f44afc41923f67f087dc50383743504 Parents: e716889 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 14:06:41 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 14:06:41 2014 -0800 -- .../src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee | 2 +- .../org/apache/tapestry5/services/javascript/StylesheetLink.java | 2 +- .../apache/tapestry5/services/javascript/StylesheetOptions.java| 2 +- .../tapestry5/internal/services/DocumentLinkerImplTest.groovy | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9769b0db/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee index 18e95ff..149d9ea 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee @@ -54,7 +54,7 @@ define [underscore, ./console, ./dom, ./events], insertionPoint = _.find(document.styleSheets, (ss) - parent = ss.ownerNode || ss.owningElement -parent.rel is stylesheet t-ajax-insertion-point) +parent.rel is stylesheet ajax-insertion-point) # Most browsers support document.head, but older IE doesn't: head = document.head or document.getElementsByTagName(head)[0] http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9769b0db/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetLink.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetLink.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetLink.java index d45ba1f..ae98fbb 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetLink.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetLink.java @@ -100,7 +100,7 @@ public final class StylesheetLink container.raw(String.format(\n!--[if %s]\n, options.condition)); } -String rel = options.ajaxInsertionPoint ? stylesheet t-ajax-insertion-point : stylesheet; +String rel = options.ajaxInsertionPoint ? stylesheet ajax-insertion-point : stylesheet; container.element(link, href, getURL(), http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9769b0db/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetOptions.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetOptions.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetOptions.java index f03140f..ae1edd0 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetOptions.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/StylesheetOptions.java @@ -42,7 +42,7 @@ public final class StylesheetOptions /** * If true, then this stylesheet is the insertion point for Ajax operations; any added CSS links will be inserted before this link. Only at most * one CSS link should be the insertion point. Only used for full page renders (not partial page renders). When this is true, the {@code link} element's - * ref attribute is wrtten out as stylesheet t-ajax-insertion-point. + * ref attribute is wrtten out as stylesheet ajax-insertion-point. */ public boolean ajaxInsertionPoint; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9769b0db/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.groovy index b1a335f..11c1b4e 100644 ---
[2/2] tapestry-5 git commit: Some further changes to address IE8 compatibility
Some further changes to address IE8 compatibility Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ffeaabc0 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ffeaabc0 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ffeaabc0 Branch: refs/heads/master Commit: ffeaabc0413a5c8e9fa4a17e7fe8058d2903d240 Parents: 9769b0d Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 14:12:52 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 14:12:52 2014 -0800 -- .../META-INF/modules/t5/core/console.coffee | 37 ++-- 1 file changed, 19 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ffeaabc0/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee index ab7ccc2..b0785ca 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee @@ -1,5 +1,3 @@ -# Copyright 2012-2013 The Apache Software Foundation -# # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -18,7 +16,14 @@ define [./dom, underscore, ./bootstrap], (dom, _, { glyph }) - -nativeConsole = {} +nativeConsole = null + +try + # FireFox will throw an exception if you even access the console object and it does + # not exist. Wow! + nativeConsole = window.console or {} +catch e + floatingConsole = null messages = null @@ -53,13 +58,6 @@ define [./dom, underscore, ./bootstrap], /button - -try - # FireFox will throw an exception if you even access the console object and it does - # not exist. Wow! - nativeConsole = console -catch e - # _internal_: displays the message inside the floating console, creating the floating # console as needed. display = (className, message) - @@ -153,17 +151,17 @@ define [./dom, underscore, ./bootstrap], return unless forceFloating -if _.isFunction consolefn +if window.console and (_.isFunction consolefn) # Use the available native console, calling it like an instance method - consolefn.call console, message + consolefn.call window.console, message return -# On IE8, the console object appears empty unless debugging tools are enabled. -return unless consolefn - # And IE just has to be different. The properties of console are callable, like functions, # but aren't proper functions that work with `call()` either. -consolefn message +# On IE8, the console object is undefined unless debugging tools are enabled. +# In that case, nativeConsole will be an empty object. +if consolefn + consolefn message return @@ -176,13 +174,16 @@ define [./dom, underscore, ./bootstrap], # in production mode). debugEnabled: (document.documentElement.getAttribute data-debug-enabled)? +noop = - + # When debugging is not enabled, then the debug function becomes a no-op. exports.debug = if exports.debugEnabled # If native console available, go for it. IE doesn't have debug, so we use log instead. -level debug, (nativeConsole.debug or nativeConsole.log) +# Add a special noop case for IE8, since IE8 is just crazy. +level debug, (nativeConsole.debug or nativeConsole.log or noop) else -- +noop # This is also an aid to debugging; it allows arbitrary scripts to present on the console; when using Geb # and/or Selenium, it is very useful to present debugging data right on the page.
[3/4] tapestry-5 git commit: Update to typeahead 0.10.5
Update to typeahead 0.10.5 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4ede8bec Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4ede8bec Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4ede8bec Branch: refs/heads/master Commit: 4ede8becd35a57d452b722ee3223f54ab2dda72c Parents: aa836f3 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 16:12:46 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 16:13:28 2014 -0800 -- 54_RELEASE_NOTES.md |2 +- .../modules/t5/core/autocomplete.coffee | 25 +- .../org/apache/tapestry5/EventConstants.java|7 +- .../tapestry5/corelib/mixins/Autocomplete.java |5 +- .../tapestry5/modules/JavaScriptModule.java |2 +- .../META-INF/assets/core/Autocomplete.css |4 +- .../assets/tapestry5/typeahead-0.9.3.js | 1139 --- .../META-INF/assets/tapestry5/typeahead.js | 1782 ++ .../src/test/app1/AutocompleteDemo.tml |2 +- 9 files changed, 1809 insertions(+), 1159 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4ede8bec/54_RELEASE_NOTES.md -- diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md index 9efdcef..b3186bd 100644 --- a/54_RELEASE_NOTES.md +++ b/54_RELEASE_NOTES.md @@ -378,7 +378,7 @@ need to provide a prepare event handler to initialize the property before it i ## Autocomplete Mixin -The Autocomplete mixin has been rewritten to use Twitter typeahead.js; this implies it will also force jQuery onto the page, +The Autocomplete mixin has been rewritten to use Twitter typeahead.js (0.10.5); this implies it will also force jQuery onto the page, to support the typeahead.js library. In addition, typeahead.js does not support multiple tokens, so this behavior (available in prior releases) has been removed. http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4ede8bec/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee index 1a33e94..332e945 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee @@ -1,5 +1,3 @@ -# Copyright 2012, 2013 The Apache Software Foundation -# # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,19 +12,32 @@ # ## t5/core/autocomplete # -# Support for the core/Autocomplete Tapestry mixin. -define [./dom, ./ajax, jquery, ./utils, ./typeahead], - (dom, ajax, $, {extendURL}) - +# Support for the core/Autocomplete Tapestry mixin, a wrapper around +# the Twitter autocomplete.js library. +define [./dom, ./ajax, underscore, jquery, ./utils, ./typeahead], + (dom, ajax, _, $, {extendURL}) - init = (spec) - $field = $ document.getElementById spec.id - $field.typeahead -minLength: spec.minChars + engine = new Bloodhound +datumTokenizer: Bloodhound.tokenizers.whitespace +queryTokenizer: Bloodhound.tokenizers.whitespace limit: spec.limit remote: url: spec.url replace: (uri, query) - extendURL uri, t:input: query filter: (response) - response.matches + engine.initialize() + + dataset = +name: spec.id +displayKey: _.identity +source: engine.ttAdapter() + + $field.typeahead +minLength: spec.minChars +dataset + exports = init http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4ede8bec/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java b/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java index e4df372..223f4c8 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java @@ -1,5 +1,3 @@ -// Copyright 2008, 2009, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,7 +12,6 @@ package
[1/4] tapestry-5 git commit: Clear the page loading mask, even if there are initialization errors
Repository: tapestry-5 Updated Branches: refs/heads/master ffeaabc04 - 7dbbe84c0 Clear the page loading mask, even if there are initialization errors Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/aa836f31 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/aa836f31 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/aa836f31 Branch: refs/heads/master Commit: aa836f31f1a8501533e8d598d2013ca25b9822cf Parents: ffeaabc Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 15:37:37 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 15:37:37 2014 -0800 -- .../META-INF/modules/t5/core/pageinit.coffee| 42 ++-- 1 file changed, 21 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/aa836f31/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee index 149d9ea..a72e208 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee @@ -85,27 +85,27 @@ define [underscore, ./console, ./dom, ./events], require [moduleName], (moduleLib) - -# Some modules export nothing but do some full-page initialization, such as adding -# event handlers to the body. -if not functionName and - initArguments.length is 0 and - not _.isFunction moduleLib -console.debug Loaded module #{moduleName} -tracker() -return - -fn = if functionName? then moduleLib[functionName] else moduleLib - -unless fn? - throw new Error Could not locate function `#{qualifiedName}'. - -if console.debugEnabled - argsString = (JSON.stringify arg for arg in initArguments).join(, ) - console.debug Invoking #{qualifiedName}(#{argsString}) - -fn.apply null, initArguments - -tracker() +try + # Some modules export nothing but do some full-page initialization, such as adding + # event handlers to the body. + if not functionName and +initArguments.length is 0 and +not _.isFunction moduleLib + console.debug Loaded module #{moduleName} + return + + fn = if functionName? then moduleLib[functionName] else moduleLib + + unless fn? +throw new Error Could not locate function `#{qualifiedName}'. + + if console.debugEnabled +argsString = (JSON.stringify arg for arg in initArguments).join(, ) +console.debug Invoking #{qualifiedName}(#{argsString}) + + fn.apply null, initArguments +finally + tracker() # Loads all specified libraries in order (this includes the core stack, other stacks, and # any free-standing libraries). It then executes the initializations. Once all initializations have
[4/4] tapestry-5 git commit: Apply improved CSS that corrects the layout of autocomplete text fields
Apply improved CSS that corrects the layout of autocomplete text fields Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7dbbe84c Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7dbbe84c Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7dbbe84c Branch: refs/heads/master Commit: 7dbbe84c05a6f6f4dc47e2dece80c401672dc51e Parents: 4ede8be Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 16:49:43 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 16:49:43 2014 -0800 -- .../LICENSE-typeahead.js-bootstrap3.less.txt| 21 +++ tapestry-core/NOTICE.txt| 3 + .../tapestry5/corelib/mixins/Autocomplete.java | 2 +- .../META-INF/assets/core/Autocomplete.css | 56 -- .../assets/core/typeahead-bootstrap3.css| 189 +++ 5 files changed, 214 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7dbbe84c/tapestry-core/LICENSE-typeahead.js-bootstrap3.less.txt -- diff --git a/tapestry-core/LICENSE-typeahead.js-bootstrap3.less.txt b/tapestry-core/LICENSE-typeahead.js-bootstrap3.less.txt new file mode 100644 index 000..8496047 --- /dev/null +++ b/tapestry-core/LICENSE-typeahead.js-bootstrap3.less.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 hyspace (Shawn Zhou) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7dbbe84c/tapestry-core/NOTICE.txt -- diff --git a/tapestry-core/NOTICE.txt b/tapestry-core/NOTICE.txt index 9fd093a..1be4a14 100644 --- a/tapestry-core/NOTICE.txt +++ b/tapestry-core/NOTICE.txt @@ -35,4 +35,7 @@ https://github.com/twitter/typeahead.js This product includes Moment.js, distributed under the MIT License. https://github.com/moment/moment +This product includes typeahead.js-bootstrap3.less, distributed under the MIT License. +https://github.com/hyspace/typeahead.js-bootstrap3.less + http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7dbbe84c/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java index c2688ea..03a96da 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java @@ -119,7 +119,7 @@ public class Autocomplete writer.attributes(autocomplete, off); } -@Import(stylesheet=Autocomplete.css) +@Import(stylesheet=typeahead-bootstrap3.css) void afterRender() { Link link = resources.createEventLink(EVENT_NAME, context); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7dbbe84c/tapestry-core/src/main/resources/META-INF/assets/core/Autocomplete.css -- diff --git a/tapestry-core/src/main/resources/META-INF/assets/core/Autocomplete.css b/tapestry-core/src/main/resources/META-INF/assets/core/Autocomplete.css deleted file mode 100644 index 72ef7f6..000 --- a/tapestry-core/src/main/resources/META-INF/assets/core/Autocomplete.css +++ /dev/null @@ -1,56 +0,0 @@ -/** From https://gist.github.com/bhays/6140058, and modified */ - -.twitter-typeahead .tt-query, -.twitter-typeahead .tt-hint { -margin-bottom: 0; -} - -.tt-hint { -display: block; -width: 100%; -height:
[2/4] tapestry-5 git commit: Update to typeahead 0.10.5
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4ede8bec/tapestry-core/src/main/resources/META-INF/assets/tapestry5/typeahead.js -- diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/typeahead.js b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/typeahead.js new file mode 100644 index 000..8164a3c --- /dev/null +++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/typeahead.js @@ -0,0 +1,1782 @@ +/*! + * typeahead.js 0.10.5 + * https://github.com/twitter/typeahead.js + * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT + */ + +(function($) { +var _ = function() { +use strict; +return { +isMsie: function() { +return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; +}, +isBlankString: function(str) { +return !str || /^\s*$/.test(str); +}, +escapeRegExChars: function(str) { +return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, \\$); +}, +isString: function(obj) { +return typeof obj === string; +}, +isNumber: function(obj) { +return typeof obj === number; +}, +isArray: $.isArray, +isFunction: $.isFunction, +isObject: $.isPlainObject, +isUndefined: function(obj) { +return typeof obj === undefined; +}, +toStr: function toStr(s) { +return _.isUndefined(s) || s === null ? : s + ; +}, +bind: $.proxy, +each: function(collection, cb) { +$.each(collection, reverseArgs); +function reverseArgs(index, value) { +return cb(value, index); +} +}, +map: $.map, +filter: $.grep, +every: function(obj, test) { +var result = true; +if (!obj) { +return result; +} +$.each(obj, function(key, val) { +if (!(result = test.call(null, val, key, obj))) { +return false; +} +}); +return !!result; +}, +some: function(obj, test) { +var result = false; +if (!obj) { +return result; +} +$.each(obj, function(key, val) { +if (result = test.call(null, val, key, obj)) { +return false; +} +}); +return !!result; +}, +mixin: $.extend, +getUniqueId: function() { +var counter = 0; +return function() { +return counter++; +}; +}(), +templatify: function templatify(obj) { +return $.isFunction(obj) ? obj : template; +function template() { +return String(obj); +} +}, +defer: function(fn) { +setTimeout(fn, 0); +}, +debounce: function(func, wait, immediate) { +var timeout, result; +return function() { +var context = this, args = arguments, later, callNow; +later = function() { +timeout = null; +if (!immediate) { +result = func.apply(context, args); +} +}; +callNow = immediate !timeout; +clearTimeout(timeout); +timeout = setTimeout(later, wait); +if (callNow) { +result = func.apply(context, args); +} +return result; +}; +}, +throttle: function(func, wait) { +var context, args, timeout, result, previous, later; +previous = 0; +later = function() { +previous = new Date(); +timeout = null; +result = func.apply(context, args); +}; +return function() { +var now = new Date(), remaining = wait - (now - previous); +context = this; +args = arguments; +if (remaining = 0) { +clearTimeout(timeout); +timeout = null; +previous = now; +result = func.apply(context, args); +
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4.beta-24 [created] 7dbbe84c0
tapestry-5 git commit: Advance version number to 5.4-beta-25
Repository: tapestry-5 Updated Branches: refs/heads/master 7dbbe84c0 - f88ed9a30 Advance version number to 5.4-beta-25 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f88ed9a3 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f88ed9a3 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f88ed9a3 Branch: refs/heads/master Commit: f88ed9a30bd60463b95f373a600b2a9bb1e633d8 Parents: 7dbbe84 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Dec 29 17:06:43 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Dec 29 17:06:43 2014 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f88ed9a3/build.gradle -- diff --git a/build.gradle b/build.gradle index 625986e..20f00f4 100755 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-24 +def minor = -beta-25 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-24 [created] 7dbbe84c0
[2/2] tapestry-5 git commit: TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java
TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2cc30a6b Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2cc30a6b Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2cc30a6b Branch: refs/heads/master Commit: 2cc30a6bd2efb2382b57cedd32e9eadcc000e274 Parents: d165b9c Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Dec 24 11:18:36 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Dec 24 11:18:36 2014 -0800 -- .../integration/app1/pages/LogoSubclass.groovy | 7 + .../integration/app1/pages/LogoSubclass.java| 7 - .../tapestry5/pagetester/PageTesterTest.java| 31 .../tapestry5/pagetester/PageTesterTest.java| 31 4 files changed, 38 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2cc30a6b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.groovy new file mode 100644 index 000..1ac22a7 --- /dev/null +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.groovy @@ -0,0 +1,7 @@ +package org.apache.tapestry5.integration.app1.pages; + +import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; + +class LogoSubclass extends Logo +{ +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2cc30a6b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java deleted file mode 100644 index 96e3345..000 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.apache.tapestry5.integration.app1.pages; - -import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; - -public class LogoSubclass extends Logo -{ -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2cc30a6b/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java deleted file mode 100644 index 68bcda7..000 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2012 The Apache Software Foundation -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package org.apache.tapestry5.pagetester; - -import org.apache.tapestry5.test.PageTester; -import org.testng.Assert; -import org.testng.annotations.Test; - -public class PageTesterTest extends Assert -{ - -@Test -public void setupRequestFromURI_accepts_query_strings() -{ -PageTester pageTester = new PageTester(org.example.app1, app1); - -pageTester.setupRequestFromURI(/foo/somePage?param=value); -} - -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2cc30a6b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java new file mode 100644 index 000..68bcda7 --- /dev/null +++ b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java @@ -0,0 +1,31 @@ +// Copyright 2012 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in
[1/2] tapestry-5 git commit: Revert TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java
Repository: tapestry-5 Updated Branches: refs/heads/master e5afaa0e1 - 2cc30a6bd Revert TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java This reverts commit b62ddffd51179469505eedde97977c2731153623. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d165b9c0 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d165b9c0 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d165b9c0 Branch: refs/heads/master Commit: d165b9c06250fac29d643636bcac4d1a931e5619 Parents: e5afaa0 Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Dec 24 10:40:07 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Dec 24 10:40:07 2014 -0800 -- .../integration/app1/pages/LogoSubclass.java| 7 + .../tapestry5/pagetester/PageTesterTest.java| 31 .../integration/app1/pages/LogoSubclass.java| 7 - .../tapestry5/pagetester/PageTesterTest.java| 29 -- 4 files changed, 38 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d165b9c0/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java new file mode 100644 index 000..96e3345 --- /dev/null +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java @@ -0,0 +1,7 @@ +package org.apache.tapestry5.integration.app1.pages; + +import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; + +public class LogoSubclass extends Logo +{ +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d165b9c0/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java new file mode 100644 index 000..68bcda7 --- /dev/null +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java @@ -0,0 +1,31 @@ +// Copyright 2012 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package org.apache.tapestry5.pagetester; + +import org.apache.tapestry5.test.PageTester; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class PageTesterTest extends Assert +{ + +@Test +public void setupRequestFromURI_accepts_query_strings() +{ +PageTester pageTester = new PageTester(org.example.app1, app1); + +pageTester.setupRequestFromURI(/foo/somePage?param=value); +} + +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d165b9c0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java deleted file mode 100644 index 96e3345..000 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.apache.tapestry5.integration.app1.pages; - -import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; - -public class LogoSubclass extends Logo -{ -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d165b9c0/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java deleted file mode 100644 index c580c91..000 --- a/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed under the
[3/4] tapestry-5 git commit: Force up larger heap for compiling Groovy tests
Force up larger heap for compiling Groovy tests Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/15a33171 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/15a33171 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/15a33171 Branch: refs/heads/master Commit: 15a331713734720f984d53c8275f3210f86d71fa Parents: 7e8fc83 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 15:33:43 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 15:33:43 2014 -0800 -- tapestry-ioc/build.gradle | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/15a33171/tapestry-ioc/build.gradle -- diff --git a/tapestry-ioc/build.gradle b/tapestry-ioc/build.gradle index 5a5321f..dc4fbe8 100644 --- a/tapestry-ioc/build.gradle +++ b/tapestry-ioc/build.gradle @@ -26,3 +26,10 @@ test { // Override the master build.gradle systemProperties.remove(tapestry.service-reloading-enabled) } + +compileTestGroovy { +configure(groovyOptions.forkOptions) { +memoryMaximumSize = '1g' +jvmArgs = ['-XX:MaxPermSize=512m', '-Xms512m', '-Xmx1g'] +} +} \ No newline at end of file
[2/4] tapestry-5 git commit: Update for code split out of tapestry-ioc
Update for code split out of tapestry-ioc Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7e8fc835 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7e8fc835 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7e8fc835 Branch: refs/heads/master Commit: 7e8fc8352d204456266eb670e53dfc29245462ab Parents: 0449609 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 15:16:35 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 15:16:35 2014 -0800 -- .../ioc/specs/ClasspathScannerImplSpec.groovy | 38 1 file changed, 15 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7e8fc835/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy -- diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy index 72e6eaf..4ddd6df 100644 --- a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy +++ b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy @@ -1,44 +1,36 @@ package ioc.specs -import java.io.File; -import java.net.URL; - -import org.apache.tapestry5.ioc.Locatable; -import org.apache.tapestry5.ioc.internal.services.ClasspathScannerImpl; +import org.apache.tapestry5.ioc.Locatable +import org.apache.tapestry5.ioc.internal.BasicTypeCoercions +import org.apache.tapestry5.ioc.internal.services.ClasspathScannerImpl import org.apache.tapestry5.ioc.internal.services.ClasspathURLConverterImpl -import org.apache.tapestry5.ioc.internal.util.InternalUtils; -import org.apache.tapestry5.ioc.services.ClasspathMatcher; -import org.apache.tapestry5.ioc.services.ClasspathURLConverter; - -import spock.lang.Specification; +import org.apache.tapestry5.ioc.services.ClasspathMatcher +import spock.lang.Specification class ClasspathScannerImplSpec extends Specification { - + // TAP5-2096 def can locate classes inside a subpackage, inside an extracted JAR file() { setup: -ClasspathMatcher matchAll = new ClasspathMatcher(){ - boolean matches(String arg0, String arg1) { -true - }; -} +ClasspathMatcher matchAll = { packagePage, fileName - true } as ClasspathMatcher + def scannerJob = new ClasspathScannerImpl.Job(matchAll, Thread.currentThread().getContextClassLoader(), new ClasspathURLConverterImpl()) - + when: URL url = Locatable.class.getResource('Locatable.class'); scannerJob.scanDir(org/apache/tapestry5/ioc/, new File(url.getPath()).parentFile) -while (!scannerJob.queue.isEmpty()) -{ +while (!scannerJob.queue.isEmpty()) { def queued = scannerJob.queue.pop(); queued.run(); } + def classes = scannerJob.matches - + then: -classes.contains(InternalUtils.class.getName().replaceAll(/\./, /)+'.class') +classes.contains(BasicTypeCoercions.name.replaceAll(/\./, /) + '.class') } - - + + }
[4/4] tapestry-5 git commit: Choose a different set of classes for the test
Choose a different set of classes for the test Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/fe8ef854 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/fe8ef854 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/fe8ef854 Branch: refs/heads/master Commit: fe8ef85454b93d5863e6c6ccd16d1c677e62ea4e Parents: 15a3317 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 15:45:22 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 15:45:22 2014 -0800 -- .../groovy/ioc/specs/ClasspathScannerImplSpec.groovy | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fe8ef854/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy -- diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy index 4ddd6df..a0aa7f7 100644 --- a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy +++ b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathScannerImplSpec.groovy @@ -1,10 +1,10 @@ package ioc.specs -import org.apache.tapestry5.ioc.Locatable -import org.apache.tapestry5.ioc.internal.BasicTypeCoercions +import org.apache.tapestry5.ioc.Registry import org.apache.tapestry5.ioc.internal.services.ClasspathScannerImpl import org.apache.tapestry5.ioc.internal.services.ClasspathURLConverterImpl import org.apache.tapestry5.ioc.services.ClasspathMatcher +import org.apache.tapestry5.ioc.util.IdAllocator import spock.lang.Specification class ClasspathScannerImplSpec extends Specification { @@ -18,7 +18,7 @@ class ClasspathScannerImplSpec extends Specification { def scannerJob = new ClasspathScannerImpl.Job(matchAll, Thread.currentThread().getContextClassLoader(), new ClasspathURLConverterImpl()) when: -URL url = Locatable.class.getResource('Locatable.class'); +URL url = Registry.class.getResource('Registry.class'); scannerJob.scanDir(org/apache/tapestry5/ioc/, new File(url.getPath()).parentFile) while (!scannerJob.queue.isEmpty()) { def queued = scannerJob.queue.pop(); @@ -29,7 +29,10 @@ class ClasspathScannerImplSpec extends Specification { def classes = scannerJob.matches then: -classes.contains(BasicTypeCoercions.name.replaceAll(/\./, /) + '.class') + +// classes will contain many names, this choice is arbitrary. The point is, it is located on the file system +// (not in a JAR) and it is in a package somewhere beneath the scanDir. +classes.contains(IdAllocator.name.replaceAll(/\./, /) + '.class') }
[1/4] tapestry-5 git commit: Increase the amount of heap space
Repository: tapestry-5 Updated Branches: refs/heads/master 32e7ecc02 - fe8ef8545 Increase the amount of heap space Was getting Java heap space errors from Gradle Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/04496097 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/04496097 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/04496097 Branch: refs/heads/master Commit: 044960977dfc1dd9158877434619979ccba7a286 Parents: 32e7ecc Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 15:15:56 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 15:15:56 2014 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/04496097/build.gradle -- diff --git a/build.gradle b/build.gradle index 1d17c04..68146a7 100755 --- a/build.gradle +++ b/build.gradle @@ -182,7 +182,7 @@ subprojects { options.suites(src/test/conf/testng.xml) -maxHeapSize 400M +maxHeapSize 800M // Turn off live service reloading
tapestry-5 git commit: Update Gradle Wrapper to current version 2.2.1
Repository: tapestry-5 Updated Branches: refs/heads/master fe8ef8545 - ea30dba85 Update Gradle Wrapper to current version 2.2.1 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ea30dba8 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ea30dba8 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ea30dba8 Branch: refs/heads/master Commit: ea30dba8535e93f6c78d9260c7524788dc6a81d7 Parents: fe8ef85 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 15:48:51 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 15:48:51 2014 -0800 -- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.jar| Bin 51017 - 51018 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ea30dba8/build.gradle -- diff --git a/build.gradle b/build.gradle index 68146a7..9830e52 100755 --- a/build.gradle +++ b/build.gradle @@ -391,7 +391,7 @@ task continuousIntegration { } task wrapper(type: Wrapper) { -gradleVersion = '2.1' +gradleVersion = '2.2.1' description Regenerates the Gradle Wrapper files } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ea30dba8/gradle/wrapper/gradle-wrapper.jar -- diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3d0dee6..c97a8bd 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ea30dba8/gradle/wrapper/gradle-wrapper.properties -- diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d9e3c84..ca407f1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Sep 11 10:06:08 CEST 2014 +#Tue Dec 23 15:47:49 PST 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
tapestry-5 git commit: TAP5-2430: Throw an exception in the case that the content type is null.
Repository: tapestry-5 Updated Branches: refs/heads/master ea30dba85 - 93fbe262a TAP5-2430: Throw an exception in the case that the content type is null. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/93fbe262 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/93fbe262 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/93fbe262 Branch: refs/heads/master Commit: 93fbe262a7611599ac8e6b525dc019cbbfb662a1 Parents: ea30dba Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 16:04:49 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 16:04:49 2014 -0800 -- .../assets/CompressionAnalyzerImpl.java | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/93fbe262/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImpl.java index bca9404..32acc5c 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImpl.java @@ -1,15 +1,3 @@ -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package org.apache.tapestry5.internal.services.assets; import java.util.Map; @@ -27,7 +15,9 @@ public class CompressionAnalyzerImpl implements CompressionAnalyzer public boolean isCompressable(String contentType) { -assert contentType != null; +if (contentType == null) { +throw new IllegalStateException(Content type provided to CompressionAnalyzer is null, which is not allowed.); +} int x = contentType.indexOf(';'); @@ -36,7 +26,7 @@ public class CompressionAnalyzerImpl implements CompressionAnalyzer Boolean result = configuration.get(key); if (result != null) { -return result.booleanValue(); +return result; } // Now look for a wild card. @@ -47,6 +37,6 @@ public class CompressionAnalyzerImpl implements CompressionAnalyzer result = configuration.get(wildKey); -return result == null ? true : result.booleanValue(); +return result == null ? true : result; } }
[2/2] tapestry-5 git commit: TAP5-2431: Ajax EventLinks should not cancel the click event
TAP5-2431: Ajax EventLinks should not cancel the click event Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/5ee601f4 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/5ee601f4 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/5ee601f4 Branch: refs/heads/master Commit: 5ee601f4956402ffc40468a96a2e9b76a72c7ecd Parents: 2669319 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 16:34:52 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 16:34:52 2014 -0800 -- .../coffeescript/META-INF/modules/t5/core/zone.coffee | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/5ee601f4/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee index 5735ae8..ae1f9be 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee @@ -47,7 +47,7 @@ define [./dom, ./events, ./ajax, ./console, ./forms, underscore], return zone -dom.onDocument click, a[data-update-zone], - +dom.onDocument click, a[data-update-zone], (event) - element = @closest [data-update-zone] @@ -59,7 +59,8 @@ define [./dom, ./events, ./ajax, ./console, ./forms, underscore], if zone zone.trigger events.zone.refresh, url: element.attr href - return false + event.nativeEvent.preventDefault() + return dom.onDocument submit, form[data-update-zone], - @@ -121,7 +122,7 @@ define [./dom, ./events, ./ajax, ./console, ./forms, underscore], success: (response) - zone.trigger events.zone.update, content: response.json?.content -dom.onDocument click, a[data-async-trigger], - +dom.onDocument click, a[data-async-trigger], (event)- link = @closest 'a[data-async-trigger]' link.addClass ajax-update @@ -129,7 +130,9 @@ define [./dom, ./events, ./ajax, ./console, ./forms, underscore], ajax (link.attr href), complete: - link.removeClass ajax-update - return false # cancel click event + event.nativeEvent.preventDefault() + + return # Locates a zone element by its unique id attribute, and (deferred, to a later event loop cycle), # performs a standard refresh of the zone. This is primarily used by the core/ProgressiveDisplay component. @@ -148,4 +151,4 @@ define [./dom, ./events, ./ajax, ./console, ./forms, underscore], zone.trigger events.zone.refresh, { url } # Most of this module is document-level event handlers, but there's also some exports: -return { deferredZoneUpdate, findZone } \ No newline at end of file +return { deferredZoneUpdate, findZone }
[1/2] tapestry-5 git commit: Increase the Groovy compile heap size for all sub-projects
Repository: tapestry-5 Updated Branches: refs/heads/master 93fbe262a - 5ee601f49 Increase the Groovy compile heap size for all sub-projects Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2669319a Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2669319a Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2669319a Branch: refs/heads/master Commit: 2669319a4dc58cb4e7e69629b399466e48e37e16 Parents: 93fbe26 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 16:34:27 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 16:34:27 2014 -0800 -- build.gradle | 7 +++ tapestry-ioc/build.gradle | 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2669319a/build.gradle -- diff --git a/build.gradle b/build.gradle index 9830e52..625986e 100755 --- a/build.gradle +++ b/build.gradle @@ -177,6 +177,13 @@ subprojects { testRuntime org.slf4j:slf4j-log4j12:${versions.slf4j} } +compileTestGroovy { +configure(groovyOptions.forkOptions) { +memoryMaximumSize = '1g' +jvmArgs = ['-XX:MaxPermSize=512m', '-Xms512m', '-Xmx1g'] +} +} + test { useTestNG() http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2669319a/tapestry-ioc/build.gradle -- diff --git a/tapestry-ioc/build.gradle b/tapestry-ioc/build.gradle index dc4fbe8..cc5a43f 100644 --- a/tapestry-ioc/build.gradle +++ b/tapestry-ioc/build.gradle @@ -25,11 +25,4 @@ test { useJUnit() // Override the master build.gradle systemProperties.remove(tapestry.service-reloading-enabled) -} - -compileTestGroovy { -configure(groovyOptions.forkOptions) { -memoryMaximumSize = '1g' -jvmArgs = ['-XX:MaxPermSize=512m', '-Xms512m', '-Xmx1g'] -} } \ No newline at end of file
tapestry-5 git commit: TAP5-2417: client-side email validator is case sensitive
Repository: tapestry-5 Updated Branches: refs/heads/master 5ee601f49 - 8c259498f TAP5-2417: client-side email validator is case sensitive Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8c259498 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8c259498 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8c259498 Branch: refs/heads/master Commit: 8c259498f3e0665ac7949ceaa91ac760c00c733c Parents: 5ee601f Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 17:08:18 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 17:08:18 2014 -0800 -- .../META-INF/modules/t5/core/validation.coffee | 25 .../org/apache/tapestry5/validator/Email.java | 11 + 2 files changed, 26 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8c259498/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee index 5cda63c..b44f043 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee @@ -82,6 +82,18 @@ define [underscore, ./dom, ./events, ./utils, ./messages, ./fields], return Number canonical +matches = (input, re) - + groups = input.match re + + # Unlike Java, there isn't an easy way to match the entire string. This + # gets the job done. + + return false if groups is null + + groups[0] is input + +emailRE = new RegExp([A-Za-z0-9!#$%'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?) + translate = (field, memo, isInteger) - try result = parseNumber memo.value, isInteger @@ -133,19 +145,22 @@ define [underscore, ./dom, ./events, ./utils, ./messages, ./fields], memo.error = (@attr data-min-message) or TOO SMALL return false +dom.onDocument events.field.validate, [data-validate-email], (event, memo) - + + unless (matches memo.translated, emailRE) +memo.error = (@attr data-email-message) or INVALID EMAIL +return false + dom.onDocument events.field.validate, [data-validate-regexp], (event, memo) - # Cache the compiled regular expression. re = @meta REGEXP_META + unless re re = new RegExp(@attr data-validate-regexp) @meta REGEXP_META, re - groups = memo.translated.match re - - # Unlike Java, there isn't an easy way to match the entire string. This - # gets the job done. - if (groups is null) or (groups[0] isnt memo.translated) + unless (matches memo.translated, re) memo.error = (@attr data-regexp-message) or INVALID return false http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8c259498/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java index eae9b08..f7b3de0 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java @@ -1,5 +1,3 @@ -// Copyright 2008, 2012, 2014 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -32,7 +30,10 @@ import java.util.regex.Pattern; */ public class Email extends AbstractValidatorVoid, String { - + +// The client-side uses a similar RE, but converts the input to lower case before applying the pattern. +// See validation.coffee. + private static final Pattern PATTERN = Pattern .compile([a-z0-9!#$%'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?, Pattern.CASE_INSENSITIVE); @@ -53,8 +54,8 @@ public class Email extends AbstractValidatorVoid, String writer.attributes( DataConstants.VALIDATION_ATTRIBUTE, true, -data-validate-regexp, PATTERN.pattern(), -data-regexp-message, formatter.toString()); +data-validate-email, true, +data-email-message,
tapestry-5 git commit: TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java
Repository: tapestry-5 Updated Branches: refs/heads/master 8c259498f - b62ddffd5 TAP5-2428: Move Java sources from tapestry-core src/test/groovy to src/test/java Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b62ddffd Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b62ddffd Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b62ddffd Branch: refs/heads/master Commit: b62ddffd51179469505eedde97977c2731153623 Parents: 8c25949 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 17:12:08 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 17:12:08 2014 -0800 -- .../integration/app1/pages/LogoSubclass.java| 7 - .../tapestry5/pagetester/PageTesterTest.java| 31 .../integration/app1/pages/LogoSubclass.java| 7 + .../tapestry5/pagetester/PageTesterTest.java| 29 ++ 4 files changed, 36 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b62ddffd/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java deleted file mode 100644 index 96e3345..000 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.apache.tapestry5.integration.app1.pages; - -import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; - -public class LogoSubclass extends Logo -{ -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b62ddffd/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java deleted file mode 100644 index 68bcda7..000 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/pagetester/PageTesterTest.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2012 The Apache Software Foundation -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package org.apache.tapestry5.pagetester; - -import org.apache.tapestry5.test.PageTester; -import org.testng.Assert; -import org.testng.annotations.Test; - -public class PageTesterTest extends Assert -{ - -@Test -public void setupRequestFromURI_accepts_query_strings() -{ -PageTester pageTester = new PageTester(org.example.app1, app1); - -pageTester.setupRequestFromURI(/foo/somePage?param=value); -} - -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b62ddffd/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java new file mode 100644 index 000..96e3345 --- /dev/null +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LogoSubclass.java @@ -0,0 +1,7 @@ +package org.apache.tapestry5.integration.app1.pages; + +import org.apache.tapestry5.integration.locallib.alpha.pages.Logo; + +public class LogoSubclass extends Logo +{ +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b62ddffd/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java new file mode 100644 index 000..c580c91 --- /dev/null +++ b/tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java @@ -0,0 +1,29 @@ +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this
tapestry-5 git commit: TAP5-2426: Enable gzip compression for svg files by default
Repository: tapestry-5 Updated Branches: refs/heads/master b62ddffd5 - 989b7b224 TAP5-2426: Enable gzip compression for svg files by default Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/989b7b22 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/989b7b22 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/989b7b22 Branch: refs/heads/master Commit: 989b7b22484ad1aab62b2d409289ac00d5aa3799 Parents: b62ddff Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 17:15:34 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 17:15:34 2014 -0800 -- .../main/java/org/apache/tapestry5/modules/AssetsModule.java | 2 ++ .../services/assets/CompressionAnalyzerImplTests.groovy | 7 +++ 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/989b7b22/tapestry-core/src/main/java/org/apache/tapestry5/modules/AssetsModule.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/modules/AssetsModule.java b/tapestry-core/src/main/java/org/apache/tapestry5/modules/AssetsModule.java index 4eab1ec..513f118 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/modules/AssetsModule.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/modules/AssetsModule.java @@ -217,6 +217,7 @@ public class AssetsModule * liimage/jpeg/li * liimage/gif/li * liimage/png/li + * liimage/svg+xml/li * liapplication/x-shockwave-flash/li * liapplication/font-woff/li * liapplication/x-font-ttf/li @@ -227,6 +228,7 @@ public class AssetsModule public void disableCompressionForImageTypes(MappedConfigurationString, Boolean configuration) { configuration.add(image/*, false); +configuration.add(image/svg+xml, true); configuration.add(application/x-shockwave-flash, false); configuration.add(application/font-woff, false); configuration.add(application/x-font-ttf, false); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/989b7b22/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy index 1de899a..bc6cfec 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/assets/CompressionAnalyzerImplTests.groovy @@ -38,4 +38,11 @@ class CompressionAnalyzerImplTests extends Assert { assertEquals false, ca.isCompressable(image/png) } + +@Test +void most_specific_match_wins() { +def ca = new CompressionAnalyzerImpl([image/*: false, image/svg : true]) + +assertEquals true, ca.isCompressable(image/svg) +} }
tapestry-5 git commit: TAP5-2190: Alerts component should not automatically import the core stack
Repository: tapestry-5 Updated Branches: refs/heads/master 989b7b224 - e5afaa0e1 TAP5-2190: Alerts component should not automatically import the core stack Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e5afaa0e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e5afaa0e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e5afaa0e Branch: refs/heads/master Commit: e5afaa0e1025a03d412d72c9bd326a782a771fe6 Parents: 989b7b2 Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Dec 23 17:44:39 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Dec 23 17:44:39 2014 -0800 -- .../main/java/org/apache/tapestry5/corelib/components/Alerts.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e5afaa0e/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java index 16408c2..ac3b955 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java @@ -35,7 +35,6 @@ import org.apache.tapestry5.services.compatibility.DeprecationWarning; * @since 5.3 */ @SupportsInformalParameters -@Import(stack = core) public class Alerts extends BaseClientElement {
tapestry-5 git commit: TAP5-2420: Confirm mixin has issues related to keyboard navigation
Repository: tapestry-5 Updated Branches: refs/heads/master 1956c560e - bed56af43 TAP5-2420: Confirm mixin has issues related to keyboard navigation Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/bed56af4 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/bed56af4 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/bed56af4 Branch: refs/heads/master Commit: bed56af4327a3c11c44ea5ff5f651965d843c59e Parents: 1956c56 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Nov 24 11:03:03 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Nov 24 11:03:03 2014 -0800 -- .../modules/t5/core/confirm-click.coffee| 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bed56af4/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee index ff13e44..013ecac 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee @@ -1,17 +1,3 @@ -# Copyright 2013 The Apache Software Foundation -# -# Licensed under the Apache License, Version 2.0 (the License); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # ## t5/core/confirm-click # # Support for the Tapestry Confirm mixin, and for running confirmation dialogs programatically. @@ -35,7 +21,7 @@ define [jquery, ./events, ./dom, bootstrap/modal], confirmed = false content = -div class=modal fade role=dialog +div class=modal fade role=dialog tabindex='-1' div class=modal-dialog div class=modal-content div class=modal-header @@ -66,6 +52,10 @@ define [jquery, ./events, ./dom, bootstrap/modal], $dialog.appendTo $ body + # Focus on the first button (the OK) button. + $dialog.on shown.bs.modal, - +$dialog.find(.modal-footer .btn).first().focus() + # Support for the Confirm mixin $(body).on click, [data-confirm-message]:not(.disabled), -
Git Push Summary
Repository: tapestry-5 Updated Tags: refs/tags/5.4-beta-23 [created] bed56af43
tapestry-5 git commit: Advance version number to 5.4-beta-24
Repository: tapestry-5 Updated Branches: refs/heads/master bed56af43 - 47bcb11f1 Advance version number to 5.4-beta-24 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/47bcb11f Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/47bcb11f Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/47bcb11f Branch: refs/heads/master Commit: 47bcb11f1f05649697f3b53de20c5817bab3efe5 Parents: bed56af Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Nov 24 12:01:50 2014 -0800 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Nov 24 12:01:50 2014 -0800 -- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/47bcb11f/build.gradle -- diff --git a/build.gradle b/build.gradle index 843f1f6..1d17c04 100755 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ project.version = tapestryVersion() def tapestryVersion() { def major = 5.4 -def minor = -beta-23 +def minor = -beta-24 // When building on the CI server, make sure -SNAPSHOT is appended, as it is a nightly build. // When building normally, or for a release, no suffix is desired.
git commit: Add an easier way to perform a partial page render outside of the standard AjaxComponentEventRequestHandler
Repository: tapestry-5 Updated Branches: refs/heads/master 6f4c5640c - b7f60e28e Add an easier way to perform a partial page render outside of the standard AjaxComponentEventRequestHandler Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b7f60e28 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b7f60e28 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b7f60e28 Branch: refs/heads/master Commit: b7f60e28e959b0250aac056f7e559515e75901d9 Parents: 6f4c564 Author: Howard M. Lewis Ship hls...@apache.org Authored: Wed Oct 29 16:02:14 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Wed Oct 29 16:02:14 2014 -0700 -- .../AjaxPartialResponseRendererImpl.java| 5 +++ .../internal/services/PageRenderQueueImpl.java | 13 ++-- .../services/ajax/AjaxResponseRendererImpl.java | 30 ++ .../services/ajax/AjaxResponseRenderer.java | 32 ++-- 4 files changed, 63 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java index 22ffce9..4b95f37 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java @@ -81,6 +81,11 @@ public class AjaxPartialResponseRendererImpl implements AjaxPartialResponseRende String pageName = (String) request.getAttribute(InternalConstants.PAGE_NAME_ATTRIBUTE_NAME); +if (pageName == null) +{ +throw new IllegalStateException(The active page name has not been specified.); +} + MarkupWriter writer = factory.newPartialMarkupWriter(pageName); // ... and here, the pipeline eventually reaches the PRQ to let it render the root render command. http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java index 34a997d..a61e15c 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java @@ -1,5 +1,3 @@ -// Copyright 2007, 2008, 2010, 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -97,11 +95,20 @@ public class PageRenderQueueImpl implements PageRenderQueue { assert renderer != null; +checkQueue(); + partialRenderInitialized = true; queue.push(renderer); } +private void checkQueue() +{ +if (queue == null) { +throw new IllegalStateException(The page used as the basis for partial rendering has not been set.); +} +} + public Page getRenderingPage() { return page; @@ -125,6 +132,8 @@ public class PageRenderQueueImpl implements PageRenderQueue public void renderPartial(MarkupWriter writer, JSONObject reply) { +checkQueue(); + PartialMarkupRenderer terminator = new PartialMarkupRenderer() { public void renderMarkup(MarkupWriter writer, JSONObject reply) http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java index b263f7c..6fa41cb 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java +++
git commit: TAP5-2406: Use a single ReentrantLock for the PeriodicExecutor and its jobs
Repository: tapestry-5 Updated Branches: refs/heads/master 57a8d25dd - 325716199 TAP5-2406: Use a single ReentrantLock for the PeriodicExecutor and its jobs Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/32571619 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/32571619 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/32571619 Branch: refs/heads/master Commit: 3257161990f639eabb60ce8729e3c1244823609a Parents: 57a8d25 Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 24 13:59:37 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 24 13:59:37 2014 -0700 -- .../services/cron/PeriodicExecutorImpl.java | 181 +-- 1 file changed, 121 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32571619/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java index abfcde9..cf3c717 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java @@ -1,5 +1,3 @@ -// Copyright 2011 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -26,6 +24,8 @@ import org.slf4j.Logger; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; public class PeriodicExecutorImpl implements PeriodicExecutor, Runnable { @@ -33,18 +33,19 @@ public class PeriodicExecutorImpl implements PeriodicExecutor, Runnable private final Logger logger; -// Synchronized by this +// Synchronized by jobLock private final ListJob jobs = CollectionFactory.newList(); private final Thread thread = new Thread(this, Tapestry PeriodicExecutor); -// Synchronized by this. Set when the registry is shutdown. -private boolean shutdown; +private transient boolean shutdown; private static final long FIVE_MINUTES = 5 * 60 * 1000; private final AtomicInteger jobIdAllocator = new AtomicInteger(); +private final Lock jobLock = new ReentrantLock(); + private class Job implements PeriodicJob, InvokableVoid { final int jobId = jobIdAllocator.incrementAndGet(); @@ -74,43 +75,71 @@ public class PeriodicExecutorImpl implements PeriodicExecutor, Runnable return name; } -public synchronized long getNextExecution() +public long getNextExecution() { -return nextExecution; +try +{ +jobLock.lock(); +return nextExecution; +} finally +{ +jobLock.unlock(); +} } @Override -public synchronized boolean isExecuting() +public boolean isExecuting() { -return executing; +try +{ +jobLock.lock(); +return executing; +} finally +{ +jobLock.unlock(); +} } @Override -public synchronized boolean isCanceled() +public boolean isCanceled() { -return canceled; +try +{ +jobLock.lock(); +return canceled; +} finally +{ +jobLock.unlock(); +} } @Override -public synchronized void cancel() +public void cancel() { -canceled = true; +try +{ +jobLock.lock(); + +canceled = true; + +if (!executing) +{ +removeJob(this); +} -if (!executing) +// Otherwise, it will be caught when the job finishes execution. +} finally { -removeJob(this); +jobLock.unlock(); } - -// Otherwise, it will be caught when the job finishes execution. } @Override -public synchronized String toString() +public String toString() {
git commit: TAP-2388: Update test and example app
Repository: tapestry-5 Updated Branches: refs/heads/master a43e17ff9 - 6f4c5640c TAP-2388: Update test and example app Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6f4c5640 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6f4c5640 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6f4c5640 Branch: refs/heads/master Commit: 6f4c5640ccd7e2122a46a7d0cc62cd771efa69b1 Parents: a43e17f Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 24 16:09:12 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 24 16:09:12 2014 -0700 -- .../services/ComponentEventDispatcher.java | 3 -- .../internal/services/PageRenderDispatcher.java | 3 ++ tapestry-core/src/test/app5/WEB-INF/web.xml | 40 +++- .../integration/app5/ProductionModeTests.groovy | 7 ++-- .../integration/app5/pages/Error404.groovy | 20 ++ .../integration/app5/pages/Error404.tml | 18 + 6 files changed, 67 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java index 555ff39..1d0bd5d 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java @@ -49,9 +49,6 @@ public class ComponentEventDispatcher implements Dispatcher // ... in which case, this attribute is set. if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { -// This needs to be cleared out because the container may submit a request back into the filter -// for the 404 page and some containers reuse the existing HttpServletRequest. See TAP5-2388. - request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null); return false; } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java index 2e9e255..38e02e7 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java @@ -42,6 +42,9 @@ public class PageRenderDispatcher implements Dispatcher if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { +// This needs to be cleared out because the container may submit a request back into the filter +// for the 404 page and some containers reuse the existing HttpServletRequest. See TAP5-2388. + request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null); return false; } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/test/app5/WEB-INF/web.xml -- diff --git a/tapestry-core/src/test/app5/WEB-INF/web.xml b/tapestry-core/src/test/app5/WEB-INF/web.xml index a1bcd9f..c8c61c3 100644 --- a/tapestry-core/src/test/app5/WEB-INF/web.xml +++ b/tapestry-core/src/test/app5/WEB-INF/web.xml @@ -1,19 +1,25 @@ ?xml version=1.0 encoding=UTF-8? -!DOCTYPE web-app -PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN -http://java.sun.com/dtd/web-app_2_3.dtd; -web-app - display-nameIntegration Test App 5 -- Skinning/display-name - context-param -param-nametapestry.app-package/param-name -param-valueorg.apache.tapestry5.integration.app5/param-value - /context-param - filter -filter-nameapp/filter-name -filter-classorg.apache.tapestry5.TapestryFilter/filter-class - /filter - filter-mapping -filter-nameapp/filter-name -url-pattern/*/url-pattern - /filter-mapping +web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; + version=2.4 +
git commit: TAP5-2401: Only emit the pattern and title attributes when client-side validation is enabled
Repository: tapestry-5 Updated Branches: refs/heads/master 750ffdbde - 1f09cb654 TAP5-2401: Only emit the pattern and title attributes when client-side validation is enabled Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1f09cb65 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1f09cb65 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1f09cb65 Branch: refs/heads/master Commit: 1f09cb6542474084025097337404627fd2573e53 Parents: 750ffdb Author: Howard M. Lewis Ship hls...@apache.org Authored: Tue Oct 21 16:17:20 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Tue Oct 21 16:17:20 2014 -0700 -- .../src/main/java/org/apache/tapestry5/validator/Regexp.java | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1f09cb65/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java index bc94429..b30c08e 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java @@ -56,9 +56,6 @@ public class Regexp extends AbstractValidatorPattern, String pattern, constraintValue.pattern(), title, message); } - -writer.attributes(pattern, constraintValue.pattern(), -title, message); } public void validate(Field field, Pattern constraintValue, MessageFormatter formatter, String value)
git commit: Remove the FormInjector component
Repository: tapestry-5 Updated Branches: refs/heads/master 3ed6c858c - c501986cb Remove the FormInjector component Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c501986c Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c501986c Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c501986c Branch: refs/heads/master Commit: c501986cb31a17259002a4507b2ce484f1860898 Parents: 3ed6c85 Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 10 16:30:20 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 10 16:30:20 2014 -0700 -- 54_RELEASE_NOTES.md | 8 +- .../tapestry5/ComponentParameterConstants.java | 9 +- .../corelib/components/AjaxFormLoop.java| 28 +++- .../tapestry5/corelib/components/Form.java | 5 +- .../corelib/components/FormInjector.java| 163 --- .../corelib/internal/InternalFormSupport.java | 3 - .../services/ClientBehaviorSupportImpl.java | 4 +- .../internal/services/RequestConstants.java | 5 +- .../apache/tapestry5/services/FormSupport.java | 6 +- .../tapestry5/integration/app1/AjaxTests.java | 4 +- .../integration/app1/data/DoubleItem.java | 5 +- .../org/example/upload/pages/Ajaxified.java | 6 +- tapestry-upload/src/test/webapp/Ajaxified.tml | 10 +- 13 files changed, 49 insertions(+), 207 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c501986c/54_RELEASE_NOTES.md -- diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md index 3d864de..f218254 100644 --- a/54_RELEASE_NOTES.md +++ b/54_RELEASE_NOTES.md @@ -481,4 +481,10 @@ of that mutable field would not always be preserved in the serialized object dat The ContentType objects, used to represent a content types such as text/html in a structured manner, has been revised significantly in 5.4; it is now an immutable data type. In addition, a few scattered -interfaces that used a String content type have been changed to use the ContentType class instead. \ No newline at end of file +interfaces that used a String content type have been changed to use the ContentType class instead. + +## FormInjector Removed + +The FormInjector component was removed; it was intended for use only inside the AjaxFormLoop component +(which was rewritten in 5.4 and no longer uses FormInjector). FormInjector was not widely used elsewhere, if +is was used at all. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c501986c/tapestry-core/src/main/java/org/apache/tapestry5/ComponentParameterConstants.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentParameterConstants.java b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentParameterConstants.java index 151f523..094befa 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/ComponentParameterConstants.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/ComponentParameterConstants.java @@ -1,5 +1,3 @@ -// Copyright 2011, 2012 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -73,13 +71,16 @@ public class ComponentParameterConstants /** * The default position where to insert content into {@link org.apache.tapestry5.corelib.components.Form}. * Defaults to above. + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String FORMINJECTOR_INSERT_POSITION = tapestry.components.forminjector_insert_position; /** - * The default name for a JS function to use to show the injected content by - * {@link org.apache.tapestry5.corelib.components.FormInjector}. + * The default name for a JS function to use to show the injected content by the (removed in 5.4) FormInjector + * component. + * * Defaults to highlight. + * @deprecated Deprecated in 5.4 with no replacement. */ public static final String FORMINJECTOR_SHOW_FUNCTION = tapestry.components.forminjector_show_function; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c501986c/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java index 1a58a91..3f394cf 100644 ---
git commit: TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when using Prototype
Repository: tapestry-5 Updated Branches: refs/heads/master c501986cb - f6de4c4ec TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when using Prototype Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f6de4c4e Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f6de4c4e Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f6de4c4e Branch: refs/heads/master Commit: f6de4c4ec497b902dfcfe1b591ecae8bc38c65ec Parents: c501986 Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 10 17:09:43 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 10 17:09:43 2014 -0700 -- .../main/coffeescript/META-INF/modules/t5/core/pageinit.coffee | 4 ++-- .../org/apache/tapestry5/t5-core-dom.coffee| 6 ++ .../main/java/org/apache/tapestry5/test/SeleniumTestCase.java | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee -- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee index fba32ab..18e95ff 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee @@ -122,8 +122,8 @@ define [underscore, ./console, ./dom, ./events], # At this point, all libraries have been loaded, and all inits should have executed. Unless some of # the inits triggered Ajax updates (such as a core/ProgressiveDisplay component), then the page should # be ready to go. We set a flag, mostly used by test suites, to ensure that all is ready. -# Later Ajax requests will cause the data-ajax-active attribute to switch between true and false, -# so some test logic may need to be driven by that instead. +# Later Ajax requests will cause the data-ajax-active attribute to be incremented (from 0) +# and decremented (when the requests complete). dom.body.attr data-page-initialized, true http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee -- diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee index cfb5ecc..dedec57 100644 --- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee +++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee @@ -1,5 +1,3 @@ -# Copyright 2012-2013 The Apache Software Foundation -# # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -685,7 +683,7 @@ define [underscore, ./utils, ./events, jquery], # Used to track how many active Ajax requests are currently in-process. This is incremented # when an Ajax request is started, and decremented when an Ajax request completes or fails. - # The body attribute `data-ajax-active` is set to true or false whenever the + # The body attribute `data-ajax-active` is set to the number of active Ajax requests, whenever the # count changes. This only applies to Ajax requests that are filtered through the t5/core/dom API; # other libraries (including RequireJS) which bypass this API are not counted. @@ -694,7 +692,7 @@ define [underscore, ./utils, ./events, jquery], adjustAjaxCount = (delta) - activeAjaxCount += delta -exports.body.attr data-ajax-active, (activeAjaxCount 0) +exports.body.attr data-ajax-active, activeAjaxCount # Performs an asynchronous Ajax request, invoking callbacks when it completes. # http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java -- diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java index fda70c5..1add197 100644 --- a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java +++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java @@ -1,5 +1,3
git commit: Revert TAP5-2333: Optimize OperationTracker logging for normal (success, no logging) case
Repository: tapestry-5 Updated Branches: refs/heads/master 1cb63a12b - 2482d6698 Revert TAP5-2333: Optimize OperationTracker logging for normal (success, no logging) case On further reflection, I realized that this change behaves properly only for test cases where the OperationException is allowed to propogate all the way back to a top level and be reported there. In actual practice, there will be other layers intercepting the exception and consuming it. Further, some of these layers (such as the ExceptionReport page logic) requires the complete operation trace, not the partial trace available while unwinding. This reverts commit 1cb63a12b4887b54210d91fe4a9863cf3dad93b5. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2482d669 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2482d669 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2482d669 Branch: refs/heads/master Commit: 2482d6698a40f48a7e2667be146ec30dfb6cbfc8 Parents: 1cb63a1 Author: Howard M. Lewis Ship hls...@apache.org Authored: Mon Oct 6 07:06:21 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Mon Oct 6 07:06:21 2014 -0700 -- .../apache/tapestry5/ioc/RegistryBuilder.java | 2 +- .../ioc/internal/OperationException.java| 29 +--- .../ioc/internal/OperationTrackerImpl.java | 144 ++- .../ioc/internal/PerThreadOperationTracker.java | 90 4 files changed, 172 insertions(+), 93 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2482d669/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java index 493ea3b..d68b2da 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java @@ -176,7 +176,7 @@ public final class RegistryBuilder { lock.lock(); -OperationTracker tracker = new OperationTrackerImpl(loggerSource.getLogger(Registry.class)); +PerThreadOperationTracker tracker = new PerThreadOperationTracker(loggerSource.getLogger(Registry.class)); RegistryImpl registry = new RegistryImpl(modules, proxyFactory, loggerSource, tracker); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2482d669/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java index 695fc91..d8b97e0 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java @@ -1,3 +1,5 @@ +// Copyright 2008, 2010 The Apache Software Foundation +// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -12,9 +14,7 @@ package org.apache.tapestry5.ioc.internal; -import org.apache.tapestry5.ioc.internal.util.CollectionFactory; import org.apache.tapestry5.ioc.internal.util.TapestryException; -import org.apache.tapestry5.ioc.util.Stack; /** * An exception caught and reported by an {@link org.apache.tapestry5.ioc.OperationTracker}; the trace property @@ -24,36 +24,17 @@ public class OperationException extends TapestryException { private static final long serialVersionUID = -7555673473832355909L; -private final StackString operations = CollectionFactory.newStack(); +private final String[] trace; -public OperationException(Throwable cause, String description) +public OperationException(Throwable cause, String[] trace) { super(cause.getMessage(), cause); -operations.push(description); +this.trace = trace; } public String[] getTrace() { -Object[] snapshot = operations.getSnapshot(); - -String[] trace = new String[snapshot.length]; - -for (int i = 0; i snapshot.length; i++) -{ -trace[i] = snapshot[i].toString(); -} - return trace; } - -/** - * Invoked while unwinding the stack to add descriptions for each OperationTracker run/invoke/perform - * operation. - * - */ -public void push(String description) -{ -operations.push(description); -} }
[1/3] git commit: Add some tests related to TAP5-2391
Repository: tapestry-5 Updated Branches: refs/heads/master 8b8487d05 - 40615866b Add some tests related to TAP5-2391 Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f9d6e0a6 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f9d6e0a6 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f9d6e0a6 Branch: refs/heads/master Commit: f9d6e0a6477b71630801b7a55a66a54de997ee82 Parents: 8b8487d Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 16:26:30 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 16:27:56 2014 -0700 -- .../src/test/app1/AjaxValidationDemo.tml| 30 +++ .../app1/pages/AjaxValidationDemo.groovy| 31 .../tapestry5/integration/app1/pages/Index.java | 2 ++ 3 files changed, 63 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/app1/AjaxValidationDemo.tml -- diff --git a/tapestry-core/src/test/app1/AjaxValidationDemo.tml b/tapestry-core/src/test/app1/AjaxValidationDemo.tml new file mode 100644 index 000..878e249 --- /dev/null +++ b/tapestry-core/src/test/app1/AjaxValidationDemo.tml @@ -0,0 +1,30 @@ +html t:type=Border xmlns:t=http://tapestry.apache.org/schema/tapestry_5_4.xsd; + +h1Ajax Validation/h1 + +t:zone t:id=formZone + +t:form t:id=form zone=^ + +t:errors/ + +t:textfield t:id=name t:mixins=formgroup t:clientid=name/ + +div class=form-group +labelValidation Errors?/label +p class=form-control-static +${tracker.hasErrors} +/p + +/div + + +t:submit class=btn btn-primary value=Update Zone/ + +/t:form + + +/t:zone + +/html + http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy new file mode 100644 index 000..65af647 --- /dev/null +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy @@ -0,0 +1,31 @@ +package org.apache.tapestry5.integration.app1.pages + +import org.apache.tapestry5.Field +import org.apache.tapestry5.ValidationTracker +import org.apache.tapestry5.annotations.Environmental +import org.apache.tapestry5.annotations.InjectComponent +import org.apache.tapestry5.annotations.Property +import org.apache.tapestry5.corelib.components.Zone + + +class AjaxValidationDemo { + +@Property +private String name; + +@Environmental +@Property +private ValidationTracker tracker; + +@InjectComponent(name) +private Field nameField; + +@InjectComponent +private Zone formZone; + +def onValidateFromForm() { +tracker.recordError nameField, Server-side validation error. +} + +def onSubmitFromForm() { formZone.body } +} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f9d6e0a6/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java index f3df68f..cdd22ec 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java @@ -56,6 +56,8 @@ public class Index private static final ListItem ITEMS = CollectionFactory .newList( +new Item(AjaxValidationDemo, Ajax Validation, Demonstrated proper integration of server-side validation and client-side field decoration.), + new Item(OverrideEventHandlerDemo, Event Handler Override Demo, Event Handler methods overridden by sub-classes invoke base-class correctly.), new Item(LogoSubclass, Base class Assets in sub-classes, Assets are resolved for the parent class if that's where the annotations are.),
[2/3] git commit: Remove outdated file
Remove outdated file Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d80b19f2 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d80b19f2 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d80b19f2 Branch: refs/heads/master Commit: d80b19f26a8ec3ab680edbbe845e54e6f3727a27 Parents: f9d6e0a Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 16:28:08 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 16:28:08 2014 -0700 -- 54_TODO.txt | 19 --- 1 file changed, 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d80b19f2/54_TODO.txt -- diff --git a/54_TODO.txt b/54_TODO.txt deleted file mode 100644 index dca3f18..000 --- a/54_TODO.txt +++ /dev/null @@ -1,19 +0,0 @@ -Ideas and TODOs: - -Include a new Java module that supports writing an exception log file on error. - -New module to replace tapestry-yuicompressor that is based on WRO4J. - -Start collecting various stats, store in RRD (round robin database), expose on Dashboard - -Add way to have services self describe (for dashboard and/or exception report). - -Add way for services to expose simple actions to the Dashboard (i.e., tie a UI button to a callback). - -Higher level way to assemble JavaScript inside ModuleManagerImpl and ability to feed it though minimizer? Probably not worth effort, -as minimizer may only shrink a few spaces. - -Require that all assets be stored under MODULE-INF/assets/. Make @Inject @Path related -code smart to check in both places (in 5.4) or just MODULE-INF/ in 5.5. - -Make sure that all new dependencies have their LICENCE-foo.txt file included. \ No newline at end of file
git commit: TAP5-2273: AjaxFormLoop doesn't work well inside a table tag
Repository: tapestry-5 Updated Branches: refs/heads/master 40615866b - 0f3eb8a82 TAP5-2273: AjaxFormLoop doesn't work well inside a table tag Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/0f3eb8a8 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/0f3eb8a8 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/0f3eb8a8 Branch: refs/heads/master Commit: 0f3eb8a8257b00bed2e43bc5a568ef7f48d54338 Parents: 4061586 Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 16:41:29 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 16:41:29 2014 -0700 -- .../corelib/components/AjaxFormLoop.java| 21 +--- 1 file changed, 14 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/0f3eb8a8/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java index f5f0a17..1a58a91 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/AjaxFormLoop.java @@ -1,5 +1,3 @@ -// Copyright 2008, 2009, 2010, 2011, 2012 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -17,6 +15,7 @@ package org.apache.tapestry5.corelib.components; import org.apache.tapestry5.*; import org.apache.tapestry5.annotations.*; import org.apache.tapestry5.corelib.internal.AjaxFormLoopContext; +import org.apache.tapestry5.dom.Element; import org.apache.tapestry5.internal.services.RequestConstants; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.ioc.services.TypeCoercer; @@ -145,6 +144,8 @@ public class AjaxFormLoop private JavaScriptSupport jsSupport; private Iterator iterator; + +private Element wrapper; @Inject private TypeCoercer typeCoercer; @@ -317,10 +318,15 @@ public class AjaxFormLoop injectRowLink.addParameter(RequestConstants.FORM_CLIENTID_PARAMETER, formSupport.getClientId()); injectRowLink.addParameter(RequestConstants.FORM_COMPONENTID_PARAMETER, formSupport.getFormComponentId()); -writer.element(div, -data-container-type, core/AjaxFormLoop, -data-remove-row-url, removeRowLink, -data-inject-row-url, injectRowLink); +// Fix for TAP5-227 - AjaxFormLoop dont work well inside a table tag +Element element = writer.getElement(); +this.wrapper = element.getAttribute(data-container-type) != null +|| element.getAttribute(data-remove-row-url) != null +|| element.getAttribute(data-inject-row-url) != null ? writer.element(div) : null; + +writer.attributes(data-container-type, core/AjaxFormLoop, + data-remove-row-url, removeRowLink, + data-inject-row-url, injectRowLink); } private void pushContext() @@ -368,7 +374,8 @@ public class AjaxFormLoop void cleanupRender(MarkupWriter writer) { -writer.end(); +if (wrapper != null) +writer.end(); popContext(); }
git commit: TAP5-2392: ExceptionReporterImpl makes use of org.apache.commons.io, even though not a compile dependency
Repository: tapestry-5 Updated Branches: refs/heads/master 0f3eb8a82 - a4cc2fb69 TAP5-2392: ExceptionReporterImpl makes use of org.apache.commons.io, even though not a compile dependency Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a4cc2fb6 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a4cc2fb6 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a4cc2fb6 Branch: refs/heads/master Commit: a4cc2fb6907b2b36a555103d74b89469b5971815 Parents: 0f3eb8a Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 16:45:55 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 16:45:55 2014 -0700 -- .../internal/services/exceptions/ExceptionReporterImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a4cc2fb6/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReporterImpl.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReporterImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReporterImpl.java index 3d0ab83..77a7161 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReporterImpl.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/exceptions/ExceptionReporterImpl.java @@ -12,7 +12,6 @@ package org.apache.tapestry5.internal.services.exceptions; -import org.apache.commons.io.IOUtils; import org.apache.tapestry5.SymbolConstants; import org.apache.tapestry5.func.F; import org.apache.tapestry5.func.Flow; @@ -143,7 +142,7 @@ public class ExceptionReporterImpl implements ExceptionReporter writeException(writer, analysis); } finally { -IOUtils.closeQuietly(writer); +InternalUtils.close(writer); } }
git commit: TAP5-2395: Release notes update for logging framework TBD by application developer
Repository: tapestry-5 Updated Branches: refs/heads/master a4cc2fb69 - 265d23fcb TAP5-2395: Release notes update for logging framework TBD by application developer Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/265d23fc Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/265d23fc Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/265d23fc Branch: refs/heads/master Commit: 265d23fcb50e345b2c79c603850289c3c7f04cc4 Parents: a4cc2fb Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 16:51:15 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 16:51:15 2014 -0700 -- 54_RELEASE_NOTES.md | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/265d23fc/54_RELEASE_NOTES.md -- diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md index c0e57c0..3d864de 100644 --- a/54_RELEASE_NOTES.md +++ b/54_RELEASE_NOTES.md @@ -162,6 +162,16 @@ for the field (this is related to big improvements in rendering described below) Tapestry now assumes that all text/* assets use the utf-8 character set. This is generally the case for JavaScript files (the primary text asset). +## Logging Dependencies + +Previous versions of Tapestry included dependencies on both SLF4J (Simple Logging Facade for Java) +and Log4J (the most common logging library), as well as the bridge between the two. Users who did not wish to +use Log4J had to muck about with dependencies in their Maven or Gradle build file. + +Tapestry 5.4 only has dependencies on SL4FJ and not on any particular logging implementation; SLF4J will +write only a warning message that it needs to be configured. Application developers must provide additional +dependencies (hint: use Logback!). + ## tapestry-yuicompressor replaced by tapestry-webresources The tapestry-yuicompressor module has been removed and superseded by tapestry-webresources.
git commit: TAP5-2333: Optimize OperationTracker logging for normal (success, no logging) case
Repository: tapestry-5 Updated Branches: refs/heads/master 265d23fcb - 1cb63a12b TAP5-2333: Optimize OperationTracker logging for normal (success, no logging) case This avoids the use of a per-thread variable. Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1cb63a12 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1cb63a12 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1cb63a12 Branch: refs/heads/master Commit: 1cb63a12b4887b54210d91fe4a9863cf3dad93b5 Parents: 265d23f Author: Howard M. Lewis Ship hls...@apache.org Authored: Fri Oct 3 17:19:25 2014 -0700 Committer: Howard M. Lewis Ship hls...@apache.org Committed: Fri Oct 3 17:19:25 2014 -0700 -- .../apache/tapestry5/ioc/RegistryBuilder.java | 2 +- .../ioc/internal/OperationException.java| 29 +++- .../ioc/internal/OperationTrackerImpl.java | 144 +-- .../ioc/internal/PerThreadOperationTracker.java | 90 4 files changed, 93 insertions(+), 172 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1cb63a12/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java index d68b2da..493ea3b 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java @@ -176,7 +176,7 @@ public final class RegistryBuilder { lock.lock(); -PerThreadOperationTracker tracker = new PerThreadOperationTracker(loggerSource.getLogger(Registry.class)); +OperationTracker tracker = new OperationTrackerImpl(loggerSource.getLogger(Registry.class)); RegistryImpl registry = new RegistryImpl(modules, proxyFactory, loggerSource, tracker); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1cb63a12/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java index d8b97e0..695fc91 100644 --- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java +++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationException.java @@ -1,5 +1,3 @@ -// Copyright 2008, 2010 The Apache Software Foundation -// // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -14,7 +12,9 @@ package org.apache.tapestry5.ioc.internal; +import org.apache.tapestry5.ioc.internal.util.CollectionFactory; import org.apache.tapestry5.ioc.internal.util.TapestryException; +import org.apache.tapestry5.ioc.util.Stack; /** * An exception caught and reported by an {@link org.apache.tapestry5.ioc.OperationTracker}; the trace property @@ -24,17 +24,36 @@ public class OperationException extends TapestryException { private static final long serialVersionUID = -7555673473832355909L; -private final String[] trace; +private final StackString operations = CollectionFactory.newStack(); -public OperationException(Throwable cause, String[] trace) +public OperationException(Throwable cause, String description) { super(cause.getMessage(), cause); -this.trace = trace; +operations.push(description); } public String[] getTrace() { +Object[] snapshot = operations.getSnapshot(); + +String[] trace = new String[snapshot.length]; + +for (int i = 0; i snapshot.length; i++) +{ +trace[i] = snapshot[i].toString(); +} + return trace; } + +/** + * Invoked while unwinding the stack to add descriptions for each OperationTracker run/invoke/perform + * operation. + * + */ +public void push(String description) +{ +operations.push(description); +} } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1cb63a12/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationTrackerImpl.java -- diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationTrackerImpl.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/OperationTrackerImpl.java index 6bc462b..ca6c8a1 100644 ---