JSF中 Target Unreachable, returned null錯誤的解決

zhanghjgnu發表於2010-03-16

頁面程式碼





選擇不同的下拉選單值報錯 Target Unreachable, returned null,感覺莫名奇妙,仔細檢查發現錯誤在Bean沒有初始化。

原bean:

package org.eastwill.view.bean;

public class PatientBasicBean {

private PatientBasic patientBasic;

private PatientComm patientComm;

... ...

改後Bean:

package org.eastwill.view.bean;

public class PatientBasicBean {

private PatientBasic patientBasic = new PatientBasic();
private PatientComm patientComm = new PatientComm();

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11754099/viewspace-1031860/,如需轉載,請註明出處,否則將追究法律責任。

相關文章