IDEMPIERE-558 Zk: Prevent user from clicking button twice and firing redundant requests.

This commit is contained in:
Heng Sin Low 2013-01-16 13:09:54 +08:00
parent f66a728b74
commit 8619761edf
2 changed files with 6 additions and 1 deletions

View File

@ -37,11 +37,13 @@ public class Button extends org.zkoss.zul.Button
public Button() public Button()
{ {
super(); super();
setAutodisable("self");
} }
public Button(String label) public Button(String label)
{ {
super(label); super(label);
setAutodisable("self");
} }
public void setName(String name) public void setName(String name)

View File

@ -32,7 +32,9 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
private boolean pressed; // Elaine 2008/12/09 private boolean pressed; // Elaine 2008/12/09
public ToolBarButton() {} public ToolBarButton() {
setAutodisable("self");
}
@Override @Override
public void setDisabled(boolean disabled) { public void setDisabled(boolean disabled) {
@ -72,6 +74,7 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
public ToolBarButton(String name) { public ToolBarButton(String name) {
super(); super();
this.name = name; this.name = name;
setAutodisable("self");
} }
public String getName() { public String getName() {