Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

requestFocus() doesn't work anymore in NW CE 7.1

Hi experts,

I've updated my Web Dynpro application from 2004s to CE 7.1, and now the requestFocus() method calls doen't work anymore.

Thereby it doesn't matter if I use

 IWDViewElement viewElement = view.getElement(focusRequest);
 viewElement.requestFocus();

or

IWDInputField inputElement = (IWDInputField)view.getElement(focusRequest);
	    	inputElement.requestFocus();

Has anybody an idea why?

The complete method looks like this:

  public static void wdDoModifyView(IPrivateCallCenterFormCompView wdThis, IPrivateCallCenterFormCompView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView
    try {
	    String focusRequest = wdContext.currentDlgCallCenterElement().getFocusRequest();
	    
	    if (StringTools.isNotNullOrTrimmedEmpty(focusRequest)) {
	    	
	    	IWDViewElement viewElement = view.getElement(focusRequest);
	    	viewElement.requestFocus();
	    	
	    	wdContext.currentDlgCallCenterElement().setFocusRequest(null);
	    }
	} catch (Exception ex) {
		DlgUtils.logException(ex);
	}
    //@@end
  }

Regards,

Jens

Former Member
Not what you were looking for? View more on this topic or Ask a question