Exemplo n.º 1
0
 /** 编辑时初始化内容 */
 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());
   }
 }
 @SuppressWarnings("unchecked")
 public Object[] getElements(Context context, STableStatus tablestatus) {
   // GetCustomerListKey key = new
   // GetCustomerListKey(PartnerStatus.Potential);
   if (!StringUtils.isEmpty(tablestatus.getSortColumn())) {
     key.setSortField(SortField.valueOf(tablestatus.getSortColumn()));
     if (tablestatus.getSortDirection() == SSortDirection.ASC) {
       key.setSortType(SortType.Asc);
     } else {
       key.setSortType(SortType.Desc);
     }
   }
   ListEntity<CustomerItem> listEntity = context.find(ListEntity.class, key);
   if (listEntity != null) {
     countLabel.setText(String.valueOf(listEntity.getItemList().size()));
     return listEntity.getItemList().toArray();
   }
   countLabel.setText("0");
   return null;
 }