Comments on: ADF 11g Rich Faces: focus on field after button press or PPR – Including JavaScript in PPR response and ClientListeners (Client Side programming in ADF Faces Rich Client Components Part 2) Friends of Oracle and Java Thu, 21 May 2015 20:49:51 +0000 hourly 1 By: Bhargav Fri, 29 Jul 2011 15:55:03 +0000 Hi,

I used code @ for setting focus on a component after tab out & it works fine.

In my second usecase I have around 20 inputText field & one single valuechangelistener for all. In this listener based on certain condition I want to throw exception & after exception want to highlight the field which caused the exception. What I observe using above code is the focus is moved to next component as I tab out. If I don’t throw the exception then the setFocus is working fine. Its only after throwing exception the focus is not set correctly.

Any suggestions ?


By: venusa Thu, 03 Mar 2011 20:14:26 +0000 The method:
public void commandButton1(ActionEvent actionEvent) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service =
UIComponent ip = facesContext.getViewRoot().findComponent(“inputText2″);
String clientId = ip.getClientId(facesContext);
work ok.