Exemplo n.º 1
0
 public static void save(Project project) {
   System.out.println("---> " + project.isPersistent());
   Logger.warn("Next warning is intended!");
   project.save();
   validation.keep();
   show(project.id);
 }
Exemplo n.º 2
0
 public static void withMap(String companyId) {
   Company company = Company.findById(companyId);
   Project project = new Project();
   project.companies = new HashMap();
   project.companies.put(company.name, company);
   project.create();
   render("@show", project);
 }
Exemplo n.º 3
0
 public static void editMapAndSave(Long id) {
   Project project = Project.findById(id);
   project.companies.get("zenexity").name = "Coucou";
   project.save();
   show(id);
 }
Exemplo n.º 4
0
 public static void show(Long id) {
   Project project = Project.findById(id);
   render(project);
 }
Exemplo n.º 5
0
 // #1195 Use @Valid to trigger the validation before the action-invoking
 public static void create(@Valid Project project) {
   System.out.println(project);
   project.create();
   show(project.id);
 }