ZK Disbale Div,Window,Layout 组件? [英] ZK Disbale Div,Window,Layout Component?
问题描述
我在我的项目中使用 ZK 框架 我在 div 或 Window 组件中有很多其他组件,谁能告诉我如何禁用 Div
或Window
组件在某些条件下.正如我检查的那样,这些组件没有任何 disable
属性.
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.
我们可以禁用
一个Div
或Window
的任何其他方式,否则我必须禁用Div
中的每个组件code> 或 Window
或 Layout
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);
}
}
您可以编辑@Wire
的路径以满足您的需要,
使用Selectors<的方法/code>
或任何其他方法
这需要一个 zk 选择器路径.就让它以
结尾禁用"
,所以它应该选择每个
实现接口.
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.
这篇关于ZK Disbale Div,Window,Layout 组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!