-
26 Apr 2012 11:11 PM #1
BeforeRender not being called.
BeforeRender not being called.
Hi all,
I have called BeforeRender function to implement code to change the captions of the control. I was previously using version 4.0.7 in which the code was working fine, I updated the extjs version to 4.1.0 which is giving me problem the event is not being raised.
Thanks in advance.
Shakti
-
27 Apr 2012 5:15 AM #2
Can you provide a small working example:
http://www.sencha.com/forum/showthre...o-report-a-bug
Regards,
Scott.
-
30 Apr 2012 5:04 AM #3
Code:/* * File: app/controller/LoginController.js * Date: Thu Apr 26 2012 10:03:22 GMT+0545 (Nepal Standard Time) * * This file was generated by Sencha Architect version 2.0.0. * http://www.sencha.com/products/architect/ * * This file requires use of the Ext JS 4.0.x library, under independent license. * License of Sencha Architect does not include license for Ext JS 4.0.x. For more * details see http://www.sencha.com/license or contact license@sencha.com. * * This file will be auto-generated each and everytime you save your project. * * Do NOT hand edit this file. */ Ext.define('Prosche.controller.LoginController', { extend: 'Ext.app.Controller', views: [ 'LoginView', 'pwdWin', 'Prosche.view.PreRegistrationWindow' ], onLoginBtnClick: function(button, e, options) { var loginFrm=(Ext.ComponentQuery.query('form[id=LoginForm]')[0]).getForm(); if(loginFrm.isValid()) { loginFrm.submit({ url: loginFrm.url, scope:loginFrm, waitMsg:Ext.LANG.app.Validating, success: function(form,o) { location.href='index.php'; }, failure: function(form,o) { Ext.Msg.show({ title:Ext.LANG.app.AppTitle, msg:o.result.data, modal:true, icon:Ext.Msg.ERROR, buttons:Ext.Msg.OK }); } }); } }, onBtnSignupClick: function(button, e, options) { var regWin=new Prosche.view.PreRegistrationWindow(); regWin.show(); }, onBtnForgotPwdClick: function(button, e, options) { var pwdWin = new Prosche.view.pwdWin(); pwdWin.show(); }, onLoginviewBeforeRender: function(abstractcomponent, options) { var loginFrm=(Ext.ComponentQuery.query('form[id=LoginForm]')[0]); loginFrm.setTitle(Ext.LANG.login.WindowTitle); loginFrm.query('textfield[id=username]')[0].fieldLabel=Ext.LANG.login.UserName; loginFrm.query('textfield[id=password]')[0].fieldLabel=Ext.LANG.login.Password; loginFrm.query('displayfield[id=response]')[0].setValue(Ext.LANG.login.Message); loginFrm.query('checkboxfield[id=rememberLogin]')[0].boxLabel=Ext.LANG.login.rememberMe; loginFrm.query('button[id=loginBtn]')[0].setText(Ext.LANG.login.Login); loginFrm.query('button[id=btnSignup]')[0].setText(Ext.LANG.login.SignUp); loginFrm.query('button[id=btnForgotPwd]')[0].setText(Ext.LANG.login.ForgotPassword); }, onControllerClickStub: function() { }, init: function() { this.control({ "#loginBtn": { click: this.onLoginBtnClick }, "#btnSignup": { click: this.onBtnSignupClick }, "#btnForgotPwd": { click: this.onBtnForgotPwdClick }, "#loginview": { beforerender: this.onLoginviewBeforeRender } }); } });
-
30 Apr 2012 5:07 AM #4
What does LoginView refer to?
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
30 Apr 2012 5:16 AM #5
its a view file, the content of view file is,,,
Code:/* * File: app/view/LoginView.js * Date: Wed Apr 25 2012 16:22:59 GMT+0545 (Nepal Standard Time) * * This file was generated by Sencha Architect version 2.0.0. * http://www.sencha.com/products/architect/ * * This file requires use of the Ext JS 4.0.x library, under independent license. * License of Sencha Architect does not include license for Ext JS 4.0.x. For more * details see http://www.sencha.com/license or contact license@sencha.com. * * This file will be auto-generated each and everytime you save your project. * * Do NOT hand edit this file. */ Ext.define('Prosche.view.LoginView', { extend: 'Ext.container.Viewport', id: 'loginview', itemId: 'loginview', maintainFlex: true, activeItem: 0, layout: { align: 'center', pack: 'center', type: 'vbox' }, initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'image', height: 67, id: 'proscheLogo', itemId: 'proscheLogo', margin: '0 0 10px 0', width: 255, src: 'images/app_main_logo.png' }, { xtype: 'form', height: 230, id: 'LoginForm', itemId: 'LoginForm', maxWidth: 320, width: 320, maintainFlex: true, bodyPadding: 10, title: 'Login Form', url: 'bizlayer/auth/login', items: [ { xtype: 'displayfield', height: 25, id: 'response', itemId: 'response', width: 300, name: 'response', submitValue: false, value: 'Enter your username and password to login!', fieldLabel: '', hideLabel: true, labelPad: 0, labelWidth: 0 }, { xtype: 'textfield', id: 'username', itemId: 'username', maxWidth: 300, width: 300, name: 'username', fieldLabel: 'Username', labelWidth: 120, allowBlank: false, anchor: '100%' }, { xtype: 'textfield', id: 'password', itemId: 'password', margin: '', maxWidth: 300, width: 300, inputType: 'password', name: 'password', fieldLabel: 'Password', labelWidth: 120, allowBlank: false, anchor: '100%' }, { xtype: 'checkboxfield', id: 'rememberLogin', itemId: 'rememberLogin', margin: '0 0 0 125', name: 'remember_me', labelWidth: 120, checked: true, inputValue: 1, uncheckedValue: 0, anchor: '100%' }, { xtype: 'button', id: 'loginBtn', itemId: 'loginBtn', margin: '10 0 0 105', maxHeight: 25, maxWidth: 100, padding: '', icon: 'images/login-icon.png', text: 'Login', type: 'submit' } ], dockedItems: [ { xtype: 'toolbar', id: 'cntLink', itemId: 'cntLink', dock: 'bottom', items: [ { xtype: 'button', id: 'btnSignup', itemId: 'btnSignup', icon: 'images/sign-up.png', text: 'Sign Up' }, { xtype: 'button', id: 'btnForgotPwd', itemId: 'btnForgotPwd', icon: 'images/forgot-password.png', text: 'Forgot Password' } ] } ] } ] }); me.callParent(arguments); } });
-
30 Apr 2012 10:43 AM #6
I also hit this issue and posted about it here.
http://www.sencha.com/forum/showthre...vent-not-fired
-
30 Apr 2012 2:43 PM #7
Yes, this one has already been resolved for the next release, will mark this one as closed.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
30 Apr 2012 5:43 PM #8
-
1 May 2012 5:51 AM #9
There is no release date for 4.1.1 at this time. If you are a licensed user, you can access nightly build in the support portal.
Regards,
Scott.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote