我正在使用ADF BC,並且我有幾個inputTexts。 假設我有以下情景:來自inputText的更新值
步驟1:在三個不同的inputText(it1,it2和it3,所有三個都使用autoSubmit == true)中插入1,2,3。
步驟2:點擊一個按鈕調用誰以下方法:
public String aplicarFiltro() {
Object it1param = null, it2param = null, it3param = null, sos1param = null;
Parametros_IndicadoresLoadAll pila = Parametros_IndicadoresLoadAll.getInstance();
pila.clear();
if(it1.getValue() == null || it1.getValue().toString().isEmpty()) {
it1param = "";
} else {
it1param = it1.getValue();
if(it2.getValue() == null || it2.getValue().toString().isEmpty()) {
it2param = "";
} else {
it2param = it2.getValue();
if(it3.getValue() == null || it3.getValue().toString().isEmpty()) {
it3param = "";
} else {
it3param = it3.getValue();
}
}
}
if(sos1.getValue() != null) {
sos1param = sos1.getValue();
}
pila.init(it1param, it2param, it3param, sos1param);
if (it1.getValue() == null || it1.getValue().toString().isEmpty()) {
showPopup(p1, true);
/* } else if (sos3.getValue() == null) {
showPopup(p2, true); */
}
return null;
}
第3步:我抹掉IT2和IT3的價值觀,我再次點擊按鈕和調用相同的方法。但是,it2和it3的值保持不變。
爲什麼會發生這種情況,我該如何解決?
這不能解決我的問題,但你是對的。我需要小心這個 – SaintLike 2015-02-23 11:23:17