I am using ZK Framework in my project i have plenty of other component inside a div or Window Component ,Can any one tell me how can i disable a Div
or Window
component in certain condition.As i checked there is no any disable
attribute for these components.
Any other way we can i disable
a Div
or Window
otherwise i have to disable each component inside the Div
or Window
or Layout
Here a very easy way to disable all components that implement the
Disable
interface.
@Wire("disable")
private List<Disable> allToDisable;
private disableAll(List<Disable> list){
for(Disable d : list){
d.setDisabled(true);
}
}
You could edit the path of @Wire
to fit your needs,
use a method of Selectors
or any other method
that takes a zk selector path. Just let it end with
"disable"
, so it should select every Component that
implements the interface.