私のフォームには、cashPay という名前の数値フィールドがあり、別のフィールド名は totalPayable です。ここで、cashPay が totalPayable より小さい場合、メッセージを警告して、cashPay フィールドに注目する必要があります。しかし、私はそれを行うことができません。focus メソッドは他の形式のテキストフィールドでは機能しますが、数値フィールドでは機能しません。誰でもこれについて私を助けてください。以下は私のコードです:
マイ ビュー ページで >>>
{
xtype: 'numberfield',
name: 'cashPay',
id: 'cashPay',
keyNavEnabled: false,
mouseWheelEnabled: false,
enableKeyEvents: true,
allowBlank: false,
hideTrigger: true,
fieldLabel: 'Cash Pay',
action: 'cashCalculation'
}
私のコントローラーで>>>
Ext.Msg.alert("Warning !","Sorry Cash Pay is less than this month's installment. Please pay the right amount")
Ext.getCmp('cashPay').focus(false, 1);