0
下面是如何以編程方式創建一個<h:commandButton>
:編程創建H:的commandButton沒有的onclick = 「processInput(ID)」 援引
private HtmlCommandButton generateButton(String id,String label){
HtmlCommandButton button = (HtmlCommandButton)app.createComponent
(HtmlCommandButton.COMPONENT_TYPE);
button.setId(id);
button.setValue(label);
button.setOnclick("processInput(id)");
return button;
}
當單擊該按鈕時,我需要執行processInput(id)
功能。但是,當我點擊該按鈕時,什麼也沒有發生。
所以後來.....? – Freak
@freak問題是當我點擊按鈕什麼都沒有發生 – Bucks
所以請在你的問題中寫下這個陳述,以便其他人可以清楚地理解這個問題。 – Freak