Ewl » Canonical The canonical version of EWL Read More
Clone URL:  
Pushed to 3 repositories · View In Graph Contained in tip and canonical

Restored some generated code that is still used to make form controls for actual
numbers (i.e. not numeric text).

Changeset 623f4c1ff013

Parent 7b1badb1185b

by Profile picture of William GrossWilliam Gross

Changes to one file · Browse files at 623f4c1ff013 Showing diff from parent 7b1badb1185b Diff from another changeset...

 
212
213
214
 
 
 
 
 
 
215
216
217
218
219
220
 
 
 
 
 
 
221
222
223
 
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
@@ -212,12 +212,24 @@
  .FormatWith( dv ) );     if( field.TypeIs( typeof( int ) ) ) { + writeNumberAsTextFormItemGetters( + writer, + field, + "int?", + new[] { new CSharpParameter( "int", "min", "int.MinValue" ), new CSharpParameter( "int", "max", "int.MaxValue" ) }, + "validator.GetInt( new ValidationErrorHandler( subject ), control.GetPostBackValue( postBackValues ), min, max )" );   writeNumberAsSelectListFormItemGetters( writer, field );   writeDurationFormItemGetter( writer, field );   writeHtmlAndFileFormItemGetters( writer, field, "int?" );   writeFileCollectionFormItemGetters( writer, field, "int" );   }   if( field.TypeIs( typeof( int? ) ) ) { + writeNumberAsTextFormItemGetters( + writer, + field, + "int?", + new[] { getAllowEmptyParameter( true ), new CSharpParameter( "int", "min", "int.MinValue" ), new CSharpParameter( "int", "max", "int.MaxValue" ) }, + "validator.GetNullableInt( new ValidationErrorHandler( subject ), control.GetPostBackValue( postBackValues ), allowEmpty, min: min, max: max )" );   writeNumberAsSelectListFormItemGetters( writer, field );   writeDurationFormItemGetter( writer, field );   writeHtmlAndFileFormItemGetters( writer, field, "int?" );