Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    JS Error: KPR3:WARN:Log:ReferenceError: bubbleTheseKeys is not defined

    Hi Isomorphic,

    I just got this error message (v9.1p_2014-05-25). Most likely it is related to my Relogin Window (because of the PasswordItem in the logs).

    Eclipse error messages:
    Code:
    Uncaught JavaScript exception [ReferenceError: bubbleTheseKeys is not defined] in http://localhost:8080/myproj/myproj/sc/modules/ISC_Forms.js?isc_version=v9.1p_2014-05-25.js, line 1084
    Code:
    [ERROR] [myproj] - 17:39:55.814:KPR3:WARN:Log:ReferenceError: bubbleTheseKeys is not defined
    Stack from error.stack:
        FormItem.shouldStopKeyPressBubbling() @ myproj/sc/modules/ISC_Forms.js?isc_version=v9.1p_2014-05-25.js:1084
        FormItem.handleKeyPress() @ myproj/sc/modules/ISC_Forms.js?isc_version=v9.1p_2014-05-25.js:1083
        [a]MathFunction.invokeSuper() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:273
        [a]MathFunction.Super() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:265
        TextItem.handleKeyPress() @ myproj/sc/modules/ISC_Forms.js?isc_version=v9.1p_2014-05-25.js:1422
        [c]EventHandler.bubbleEvent() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:1381
        [c]EventHandler.handleKeyPress() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:1185
        EventHandler._handleNativeKeyPress() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:1182
        [c]EventHandler.dispatch() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:1454
        anonymous() @ myproj/sc/modules/ISC_Core.js?isc_version=v9.1p_2014-05-25.js:73
        unnamed() @

    Chrome 35 error messages (deployed app, Developer Console):
    Code:
    16:41:27.355:INFO:Log:initialized
    16:41:28.363:INFO:Log:isc.Page is loaded
    17:53:12.050:KPR9:WARN:Log:ReferenceError: bubbleTheseKeys is not defined
    Stack from error.stack:
    	PasswordItem.shouldStopKeyPressBubbling(<no args: exited>) @ ISC_Forms.js:1084:247
    	PasswordItem.handleKeyPress(<no args: exited>) @ ISC_Forms.js:1083:85
    	[a]Class._invokeSuper(<no args: exited>) @ ISC_Core.js:273:93
    	[a]Class._Super(<no args: exited>) @ ISC_Core.js:265:170
    	PasswordItem.handleKeyPress(<no args: exited>) @ ISC_Forms.js:1422:404
    	EventHandler._bubbleEvent(<no args: exited>) @ ISC_Core.js:1381:139
    	EventHandler._handleKeyPress(<no args: exited>) @ ISC_Core.js:1185:122
    	EventHandler.__handleNativeKeyPress(<no args: exited>) @ ISC_Core.js:1182:11
    	EventHandler._dispatch(_1=>[c]EventHandler.$kd(), _2=>[object KeyboardEvent]) @ ISC_Core.js:1454:155
    	HTMLDocument.eval(event=>[object KeyboardEvent]) @ [no file]:3:123
    My ReloginWindow is:

    Code:
    import java.util.HashMap;
    import java.util.Map;
    
    import com.lmscompany.lms.client.util.User;
    import com.smartgwt.client.rpc.RPCCallback;
    import com.smartgwt.client.rpc.RPCManager;
    import com.smartgwt.client.rpc.RPCRequest;
    import com.smartgwt.client.rpc.RPCResponse;
    import com.smartgwt.client.types.Alignment;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.Window;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.events.SubmitValuesEvent;
    import com.smartgwt.client.widgets.form.events.SubmitValuesHandler;
    import com.smartgwt.client.widgets.form.fields.PasswordItem;
    import com.smartgwt.client.widgets.form.fields.TextItem;
    import com.smartgwt.client.widgets.form.validator.IsOneOfValidator;
    import com.smartgwt.client.widgets.layout.HLayout;
    
    public final class ReloginWindow extends Window {
    	private DynamicForm loginform;
    
    	public DynamicForm getLoginform() {
    		return loginform;
    	}
    
    	public ReloginWindow() {
    
    		setAutoCenter(true);
    		setTitle("Relogin");
    		setShowCloseButton(false);
    		setShowMinimizeButton(false);
    		setShowMaximizeButton(false);
    		setWidth(340);
    		setIsModal(true);
    		setShowModalMask(true);
    		setHeight(130);
    
    		loginform = new DynamicForm() {
    			{
    				setIsGroup(false);
    				setAlign(Alignment.CENTER);
    				setSaveOnEnter(true);
    			}
    		};
    		TextItem benutzernameTI = new TextItem("j_username", "Benutzername") {
    			{
    				setRequired(true);
    				// Make sure that the relogin-form doesn't allow change of user
    				setCanEdit(false);
    				setDisabled(true);
    				setValidators(new IsOneOfValidator() {
    					{
    						setList(new String[] { User.getUserLoginname() });
    						setErrorMessage("Bitte verwenden Sie den Loginnamen, den Sie auch beim Start der Anwendung verwendet haben!");
    					}
    				});
    			}
    		};
    		PasswordItem passwortPI = new PasswordItem("password_display", "Passwort") {
    			{
    				setRequired(true);
    			}
    		};
    		
    		final IButton einloggenButton = new IButton("Re-Login") {
    			{
    				setWidth(100);
    				addClickHandler(new ClickHandler() {
    					@Override
    					public void onClick(ClickEvent event) {
    						executeLogin();
    					}
    				});
    			}
    		};
    		final IButton beendenButton = new IButton("Beenden") {
    			{
    				setWidth(100);
    				addClickHandler(new ClickHandler() {
    					@Override
    					public void onClick(ClickEvent event) {
    						User.logUserOut();
    					}
    				});
    			}
    		};
    		HLayout buttonsHL = new HLayout(10) {
    			{
    				setPadding(10);
    				setMembers(einloggenButton, beendenButton);
    			}
    		};
    
    		loginform.setFields(benutzernameTI, passwortPI);
    		loginform.addSubmitValuesHandler(new SubmitValuesHandler() {
    			public void onSubmitValues(final SubmitValuesEvent submitValuesEvent) {
    				executeLogin();
    			}
    		});
    		addItem(loginform);
    		addItem(buttonsHL);
    	}
    
    	private void executeLogin() {
    		if (!loginform.validate())
    			return;
    		String passwd = loginform.getValueAsString("password_display") + "salt";
    		for (int i = 1; i <= 999; i++)
    			passwd = SHA1.calcSHA1(passwd);
    		loginform.setValue("j_password", passwd);
    		RPCRequest request = new RPCRequest() {
    			{
    				setActionURL("loginSuccessMarker.html");
    			}
    		};
    		RPCManager.sendRequest(request);
    		validateLogin(loginform.getValueAsString("j_username"), loginform.getValueAsString("j_password"));
    	}
    
    	private void validateLogin(String j_username, String j_password) {
    		RPCRequest request = new RPCRequest();
    		request.setContainsCredentials(true);
    		request.setActionURL("j_security_check");
    		request.setUseSimpleHttp(true);
    		request.setShowPrompt(false);
    		Map<String, String> params = new HashMap<String, String>();
    		params.put("j_username", j_username);
    		params.put("j_password", j_password);
    		request.setParams(params);
    		RPCManager.sendRequest(request, new RPCCallback() {
    			public void execute(RPCResponse response, Object rawData, RPCRequest request) {
    				String data = String.valueOf(rawData);
    				if (data.contains("invalidlogin")) {
    					SC.warn("Ungültiger Benutzername und/oder Passwort. Bitte versuchen Sie erneut, sich anzumelden.");
    				} else {
    
    					RPCRequest reauthenticateUserRequest = new RPCRequest() {
    						{
    							setActionURL("ServletLogin");
    						}
    					};
    					RPCManager.sendRequest(reauthenticateUserRequest, new RPCCallback() {
    						public void execute(RPCResponse response, Object rawData, RPCRequest request) {
    							User.setData(rawData.toString());
    							RPCManager.resendTransaction();
    						}
    					});
    					ReloginWindow.this.hide();
    				}
    			}
    		});
    	}
    
    	public void showWindow() {
    		if ((!isDrawn()) || (!isVisible())) {
    			loginform.clearValues();
    			loginform.setValue("j_username", User.getUserLoginname());
    			loginform.focusInItem("j_username");
    			redraw();
    			show();
    		}
    	}
    }
    It's called in onModuleLoad with
    Code:
    				RPCManager.setLoginRequiredCallback(new LoginRequiredCallback() {
    					@Override
    					public void loginRequired(int transactionNum, RPCRequest request, RPCResponse response) {
    						if (windowRelogin == null)
    							windowRelogin = new ReloginWindow();
    						windowRelogin.showWindow();
    					}
    				});
    For me, everything works, but I think you might like to know about the error.

    Best regards,
    Blama

    #2
    Thanks for pointing this out - it was actually fixed yesterday, so you just need today's build.

    Comment

    Working...
    X