|
|
|
@ -9,22 +9,21 @@ import org.zkoss.bind.annotation.NotifyChange;
|
|
|
|
|
|
|
|
|
|
public class RequirementSubpage<T extends RequirementBase> extends ListViewModel<T> {
|
|
|
|
|
|
|
|
|
|
protected RequirementBaseService<T> reqService;
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void init() {
|
|
|
|
|
reqService = (RequirementBaseService<T>) service;
|
|
|
|
|
private RequirementBaseService<T> getReqService()
|
|
|
|
|
{
|
|
|
|
|
return (RequirementBaseService<T>) service;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void loadLazyData(T data) {
|
|
|
|
|
reqService.loadAuthItems(data);
|
|
|
|
|
this.getReqService().loadAuthItems(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Command
|
|
|
|
|
@NotifyChange("dataBean")
|
|
|
|
|
public void approve() {
|
|
|
|
|
reqService.approve(getDataBean());
|
|
|
|
|
this.getReqService().approve(getDataBean());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -35,11 +34,9 @@ public class RequirementSubpage<T extends RequirementBase> extends ListViewModel
|
|
|
|
|
|
|
|
|
|
public boolean isCanApprove() {
|
|
|
|
|
if (getDataBean() != null) {
|
|
|
|
|
return reqService.canApprove(getDataBean());
|
|
|
|
|
return this.getReqService().canApprove(getDataBean());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|