/** 编辑时初始化内容 */ private void initNoticeInfo() { NoticeInfo noticeInfo = (NoticeInfo) this.getArgument(); if (null != noticeInfo) { deptGuidStr = noticeInfo.getDeptGuidList() == null ? "" : StringUtils.join(noticeInfo.getDeptGuidList().iterator(), ","); noticeTitleText.setText(noticeInfo.getNoticeTitle()); isTopCheckBox.setSelection(noticeInfo.getIsTop()); deptNameStrText.setText(noticeInfo.getDeptNameStr()); publishingDate.setDate( noticeInfo.getPublishTime() == 0 ? null : new Date(noticeInfo.getPublishTime())); cancelDate.setDate( noticeInfo.getCancelTime() == 0 ? null : new Date(noticeInfo.getCancelTime())); noticeContentText.setContent(noticeInfo.getNoticeContent()); } }
/** 初始化界面组件 */ private void initUIComponent() { // 公告标题 noticeTitleText = this.createControl(ID_Text_NoticeTile, Text.class, JWT.NONE); // 是否置顶 isTopCheckBox = this.createControl(ID_CheckBox_IsTop, Button.class, JWT.NONE); // 发布范围 deptNameStrText = this.createControl(ID_Text_DeptNameStr, Text.class, JWT.NONE); // 发布日期 publishingDate = this.createControl(ID_Date_Publishing, DatePicker.class, JWT.NONE); publishingDate.setDate(new Date()); // 撤消日期 cancelDate = this.createControl(ID_Date_Cancel, DatePicker.class, JWT.NONE); // 公告内容 noticeContentText = this.createControl(ID_Text_Content, HtmlEditor.class, JWT.NONE); // 保存按钮 saveButton = this.createControl(ID_Button_Save, Button.class, JWT.NONE); }