Hi,
I am using jdev 11.1.2.4.
I am following the link from Frank Nimphius to notify the server and have setup client/server events in my page.
https://blogs.oracle.com/jdevotnharvest/entry/how_to_notify_the_server
I want when user press tab the focus goes to the save button

but instead it goes to the tab of the browser (as shown below)

I've amended Frank's code as
public void onBlurNotify(ClientEvent clientEvent) {
RichInputText inputTxt = (RichInputText) clientEvent.getComponent();
//Get access to the payload
Map parameters = clientEvent.getParameters();
System.out.println("SubmittedValue = "+parameters.get("submittedValue"));
System.out.println("LocalValue = "+parameters.get("localValue"));
// additional code to set the focus to save button
FacesContext fctx = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = fctx.getViewRoot();
UIComponent component=null;
component = viewRoot.findComponent("pt1:cbSave");
if (component != null) {
String clientId = component.getClientId(fctx);
if (clientId != null) {
StringBuilder script = new StringBuilder();
//use client id to ensure component is found if located in the naming container
script.append("var component = ");
script.append("AdfPage.PAGE.findComponentByAbsoluteId");
script.append("('" + clientId + "');");
script.append("if(component != null){");
script.append("component.focus();");
script.append("}");
writeJavaScriptToClient(script.toString());
} else {
System.out.println("No clientId found for component " + component.getId());
}
} else {
System.out.println("No Component found.");
}
}
when I run in the debug mode, it finds the component/client ids which means that the code seems to be working but for some reason not setting the focus.
please help.