Example #1
0
 @Action(
     value = "department.cutSalariesOfDepartment",
     results = {@Result(name = "detail", location = "department-detail.jsp")})
 public String cutSalariesOfSubunit() throws Exception {
   department = CompanyService.instance().findDepartment(department.getId());
   department.cut();
   return "detail";
 }
Example #2
0
  @Action(
      value = "department.update",
      results = {@Result(name = "detail", location = "department-detail.jsp")})
  public String update() {
    // ok, it might sound a bit redundant, but if we change the
    // persistence mechanism to a database, all these
    // lines would be necessary.

    Department old = CompanyService.instance().findDepartment(department.getId());

    old.setName(department.getName());
    old.setManager(department.getManager());

    department = old;
    message = "The department data was updated.";
    return "detail";
  }