teamcenter中 import com.teamcenter.rac.commonclient.date.DateComponent;的使用

 渲染:

Date date = null;
TCPropertyDescriptor descriptor= property.getDescriptor();
String propertyname = descriptor.getName();
if ("EOL_Date".equals(propertyname)) {
// DateComponent a = new DateComponent();
date = property.getDateValue();
propertyRenderer = new DateComponent();
date = property.getDateValue();
if (flag)
((DateComponent) propertyRenderer).setMandatory(true);
((DateComponent) propertyRenderer).setDate(date);
if (date == null)
((DateComponent) propertyRenderer).setDate((Date) null);

break;

} else {
TCDateFormat tcdateformat = new TCDateFormat((TCSession) property.getTCComponent().getSession());
propertyRenderer = new DateButton(tcdateformat);
date = property.getDateValue();
if (flag)
((DateButton) propertyRenderer).setMandatory(true);
((DateButton) propertyRenderer).setDate(date);
if (date == null)
((DateButton) propertyRenderer).setDate((Date) null);
}

posted on 2024-03-29 10:12  songsonglailou  阅读(22)  评论(0)    收藏  举报

导航