-
1. a4j:commandButton action not triggered if disabled attribute is used, though the button is enabled
ilya40umov Jan 10, 2011 4:37 AM (in response to dhivyast)I think that "disabled" attribute means that an assigned action will not work. So i don't understand what your problem is. Could you describe what you expect from "disabled" atribute?
-
2. a4j:commandButton action not triggered if disabled attribute is used, though the button is enabled
dhivyast Jan 10, 2011 5:37 AM (in response to ilya40umov)I have checkbox , based on which this command button "Submit" should be enabled. This is done using NewMergerBean.btnDisabled , btnDisabled is a method in my backing bean which returns tru or false based on the checkbox selection. When the checkbox is checked my command button is enabled, and then i click on my command button, which should trigger the action NewMergerBean.saveNewDealInfo. This does not happen. Though the button changes visually but clicking it does not have any effect!
-
3. a4j:commandButton action not triggered if disabled attribute is used, though the button is enabled
ilya40umov Jan 10, 2011 6:27 AM (in response to dhivyast)What is the scope of NewMergerBean? Try to debug btnDisabled getter method and find out if it gets call or not and what it returns.
-
4. a4j:commandButton action not triggered if disabled attribute is used, though the button is enabled
dhivyast Jan 11, 2011 1:18 AM (in response to ilya40umov)NewMergerBean is in request scope. The getter method for btnDisabled is getting called. The isBtnDisabled() method returns false, which enables the Submit button, but on clicking the button its action is not called.Pls help
public boolean isChkBoxChecked() {
return chkBoxChecked;
}public boolean isBtnDisabled() {
System.out.println("In isBtnDisabled" + chkBoxChecked);
return !this.chkBoxChecked;
}public void setChkBoxChecked(boolean chkBoxChecked) {
System.out.println("In setChkBoxChecked" + chkBoxChecked);
this.chkBoxChecked = chkBoxChecked;
} -
5. a4j:commandButton action not triggered if disabled attribute is used, though the button is enabled
ilya40umov Jan 11, 2011 4:24 AM (in response to dhivyast)Try to put NewMergerBean into sessionScope or use a4j:keepAlive. It can help.
Also add rich:messages on your page.