Ext.net RecordField SubmitEmptyValue invalid 无效问题有解决方案吗

< ext:Store 
            ID
= " Store1 "  
            runat
= " server "  
            AutoSave
= " true "  
            ShowWarningOnFailure
= " false "
            OnBeforeStoreChanged
= " HandleChanges "  
            SkipIdForNewRecords
= " false "
            RefreshAfterSaving
= " None " >
            
< Reader >
                
< ext:JsonReader IDProperty = " Id " >
                    
< Fields >
                        
< ext:RecordField Name = " Id "   / >
                         < ext:RecordField Name = " Email "  AllowBlank = " false "   / >
                         < ext:RecordField Name = " First "  AllowBlank = " true "   SubmitEmptyValue = " Null "   / >
                         < ext:RecordField Name = " Last "  AllowBlank = " true "   SubmitEmptyValue = " Undefined "   / >
                     < / Fields>
                 < / ext:JsonReader>
             < / Reader>
            
            
< Listeners >
                
< Exception Handler = "
                    Ext.net.Notification.show({
                        iconCls    : 'icon-exclamation', 
                        html       : e.message, 
                        title      : 'EXCEPTION', 
                        autoScroll : true, 
                        hideDelay  : 5000, 
                        width      : 300, 
                        height     : 200
                    });
"   / >
                 < BeforeSave Handler = " var valid = true; this.each(function(r){if(r.dirty && !r.isValid()){valid=false;}}); return valid; "   / >
             < / Listeners>
         < / ext:Store>

  <ext:FormPanel 

            ID = " UserForm "  
            runat
= " server "
            Icon
= " User "
            Frame
= " true "
            LabelAlign
= " Right "
            Title
= " User -- All fields are required "
            Width
= " 500 " >
            
< Items >
                
< ext:TextField runat = " server "
                    FieldLabel
= " Email "
                    DataIndex
= " Email "
                    AllowBlank
= " false "
                    Vtype
= " email "
                    AnchorHorizontal
= " 100% "
                    
/>
                
                
< ext:TextField runat = " server "
                    FieldLabel
= " First "
                    DataIndex
= " First "
                    AllowBlank
= " true "
                    AnchorHorizontal
= " 100% "
                    
/>
                
                
< ext:TextField runat = " server "
                    FieldLabel
= " Last "
                    DataIndex
= " Last "
                    AllowBlank
= " true "
                    AnchorHorizontal
= " 100% "
                    
/>
            
</ Items >
            
            
< Buttons >
                
< ext:Button 
                    runat
= " server "
                    Text
= " Save "
                    Icon
= " Disk " >
                    
< Listeners >
                        
< Click Handler = " updateRecord(#{UserForm}); "   />
                    
</ Listeners >
                
</ ext:Button >
                
                
< ext:Button 
                    runat
= " server "
                    Text
= " Create "
                    Icon
= " UserAdd " >
                    
< Listeners >
                        
< Click Handler = " addRecord(#{UserForm}, #{GridPanel1}); "   />
                    
</ Listeners >
                
</ ext:Button >
                
                
< ext:Button 
                    runat
= " server "
                    Text
= " Reset " >
                    
< Listeners >
                        
< Click Handler = " #{UserForm}.getForm().reset(); "   />
                    
</ Listeners >
                
</ ext:Button >
            
</ Buttons >
        
</ ext:FormPanel >

 我将

SubmitEmptyValue = " Null " 和”Undefined“ 都试过了,当输入空值,也就是TextBox空白的情况后台对应的 
First,Last字段的值是StringEmpty,并不是NULL,这让我很头疼,那位大侠做过类似的项目,不知道是否有解决方案。

 

你可能感兴趣的:(Invalid)