Showing WDK Popup from TBO(从TBO中返回错误信息到弹出窗口中)
时间:2010-09-12 来源:毁于随
http://www.mydocumentum.net/knowledge-base/46-programming/173-showing-wdk-popup-from-tbo
It is possible to trigger WDK popup from TBO, here is the example how to do it.
First you need to write a TBO, for example, we'll check a attribute maturity_date which is a custom attribute, the rule is simple, the value that assigned to this attribute cannot be less than today. Here is the sample code how we can achieve to show error popup once the user input "wrong value" for this attribute
Create a global variable maturityDateError
1 |
private boolean maturityDateError= false; |
Override setString method in the TBO
1 |
@Override |
Override doSave method
1 |
@Override |
Compile your TBO and install it to your repository.
Once it installed on your repository, try to change it using Properties component, the popup error should be like this:
以为是什么高级东西呢吧,其实就是抛个异常出来~~~~