WEB-INF/lib
디렉토리에 primefaces-3.4RC1.jar
을 포함 시켰습니다. 내가 대화 상자를 열 수있는 링크를 클릭하면 내보기PrimeFaces 3.4 RC1, 대화 상자에서 Managed Bean 속성을 인식하지 못합니다.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<div class="contentBox cornerBorder border">
<p:dialog>
<table class="DialogTable">
<tr>
<td><label>Country</label></td>
<h:selectOneMenu required="true" id="contry" styleClass="text-box" value="#{myController.loc.countryId}">
----------------------------------------------------------------------------------------------^here it gives warning and if i run it crashes
</tr>
</table>
</p:dialog>
과 같은
public class Location{
private Integer countryId;
//getters setters
}
처럼
이
@ManagedBean
@RequestScoped
public class MyController{
@Autowired
Location loc;
//other stuff
}
내 Location
클래스의 모양처럼 내 컨트롤러 메신저에서 내 모델 빈을 autowiring에 그 속성 countryId
을 찾을 수 없다는 오류가 발생합니다. 내가 그것을 확인 실행 value="myController.loc.countryId"
을 ... 제거하면 사람이 올바른 방향으로
PS 나를 안내 : 나는 응용 프로그램의 context.xml에서 적절한 항목을 만들었습니다
실제 오류
SEVERE : javax.el.PropertyNotFoundException : 클래스 'com.deltasoft.controller.myCo : /WebPages/personal/personalDiv.xhtml 230,119 값 = "# {myController.loc.countryId}"@ ntroller '속성에' '이 없습니다.
는, 당신은을 필요해야 getter for loc –
@AkselWillgert 질문을 편집하여 자세한 내용을 추가했습니다. 이미 관리 빈에 컨트롤러에 주석을 달고 범위를 정의했습니다. – dakait
하지만 get이 있습니다. 테? 또한 오타라고 생각합니다 : countryID 대 countryId? –