Beispiel #1
0
  /*
   * (non-Javadoc)
   *
   * @see com.hxzy.base.web.window.ActionWindow#onBind()
   */
  @Override
  public void onBind() {

    list = dictService.findByProperty("parent.code", "productCategory");
    binder.loadComponent(combobox);

    if (member != null) {
      companyName.setValue(member.getCompanyName());
      contacts.setValue(member.getContacts());
      joinTime.setValue(member.getJoinTime());
      endTime.setValue(member.getEndTime());

      combobox.setItemRenderer(
          new ComboitemRenderer() {

            public void render(Comboitem item, Object o) throws Exception {
              Dict d = (Dict) o;
              item.setValue(d);
              item.setLabel(d.getName());
              Dict category = member.getCategory();

              if (d.equals(category)) {
                combobox.setSelectedItem(item);
              }
            }
          });
    }
  }
Beispiel #2
0
  /*
   * (non-Javadoc)
   *
   * @see com.hxzy.base.web.window.ActionWindow#onSubmit()
   */
  @Override
  public void onSubmit() {
    Dict category = null;
    if (combobox.getSelectedItem() != null) {
      category = (Dict) combobox.getSelectedItem().getValue();
    }

    member.setCompanyName(companyName.getValue());
    member.setCategory(category);
    member.setContacts(contacts.getValue());
    member.setJoinTime(joinTime.getValue());
    member.setEndTime(endTime.getValue());

    memberService.update(member);

    ((ListWindow) this.getParent()).onFind();
  }
Beispiel #3
0
 /* (non-Javadoc)
  * @see com.hxzy.base.web.window.ActionWindow#toString()
  */
 @Override
 public String toString() {
   return "修改" + member.getCompanyName();
 }