2013-04-24 2 views
0

Icefaces 1.8.2의 구성 요소에 포커스를 설정하려하지만 메소드 호출시 구성 요소가 렌더링되지 않아 작동하지 않습니다. 아이디어가 있으십니까?빙면 설정 포커스가 작동하지 않음

JavascriptContext.addJavascriptCall(getContext(), 
       "document.getElementById('"+ getClientId(component) + "').focus();"); 
+0

, 자세한 내용을하시기 바랍니다 제공합니다 .. 어디 선가 이전을 엉망 작품? 뭐라구? 더 많은 코드를 보여주세요. –

+0

분명히 모든 렌더링이 끝난 후입니다. 모든 서버 호출이 끝난 후에이 줄을 배치했는데 Icefaces가이 호출을 실행할 때 아무 생각이 없습니다 –

+0

작업의'oncomplete'에서 javascript 함수를 통해 호출하려고합니까? –

답변

0

이것은 당신이 초점을 추가 할 않는 경우

JavascriptContext.applicationFocus(getContext(), getClientId(component)); 


public static String getClientId(UIComponent component) { 
    return component.getClientId(getContext()); 
} 

public static FacesContext getContext() { 
    return FacesContext.getCurrentInstance(); 
} 
관련 문제