public void setToolBar4ErrorStatus(String status) {
   lt.setStyleName("errorMessage");
   lt.setText(status);
   lt.setVisible(true);
 }
Exemple #2
0
  LayoutContainer initProButtons() {

    TableLayout tl = new TableLayout(2);
    lc.setLayout(tl);

    TableData td1 = new TableData();
    td1.setColspan(1);
    TableData td2 = new TableData();
    td2.setColspan(2);

    bsd_add =
        new BcodeSelectDialog<TreeNodeModelData>() {
          public void doposted(List<TreeNodeModelData> modeldatalist) {
            if (modeldatalist.size() > 0) {
              this.setEmptyText("已经选择了数据");

              List<TreeNodeModelData> selectchecklist = bsd_add.getTree().getCheckedSelection();

              if (selectchecklist.size() <= 0) {
                MessageBox.alert("错误", "请选择“离职人员”", null);
                return;
              }
              String bcodestr = "";
              for (TreeNodeModelData tnmd : selectchecklist) {
                BusiObject bo = new BusiObject();

                bcodestr += " systembcode like '" + tnmd.get("systembcode") + "%25' or ";
              }
              bcodestr += " 1=2";
              GWT.log("bcodestr =" + bcodestr);

              String sql =
                  "select icode, bcode,employstatus,leavereason,leavemark,Resignationdate from bcode_job where exists (select * from systembcode_view where systembcode_view.bcode = bcode_job.bcode  and ( "
                      + bcodestr
                      + "))";
              GWT.log("sql =" + sql);
              store.getStoreinfo().setSql(sql);
              store.reload();
            }
          }
        };
    bsd_add.setNeesreselect(false);
    bsd_add.setEmptyText("未选择数据");
    bsd_add.setExpanded();
    bsd_add.setCheckNodes(CheckNodes.BOTH);

    Resignationdate = new DateField();
    Resignationdate.getPropertyEditor().setFormat(DateTimeFormat.getFormat("yyyy-MM-dd"));

    save.addListener(Events.OnClick, getListener());
    lc.add(new LabelField("选择人员:"), td1);
    lc.add(bsd_add, td1);

    lc.add(new LabelField("状态改变为:"), td1);
    lc.add(C_num8, td1);

    lc.add(leavereason_l, td1);
    lc.add(C_num9, td1);

    lc.add(resignationdate_l, td1);
    lc.add(Resignationdate, td1);

    lc.add(mark_l, td1);
    lc.add(mark_t, td1);

    leavereason_l.setVisible(false);
    C_num9.setVisible(false);
    mark_l.setVisible(false);
    mark_t.setVisible(false);
    resignationdate_l.setVisible(false);
    Resignationdate.setVisible(false);

    lc.add(save, td2);

    bsd_add.addListener(Events.Changed, getListener());
    C_num8.addListener(Events.Changed, getListener());
    C_num9.addListener(Events.Changed, getListener());
    mark_t.addListener(Events.Changed, getListener());
    Resignationdate.addListener(Events.Changed, getListener());
    return lc;
  }