Author: jkuhnert
Date: Tue Apr 8 13:55:26 2008
New Revision: 646069
URL: http://svn.apache.org/viewvc?rev=646069&view=rev
Log:
-) Upgraded javassist/commons-lang/couple other library dependencies.
-) Fixed some script errors in the old validfield client side generated
functions.
-) Added a generic tapestry.stopEvent() function.
Modified:
tapestry/tapestry4/trunk/pom.xml
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ExpressionEvaluatorImpl.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/PoolableOgnlContextFactory.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/DateValidator.script
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/IntegerValidator.script
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/NumberValidator.script
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/PatternValidator.script
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/StringValidator.script
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/core.js
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/form.js
Modified: tapestry/tapestry4/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/pom.xml?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/pom.xml (original)
+++ tapestry/tapestry4/trunk/pom.xml Tue Apr 8 13:55:26 2008
@@ -109,7 +109,7 @@
<dependency>
<groupId>jboss</groupId>
<artifactId>javassist</artifactId>
- <version>3.6.ga</version>
+ <version>3.7.ga</version>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -193,7 +193,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
- <version>1.2</version>
+ <version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
@@ -203,7 +203,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.3</version>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ExpressionEvaluatorImpl.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ExpressionEvaluatorImpl.java?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ExpressionEvaluatorImpl.java
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/ExpressionEvaluatorImpl.java
Tue Apr 8 13:55:26 2008
@@ -174,7 +174,6 @@
// setup context
context.setRoot(target);
- context.setCurrentObject(target);
expression.set(context, target, value);
}
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/PoolableOgnlContextFactory.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/PoolableOgnlContextFactory.java?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/PoolableOgnlContextFactory.java
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/PoolableOgnlContextFactory.java
Tue Apr 8 13:55:26 2008
@@ -32,9 +32,9 @@
{
OgnlContext context = (OgnlContext)obj;
- if (context.getRoot() != null || context.getValues().size() > 0) {
+ if (context.getRoot() != null || context.getValues().size() > 0)
+ {
context.clear();
- context.setRoot(null);
}
}
}
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/DateValidator.script
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/DateValidator.script?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/DateValidator.script
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/DateValidator.script
Tue Apr 8 13:55:26 2008
@@ -47,14 +47,14 @@
var field = tapestry.byId("${field.name}");
if (field.value.length == 0) {
- Tapestry.invalid_field(field, "${requiredMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
}
}
</body>
<initialization>
-Tapestry.onsubmit('${form.name}', ${function});
+tapestry.connect('${form.name}', "onsubmit", ${function});
</initialization>
</script>
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/IntegerValidator.script
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/IntegerValidator.script?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
Binary files - no diff available.
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/NumberValidator.script
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/NumberValidator.script?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/NumberValidator.script
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/NumberValidator.script
Tue Apr 8 13:55:26 2008
@@ -52,8 +52,8 @@
<if expression="validator.required">
if (stringValue.length == 0)
{
- Tapestry.invalid_field(field, "${requiredMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleMissingField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
@@ -64,32 +64,32 @@
var value = stringValue * 1;
if (isNaN(value))
{
- Tapestry.invalid_field(field, "${formatMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
return;
}
<if expression="validator.integerNumber">
var regex = /\./;
if (stringValue.search(regex) != -1)
{
- Tapestry.invalid_field(field, "${formatMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
<if expression="validator.minimum != null">
if (value < ${validator.minimum})
{
- Tapestry.invalid_field(field, "${rangeMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
<if expression="validator.maximum != null">
if (value > ${validator.maximum})
{
- Tapestry.invalid_field(field, "${rangeMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
@@ -97,7 +97,7 @@
</body>
<initialization>
-Tapestry.onsubmit('${form.name}', ${function});
+tapestry.connect('${form.name}', "onsubmit", ${function});
</initialization>
</script>
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/PatternValidator.script
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/PatternValidator.script?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/PatternValidator.script
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/PatternValidator.script
Tue Apr 8 13:55:26 2008
@@ -53,20 +53,20 @@
<if expression="validator.required">
if (field.value.length == 0)
{
- Tapestry.invalid_field(field, "${requiredMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleMissingField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
if (field.value.length > 0 && !${pattern}.test(field.value)) {
- Tapestry.invalid_field(field, "${patternNotMatchedMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
}
}
</body>
<initialization>
-Tapestry.onsubmit('${form.name}', ${function});
+tapestry.connect('${form.name}', "onsubmit", ${function});
</initialization>
</script>
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/StringValidator.script
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/StringValidator.script?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/StringValidator.script
(original)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/valid/StringValidator.script
Tue Apr 8 13:55:26 2008
@@ -49,8 +49,8 @@
<if expression="validator.required">
if (field.value.length == 0)
{
- Tapestry.invalid_field(field, "${requiredMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleMissingField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
@@ -61,8 +61,8 @@
<if expression="validator.minimumLength">
if (field.value.length < ${validator.minimumLength})
{
- Tapestry.invalid_field(field, "${minimumLengthMessage}");
- tapestry.event.stopEvent(event);
+ tapestry.form.validation.handleInvalidField(field);
+ tapestry.stopEvent(event);
return;
}
</if>
@@ -71,7 +71,7 @@
<initialization>
-Tapestry.onsubmit('${form.name}', ${function});
+tapestry.connect('${form.name}', "onsubmit", ${function});
</initialization>
</script>
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/core.js
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/core.js?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/core.js
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/core.js
Tue Apr 8 13:55:26 2008
@@ -486,7 +486,19 @@
tapestry.connect(dojo.widget.byId(target), event, funcName);
},
- /**
+ /**
+ * Function: stopEvent
+ *
+ * Handles canceling event bubbling propogation.
+ *
+ * Parameters:
+ * event - The event to stop propogation of.
+ */
+ stopEvent:function(event){
+ dojo.event.browser.stopEvent(event);
+ },
+
+ /**
* Function: byId
*/
byId:dojo.byId,
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/form.js
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/form.js?rev=646069&r1=646068&r2=646069&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/form.js
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/form.js
Tue Apr 8 13:55:26 2008
@@ -302,7 +302,7 @@
return;
}
- form.submit();
+ form.submit();
},
/**