You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/02/29 05:50:04 UTC
svn commit: r632223 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java
Author: hlship
Date: Thu Feb 28 20:50:01 2008
New Revision: 632223
URL: http://svn.apache.org/viewvc?rev=632223&view=rev
Log:
TAPESTRY-2206: Tapestry should have a different data type for numbers than for strings
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java?rev=632223&r1=632222&r2=632223&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java Thu Feb 28 20:50:01 2008
@@ -40,7 +40,12 @@
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:textFieldValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
- private TextField _textField, _numberField;
+ private TextField _textField;
+
+ @Component(
+ parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:numberFieldValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
+ private TextField _numberField;
+
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "encoder=valueEncoderForProperty", "model=selectModelForProperty", "validate=prop:selectValidator", "clientId=prop:context.propertyId" })
@@ -74,6 +79,11 @@
public FieldValidator getTextFieldValidator()
{
return _context.getValidator(_textField);
+ }
+
+ public FieldValidator getNumberFieldValidator()
+ {
+ return _context.getValidator(_numberField);
}
public FieldValidator getPasswordFieldValidator()