[jira] [Commented] (TAP5-1628) Have Submit documentation explicitly state when the disabled attribute is evaluated
[ https://issues.apache.org/jira/browse/TAP5-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13101112#comment-13101112 ] Bob Harner commented on TAP5-1628: -- Okay, changed to: If true, then the field will render out with a disabled attribute (to turn off client-side behavior). When the form is submitted, the bound value is evaluated again and, if true, the field's value is ignored (not even validated) and the component's events are not fired. Have Submit documentation explicitly state when the disabled attribute is evaluated --- Key: TAP5-1628 URL: https://issues.apache.org/jira/browse/TAP5-1628 Project: Tapestry 5 Issue Type: Improvement Components: documentation Affects Versions: 5.3 Reporter: Steve Eynon Assignee: Bob Harner Priority: Trivial Labels: submit Fix For: 5.3 The disabled attribute for a Submit button is currently loosely documented as : ... Further, a disabled field ignores any value in the request when the form is submitted. http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Submit.html I would like it to be more explicit, along the lines of: ... Further, if bound, the disabled attribute is re-evaluated upon form submission and the selected event is only fired should it evaluate to 'false'. For this stumped us in work today for a good half hour - it was because we weren't @Persist'ing our disabled attribute. Our expression was t:disabled=!myObject and of course 'myObject' because null / false on form submission. As our submit button was enabled and the form submitted, we saw no reason for the event not to fire. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1628) Have Submit documentation explicitly state when the disabled attribute is evaluated
[ https://issues.apache.org/jira/browse/TAP5-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13101134#comment-13101134 ] Hudson commented on TAP5-1628: -- Integrated in tapestry-trunk-freestyle #511 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/511/]) TAP5-1628 minor rewording (javadoc only) bobharner : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1167084 Files : * /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java * /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Submit.java Have Submit documentation explicitly state when the disabled attribute is evaluated --- Key: TAP5-1628 URL: https://issues.apache.org/jira/browse/TAP5-1628 Project: Tapestry 5 Issue Type: Improvement Components: documentation Affects Versions: 5.3 Reporter: Steve Eynon Assignee: Bob Harner Priority: Trivial Labels: submit Fix For: 5.3 The disabled attribute for a Submit button is currently loosely documented as : ... Further, a disabled field ignores any value in the request when the form is submitted. http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Submit.html I would like it to be more explicit, along the lines of: ... Further, if bound, the disabled attribute is re-evaluated upon form submission and the selected event is only fired should it evaluate to 'false'. For this stumped us in work today for a good half hour - it was because we weren't @Persist'ing our disabled attribute. Our expression was t:disabled=!myObject and of course 'myObject' because null / false on form submission. As our submit button was enabled and the form submitted, we saw no reason for the event not to fire. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TAP5-772) Strange behaviour when filter is mapped to different location that /*
[ https://issues.apache.org/jira/browse/TAP5-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Howard M. Lewis Ship resolved TAP5-772. --- Resolution: Duplicate Assignee: Howard M. Lewis Ship Duplicate of TAP5-743 Strange behaviour when filter is mapped to different location that /* - Key: TAP5-772 URL: https://issues.apache.org/jira/browse/TAP5-772 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.1.0.5 Reporter: Michael Wyraz Assignee: Howard M. Lewis Ship If the filter is mapped to anything else than /* tapestry is not working correctly anymore. Examples: If I map the filter to /test/*, every page fails with 404 If I map a Servlet to that URL as well, every page renders but all generated links (resources, page links) are wrong (missing /test/). I think this behaviour depends on what request.gatPathInfo() returns: - if no servlet is mapped to the current url, it returns NULL. - otherwise, the uri minus the servlet's path So the result of request.getPathInfo() has nothing to do with the filter and should not be used there. Instead, the filter should have an init param which tells where It is mapped to and create a wraped ServletRequest with a customized getPathInfo(). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TAP5-147) Localization: Messages should be overwiteable by Container (.i.e. users) of the component
[ https://issues.apache.org/jira/browse/TAP5-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Massimo Lusetti resolved TAP5-147. -- Resolution: Duplicate Is has been fixed with TAP5-424 as now the ComponentMessagesSource accept and ordered configuration of catalogs (Resources) so order determine overrides. Localization: Messages should be overwiteable by Container (.i.e. users) of the component -- Key: TAP5-147 URL: https://issues.apache.org/jira/browse/TAP5-147 Project: Tapestry 5 Issue Type: New Feature Affects Versions: 5.0.15 Reporter: Fritz Pröbstle Assignee: Massimo Lusetti Labels: tapestry5-review-for-closing Currently messages are *only* searched in the component and its subclasses catalogs. This means only the component provider suppies messages. Often a *User* of a componet ( ie. the container ) wants to override the messages. In a special case the container is the page which should have means to change *all* messages. I propose a path-like syntax to specify thew hierarchy.(means all messages are reachable if the container hierarchy is documented) I.e: page.properties --- firstContainerId.innerContainerId.name= overwriten message In the Message search for a component it the following search would appear: look in immediate container ... look in the moust outer container (page) the look upo in the componet and its subclasses. If a message is found stop the search and take the message. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-147) Localization: Messages should be overwiteable by Container (.i.e. users) of the component
[ https://issues.apache.org/jira/browse/TAP5-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Massimo Lusetti closed TAP5-147. Localization: Messages should be overwiteable by Container (.i.e. users) of the component -- Key: TAP5-147 URL: https://issues.apache.org/jira/browse/TAP5-147 Project: Tapestry 5 Issue Type: New Feature Affects Versions: 5.0.15 Reporter: Fritz Pröbstle Assignee: Massimo Lusetti Labels: tapestry5-review-for-closing Currently messages are *only* searched in the component and its subclasses catalogs. This means only the component provider suppies messages. Often a *User* of a componet ( ie. the container ) wants to override the messages. In a special case the container is the page which should have means to change *all* messages. I propose a path-like syntax to specify thew hierarchy.(means all messages are reachable if the container hierarchy is documented) I.e: page.properties --- firstContainerId.innerContainerId.name= overwriten message In the Message search for a component it the following search would appear: look in immediate container ... look in the moust outer container (page) the look upo in the componet and its subclasses. If a message is found stop the search and take the message. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1616) PeriodicExecutor service prevents running T5.3 on GAE
[ https://issues.apache.org/jira/browse/TAP5-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Massimo Lusetti closed TAP5-1616. - Resolution: Duplicate This has been addressed with TAP5-1637 PeriodicExecutor service prevents running T5.3 on GAE - Key: TAP5-1616 URL: https://issues.apache.org/jira/browse/TAP5-1616 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3 Reporter: Kalle Korhonen Labels: tapestry5-review-for-closing Since GAE doesn't allow user-created threads, constructing PeriodicExecutor service fails on GAE, preventing running the whole application on it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1167258 - in /tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources: pom.xml src/main/java/services/AppModule.java src/main/java/services/DevelopmentModule.java src/main/java
Author: mlusetti Date: Fri Sep 9 15:54:58 2011 New Revision: 1167258 URL: http://svn.apache.org/viewvc?rev=1167258view=rev Log: TAP5-1485 Specify two execution modes in the quickstart, Development and Qa Added: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/DevelopmentModule.java (with props) tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/QaModule.java (with props) Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/pom.xml tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/AppModule.java tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/webapp/WEB-INF/web.xml Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/pom.xml?rev=1167258r1=1167257r2=1167258view=diff == --- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/pom.xml (original) +++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/pom.xml Fri Sep 9 15:54:58 2011 @@ -67,6 +67,17 @@ of testing facilities designed for use w /configuration /plugin +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-surefire-plugin/artifactId +!-- version2.8.1/version -- +configuration +systemPropertyVariables +tapestry.execution-modeQa/tapestry.execution-mode +/systemPropertyVariables +/configuration +/plugin + !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId @@ -79,6 +90,12 @@ of testing facilities designed for use w that prevents the requestLog from being set. -- appendtrue/append /requestLog +systemProperties +systemProperty +nametapestry.execution-mode/name +valueDevelopment/value +/systemProperty +/systemProperties /configuration /plugin /plugins Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/AppModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/AppModule.java?rev=1167258r1=1167257r2=1167258view=diff == --- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/AppModule.java (original) +++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/AppModule.java Fri Sep 9 15:54:58 2011 @@ -41,11 +41,6 @@ public class AppModule configuration.add(SymbolConstants.SUPPORTED_LOCALES, en); -// The factory default is true but during the early stages of an application -// overriding to false is a good idea. In addition, this is often overridden -// on the command line as -Dtapestry.production-mode=false -configuration.add(SymbolConstants.PRODUCTION_MODE, false); - // The application version number is incorprated into URLs for some // assets. Web browsers will cache assets because of the far future expires // header. If existing assets are changed, the version number should also Added: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/DevelopmentModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/DevelopmentModule.java?rev=1167258view=auto == --- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/DevelopmentModule.java (added) +++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/services/DevelopmentModule.java Fri Sep 9 15:54:58 2011 @@ -0,0 +1,58 @@ +// 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 +// +// 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
svn commit: r1167259 - in /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5: SymbolConstants.java TapestryFilter.java
Author: mlusetti Date: Fri Sep 9 15:55:43 2011 New Revision: 1167259 URL: http://svn.apache.org/viewvc?rev=1167259view=rev Log: TAP5-1485 Makes the symbol value a constant Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java?rev=1167259r1=1167258r2=1167259view=diff == --- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java Fri Sep 9 15:55:43 2011 @@ -27,6 +27,13 @@ import org.apache.tapestry5.services.jav public class SymbolConstants { /** + * A comma separated list of execution modes used to control how the application is initialized. + * Each modes can contribute a list (comma separated) of Module classes to be loaded during startup, + * the order in which they appear is preserved. + * The default value is: codeproduction/code. + */ +public static final String EXECUTION_MODE = tapestry.execution-mode; +/** * Indicates whether Tapestry is running in production mode or developer mode. The primary difference is how * exceptions are reported. */ Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java?rev=1167259r1=1167258r2=1167259view=diff == --- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java Fri Sep 9 15:55:43 2011 @@ -98,7 +98,7 @@ public class TapestryFilter implements F } }; -String executionMode = System.getProperty(tapestry.execution-mode, production); +String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, provider, filterName, executionMode);
[jira] [Resolved] (TAP5-1485) Quickstart archetype should define a ProductionModeModule and DevelopmentModeModule with support inside web.xml
[ https://issues.apache.org/jira/browse/TAP5-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Massimo Lusetti resolved TAP5-1485. --- Resolution: Fixed Fix Version/s: 5.3 Quickstart archetype should define a ProductionModeModule and DevelopmentModeModule with support inside web.xml --- Key: TAP5-1485 URL: https://issues.apache.org/jira/browse/TAP5-1485 Project: Tapestry 5 Issue Type: Improvement Components: quickstart Affects Versions: 5.3 Reporter: Howard M. Lewis Ship Assignee: Massimo Lusetti Fix For: 5.3 Attachments: quickstart.patch It's a good practice to have a general AppModule, plus additional module(s) for setup restricted to actual production, and an alternate module for overrides needed during development and testing. The support for this, execution modes, was adding in 5.2. More documentation would be nice, as would an enhanced quickstart archetype that shows how those modes would operation. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1167289 - in /tapestry/tapestry5/trunk/tapestry-ioc/src: main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java test/java/org/apache/tapestry5/ioc/internal/services/TypeCoerce
Author: joshcanfield Date: Fri Sep 9 16:50:29 2011 New Revision: 1167289 URL: http://svn.apache.org/viewvc?rev=1167289view=rev Log: TAP5-1621 - TypeCoercer change: replaced Long - Boolean with Number - Boolean. Added Object - Boolean Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java?rev=1167289r1=1167288r2=1167289view=diff == --- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java (original) +++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java Fri Sep 9 16:50:29 2011 @@ -149,6 +149,7 @@ public final class TapestryIOCModule * Contributes a set of standard type coercions to the {@link TypeCoercer} service: * ul * liObject to String/li + * liObject to Boolean/li * liString to Double/li * liString to BigDecimal/li * liBigDecimal to Double/li @@ -164,7 +165,7 @@ public final class TapestryIOCModule * liFloat to Double/li * liLong to Double/li * liString to Boolean (false is always false, other non-blank strings are true)/li - * liLong to Boolean (true if long value is non zero)/li + * liNumber to Boolean (true if number value is non zero)/li * liNull to Boolean (always false)/li * liCollection to Boolean (false if empty)/li * liObject[] to List/li @@ -190,6 +191,14 @@ public final class TapestryIOCModule } }); +add(configuration, Object.class, Boolean.class, new CoercionObject, Boolean() +{ +public Boolean coerce(Object input) +{ +return input != null; +} +}); + add(configuration, String.class, Double.class, new CoercionString, Double() { public Double coerce(String input) @@ -296,11 +305,11 @@ public final class TapestryIOCModule } }); -add(configuration, Long.class, Boolean.class, new CoercionLong, Boolean() +add(configuration, Number.class, Boolean.class, new CoercionNumber, Boolean() { -public Boolean coerce(Long input) +public Boolean coerce(Number input) { -return !input.equals(0L); +return input.byteValue() != 0; } }); Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java?rev=1167289r1=1167288r2=1167289view=diff == --- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java (original) +++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java Fri Sep 9 16:50:29 2011 @@ -306,7 +306,7 @@ public class TypeCoercerImplTest extends {StringBuffer.class, Integer.class, Object -- String, String -- Long, Long -- Integer}, {void.class, Map.class, null -- null}, {void.class, Boolean.class, null -- Boolean}, -{Object[].class, Boolean.class, Object[] -- java.util.List, java.util.Collection -- Boolean}, +{Object[].class, Boolean.class, Object -- Boolean}, {String[].class, List.class, Object[] -- java.util.List}, {Float.class, Double.class, Float -- Double}, {Double.class, BigDecimal.class, Object -- String, String -- java.math.BigDecimal},}; @@ -318,9 +318,9 @@ public class TypeCoercerImplTest extends Object input = 51; Object[] result = coercer.coerce(input, Object[].class); +Object[] expected = {input}; -assertArraysEqual(result, new Object[] -{input}); +assertArraysEqual(result, expected); } @Test @@ -333,26 +333,4 @@ public class TypeCoercerImplTest extends assertArraysEqual(result, input.toArray()); } -/** - * TAP5-1141 - */ -@Test -public void object_whose_toString_returns_null_to_boolean() -{ -Object idiot = new Object() -{ -
svn commit: r1167386 - /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java
Author: joshcanfield Date: Fri Sep 9 23:00:35 2011 New Revision: 1167386 URL: http://svn.apache.org/viewvc?rev=1167386view=rev Log: TAP5-1621 - Fixed Object[] - Boolean Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java?rev=1167386r1=1167385r2=1167386view=diff == --- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java (original) +++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java Fri Sep 9 23:00:35 2011 @@ -345,6 +345,14 @@ public final class TapestryIOCModule } }); +add(configuration, Object[].class, Boolean.class, new CoercionObject[], Boolean() +{ +public Boolean coerce(Object[] input) +{ +return input != null input.length 0; +} +}); + add(configuration, Float.class, Double.class, new CoercionFloat, Double() { public Double coerce(Float input)
[jira] [Commented] (TAP5-1621) TypeCoercer currently uses Object - String and String - Boolean, there should be a direct coercion from Object - Boolean for t:if/ performance.
[ https://issues.apache.org/jira/browse/TAP5-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13101732#comment-13101732 ] Hudson commented on TAP5-1621: -- Integrated in tapestry-trunk-freestyle #514 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/514/]) TAP5-1621 - Fixed Object[] - Boolean joshcanfield : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1167386 Files : * /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/TapestryIOCModule.java TypeCoercer currently uses Object - String and String - Boolean, there should be a direct coercion from Object - Boolean for t:if/ performance. Key: TAP5-1621 URL: https://issues.apache.org/jira/browse/TAP5-1621 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.3 Reporter: Josh Canfield Assignee: Josh Canfield Fix For: 5.3 An issue was raised in this thread: http://tapestry.1045711.n5.nabble.com/Null-check-property-expression-syntax-td4726386.html Describing the problem where: t:if test=MyObject causes MyObject to be coerced to a String before being coerced to a Boolean. For some objects this may be an expensive operation, and the common case (how often is the Entity you are editing on a page actually null?) Adding an explicit Object - Boolean coercion will remove the need for the Object - String coercion. A Number - Boolean coercion is also required to prevent Integer - Boolean from choosing the Object - Boolean as a match (currently it goes Integer - Long - Boolean) At this point the only known issue is that any POJO that depends on the fact that returning false from toString will cause the Object - String - Boolean to return false will be broken. This seems like an unlikely case and can be worked around by providing a specific TypeCoercion for that object. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-840) Support character references in tml files with HTML 5 Doctype
[ https://issues.apache.org/jira/browse/TAP5-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13101946#comment-13101946 ] Lenny Primak commented on TAP5-840: --- The problem with using entity numbers instead of names is that graphical web page editors (e.g. Dreamweaver) still put nbsp; and such in the html code, so right now html5 templates are not editable by graphic designers, so the whole point of tapestry templates being editable by designers is broken with html5 right now. Support character references in tml files with HTML 5 Doctype - Key: TAP5-840 URL: https://issues.apache.org/jira/browse/TAP5-840 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.3, 5.2.6, 5.1.0.5, 5.0.18 Reporter: Ben Gidley Attachments: patch.txt Currently to support HTML character references (e.g. copy;) you need to put a HTML Doctype at the top of the TML file. e.g. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; However for HTML 5 they have stopped using XML doctypes and instead use !DOCTYPE html If you change tapestry page to use this you can no longer use entities as the XML parser doesn't know what to do. Ideally there should be some kind of logic that detects !DOCTYPE html and include a suitable DTD to resolve the common HTML entities. The HTML 5 specification defines the allowed named character references - http://dev.w3.org/html5/spec/Overview.html#named-character-references. There doesn't seem to be a DTD of allowed references maintained anymore. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1167447 - /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java
Author: joshcanfield Date: Sat Sep 10 03:15:00 2011 New Revision: 1167447 URL: http://svn.apache.org/viewvc?rev=1167447view=rev Log: TAP5-1621 - Fixed test Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java?rev=1167447r1=1167446r2=1167447view=diff == --- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java (original) +++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java Sat Sep 10 03:15:00 2011 @@ -306,7 +306,7 @@ public class TypeCoercerImplTest extends {StringBuffer.class, Integer.class, Object -- String, String -- Long, Long -- Integer}, {void.class, Map.class, null -- null}, {void.class, Boolean.class, null -- Boolean}, -{Object[].class, Boolean.class, Object -- Boolean}, +{Object[].class, Boolean.class, Object[] -- Boolean}, {String[].class, List.class, Object[] -- java.util.List}, {Float.class, Double.class, Float -- Double}, {Double.class, BigDecimal.class, Object -- String, String -- java.math.BigDecimal},};
[jira] [Commented] (TAP5-1621) TypeCoercer currently uses Object - String and String - Boolean, there should be a direct coercion from Object - Boolean for t:if/ performance.
[ https://issues.apache.org/jira/browse/TAP5-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13101959#comment-13101959 ] Hudson commented on TAP5-1621: -- Integrated in tapestry-trunk-freestyle #515 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/515/]) TAP5-1621 - Fixed test joshcanfield : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1167447 Files : * /tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImplTest.java TypeCoercer currently uses Object - String and String - Boolean, there should be a direct coercion from Object - Boolean for t:if/ performance. Key: TAP5-1621 URL: https://issues.apache.org/jira/browse/TAP5-1621 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.3 Reporter: Josh Canfield Assignee: Josh Canfield Fix For: 5.3 An issue was raised in this thread: http://tapestry.1045711.n5.nabble.com/Null-check-property-expression-syntax-td4726386.html Describing the problem where: t:if test=MyObject causes MyObject to be coerced to a String before being coerced to a Boolean. For some objects this may be an expensive operation, and the common case (how often is the Entity you are editing on a page actually null?) Adding an explicit Object - Boolean coercion will remove the need for the Object - String coercion. A Number - Boolean coercion is also required to prevent Integer - Boolean from choosing the Object - Boolean as a match (currently it goes Integer - Long - Boolean) At this point the only known issue is that any POJO that depends on the fact that returning false from toString will cause the Object - String - Boolean to return false will be broken. This seems like an unlikely case and can be worked around by providing a specific TypeCoercion for that object. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira