Package org.springmodules.db4o.examples.recipemanager.domain

Examples of org.springmodules.db4o.examples.recipemanager.domain.Recipe


      String idAsString = request.getParameter(RECIPE_ID_ATTRIBUTE);
      if (idAsString != null) {
        long id = Long.parseLong(idAsString);
        return recipeManager.getById(id);
      } else {
        return new Recipe("");
      }
    }
View Full Code Here


        return new Recipe("");
      }
    }
   
    protected ModelAndView onSubmit(Object command) throws Exception {
      Recipe r = (Recipe) command;
      recipeManager.saveRecipe(r);
   
      System.out.println("Saving recipe: " + r.getTitle());
     
    RedirectView view = new RedirectView(getSuccessView());
    view.addStaticAttribute(RECIPE_ID_ATTRIBUTE, Long.valueOf(recipeManager.getId(r)));
   
    System.out.println("Save recipe successfully. id=" + Long.valueOf(recipeManager.getId(r)));
View Full Code Here

TOP

Related Classes of org.springmodules.db4o.examples.recipemanager.domain.Recipe

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.