Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Sencha ExtJs按钮-密码恢复电子邮件不工作_Javascript_Extjs - Fatal编程技术网

Javascript Sencha ExtJs按钮-密码恢复电子邮件不工作

Javascript Sencha ExtJs按钮-密码恢复电子邮件不工作,javascript,extjs,Javascript,Extjs,这将显示一条确认消息,但当我单击“是”时,会出现以下错误: HTTP状态415- 说明服务器拒绝了此请求,因为请求实体的格式不受请求方法的请求资源支持 { xtype: 'button', id: 'passwordRecoveryButton', text: 'Reset Password', style: 'border-color: red', listeners: { click: function(button, eve

这将显示一条确认消息,但当我单击“是”时,会出现以下错误: HTTP状态415- 说明服务器拒绝了此请求,因为请求实体的格式不受请求方法的请求资源支持

 {
    xtype: 'button',
    id: 'passwordRecoveryButton',
    text: 'Reset Password',
    style: 'border-color: red',
    listeners: {
            click: function(button, event){
                var form = Ext.getCmp('gmiUserDetailsPanel').getForm();
                var currentRecord = form.getRecord();
                var emailId = currentRecord.get('emailId');

            Ext.Msg.show({
                title:'Password Recovery',
                msg: 'Are you sure you want to send a password recovery email to ' + emailId +'?',
                buttons: Ext.Msg.YESNO,
                icon: Ext.Msg.QUESTION,
                fn: function(btn) {
                    if (btn === 'yes') {
                        Ext.Ajax.request({
                            url: 'admin/passwordRecovery.htm',
                            jsonData : emailId,
                            method: 'POST',
                            success: function(response){
                                Ext.Msg.show({
                                msg: 'Email successfully sent to ' + emailId +'.',
                                })
                                },
                            failure: function(response){
                                Ext.Msg.show({
                                    modal  : true,
                                    title  : 'Unable to send email!',
                                    msg    : 'Unable to send email to :  '+emailId+', please contact support team.',
                                    icon   : Ext.Msg.ERROR,
                                    buttons: Ext.Msg.OK
                                });
                            }
                        });
                    }
                }
            });
        }
    }

},

        },

我正在尝试传递当前记录(或只是电子邮件)的信息,这在java控制器中:

 @RequestMapping(value = "/passwordRecovery", method = RequestMethod.POST)
        @Secured("ADMIN")
        public
        @ResponseBody
        UserOperationResponse PasswordRecoveryEmail(Model model, HttpServletRequest request, @RequestBody UserOperationRequest userOperationRequest) throws UnsupportedEncodingException, MessagingException {
            UserOperationResponse userOperationResponse = new UserOperationResponse();

[…]

成功函数中的内容无效。。。“msg:'Email success…”内容应该包装在Ext.msg.show I assume中。那么问题是什么?您正在发送服务器不期望的内容。服务器期望什么?成功函数中的内容无效。。。“msg:'Email success…”内容应该包装在Ext.msg.show I assume中。那么问题是什么?您正在发送服务器不期望的内容。服务器期望什么?