내가 제출 한 값이 당신은 JSF 구현이 사용되는 어디서나 말하지 않았다
null의 경우이 렌더링 논리 모델 값이 렌더링되어 존재하는 클래스를 알고 싶습니다
. 이 대답에서 저는 그것이 모자 라라고 추측 할 것입니다. 이 경우 HtmlBasicRenderer#getCurrentValue()
에서 완료됩니다. 다음은 Mojarra 1.2_15에서 가져온 관련성의 일부입니다.
275 protected String getCurrentValue(FacesContext context,
276 UIComponent component) {
277
278 if (component instanceof UIInput) {
279 Object submittedValue = ((UIInput) component).getSubmittedValue();
280 if (submittedValue != null) {
281 // may not be a String...
282 return submittedValue.toString();
283 }
284 }
285
286 String currentValue = null;
287 Object currentObj = getValue(component);
288 if (currentObj != null) {
289 currentValue = getFormattedValue(context, component, currentObj);
290 }
291 return currentValue;
292
293 }
코드 자체에 대해 설명합니다. 구성 요소가 UIInput
의 인스턴스 인 경우 제출 된 값을 가져옵니다. null
이 아닌 경우 반환하십시오. 다른 방법은 평소와 같이 모델 값을 반환하는 것입니다.
MyFaces도 비슷한 접근 방식을 사용합니다.
감사합니다. BalusC, 귀하의 지원은 매우 유용합니다. – RaoPotla
반갑습니다. – BalusC