Question on 9.7 vs 9.9 for Java Code

Our legacy Applications all have code similar to the following to negate accidental PK Key processing:

// used for updating the send key request before sending
public void gx_preSendKey(GXIHostPageContext gx_context,GXPreSendKeyEvent event)throws GXGeneralException{

	  if (event.getSendKeysRequest().getKeys().equals("[enter]")){
		  event.getSendKeysRequest().setKeys("[]");
		  gx_context.gx_fillForm();
	  }

      if (event.getSendKeysRequest().getKeys().equals("[pf7]")){
		  event.getSendKeysRequest().setKeys("[]");
		  gx_context.gx_fillForm();
	  }

      if (event.getSendKeysRequest().getKeys().equals("[pf8]")){
		  event.getSendKeysRequest().setKeys("[]");
		  gx_context.gx_fillForm();
	  }

      if (event.getSendKeysRequest().getKeys().equals("[pf10]")){
		  event.getSendKeysRequest().setKeys("[]");
		  gx_context.gx_fillForm();
	  }

      if (event.getSendKeysRequest().getKeys().equals("[pf11]")){
		  event.getSendKeysRequest().setKeys("[]");
		  gx_context.gx_fillForm();
	  }

}

It worked in 9.7, but now in 9.9, when you press the Enter key, it locks the screen and you cannot do anything. It seems to freeze in place. When I remove the Java code, then it works normally. Any ideas?

Hi Joe,

I don’t know exactly when and what changed but if you’ll replace:
setKeys(“”);
with:
setKeys(“”);

It should solve your problem :slight_smile:

Regards,
Gadi

Thanks, Gadi. It works fine. Unfortunately we must now modify thousands of java files. But, at least we have a fix.