检票口 6.x 或 7.x 中的 isTransparentResolver()
isTransparentResolver() in wicket 6.x or 7.x
我有下面的代码需要将其更改为 wicket 6.6,但 isTransparentResolver() 已被删除,我正在尝试根据此 link
https://www.mail-archive.com/commits@wicket.apache.org/msg17546.html
但是没有用,有人有解决以下代码的方法吗?
add(new WebMarkupContainer("bodyElement") {
@Override
public boolean isTransparentResolver() {
return true;
}
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if ((usrLoginHstryList == null || usrLoginHstryList.isEmpty()) &&
(usrChangeHstryList == null || usrChangeHstryList.isEmpty())) {
tag.put("onload", "hideHistoryButtons();");
} else if (usrLoginHstryList == null || usrLoginHstryList.isEmpty()) {
tag.put("onload", "hideUserLoginHstryBtn();");
} else if (usrChangeHstryList == null || usrChangeHstryList.isEmpty()) {
tag.put("onload", "hideUserChngHstryBtn();");
}
}
});
最后我用 TransparentWebMarkupContainer 写了这个
add(new TransparentWebMarkupContainer("bodyElement"){
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if((usrLoginHstryList == null || usrLoginHstryList.isEmpty()) && (usrChangeHstryList == null || usrChangeHstryList.isEmpty())){
tag.put("onload", "hideHistoryButtons();");
}else if(usrLoginHstryList == null || usrLoginHstryList.isEmpty()){
tag.put("onload", "hideUserLoginHstryBtn();");
}else if(usrChangeHstryList == null ||usrChangeHstryList.isEmpty()){
tag.put("onload", "hideUserChngHstryBtn();");
}
}
});
我有下面的代码需要将其更改为 wicket 6.6,但 isTransparentResolver() 已被删除,我正在尝试根据此 link
https://www.mail-archive.com/commits@wicket.apache.org/msg17546.html 但是没有用,有人有解决以下代码的方法吗?
add(new WebMarkupContainer("bodyElement") { @Override public boolean isTransparentResolver() { return true; } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if ((usrLoginHstryList == null || usrLoginHstryList.isEmpty()) && (usrChangeHstryList == null || usrChangeHstryList.isEmpty())) { tag.put("onload", "hideHistoryButtons();"); } else if (usrLoginHstryList == null || usrLoginHstryList.isEmpty()) { tag.put("onload", "hideUserLoginHstryBtn();"); } else if (usrChangeHstryList == null || usrChangeHstryList.isEmpty()) { tag.put("onload", "hideUserChngHstryBtn();"); } } });
最后我用 TransparentWebMarkupContainer 写了这个
add(new TransparentWebMarkupContainer("bodyElement"){
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if((usrLoginHstryList == null || usrLoginHstryList.isEmpty()) && (usrChangeHstryList == null || usrChangeHstryList.isEmpty())){
tag.put("onload", "hideHistoryButtons();");
}else if(usrLoginHstryList == null || usrLoginHstryList.isEmpty()){
tag.put("onload", "hideUserLoginHstryBtn();");
}else if(usrChangeHstryList == null ||usrChangeHstryList.isEmpty()){
tag.put("onload", "hideUserChngHstryBtn();");
}
}
});