Package org.hoteia.qalingo.core.web.servlet

Examples of org.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice


        return modelAndView;
    }
   
    @RequestMapping(value = BoUrls.PERSONAL_EDIT_URL, method = RequestMethod.GET)
    public ModelAndView displayPersonalEdit(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.USER_FORM) UserForm userForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.PERSONAL_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final User currentUser = requestData.getUser();
       
        // User is already set by the abstract
View Full Code Here


@Controller("forgottentPasswordController")
public class ForgottentPasswordController extends AbstractBackofficeQalingoController {

  @RequestMapping(value = BoUrls.FORGOTTEN_PASSWORD_URL, method = RequestMethod.GET)
  public ModelAndView displayForgottenPassword(final HttpServletRequest request, final HttpServletResponse response, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.FORGOTTEN_PASSWORD.getVelocityPage());
   
    modelAndView.addObject("formForgottenPassword", new ForgottenPasswordForm());
   
        return modelAndView;
  }
View Full Code Here

  }
 
  @RequestMapping(value = BoUrls.FORGOTTEN_PASSWORD_URL, method = RequestMethod.POST)
  public ModelAndView forgottenPassword(final HttpServletRequest request, final HttpServletResponse response, @Valid ForgottenPasswordForm forgottenPasswordForm,
      BindingResult result, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), "security/forgotten-password-success");

    if (result.hasErrors()) {
      return displayForgottenPassword(request, response, modelMap);
    }
   
View Full Code Here

@Controller("forbiddenController")
public class ForbiddenController extends AbstractBackofficeQalingoController {

  @RequestMapping(BoUrls.FORBIDDEN_URL)
  public ModelAndView forbidden(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.FORBIDDEN.getVelocityPage());
   
        return modelAndView;
  }
View Full Code Here

@Controller("loginController")
public class LoginController extends AbstractBackofficeQalingoController {

  @RequestMapping(BoUrls.LOGIN_URL)
  public ModelAndView login(final HttpServletRequest request, final Model model) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.LOGIN.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
   
    // SANITY CHECK: User logged
    final User currentUser = requestUtil.getCurrentUser(request);
View Full Code Here

@Controller("errorController")
public class ErrorController extends AbstractBackofficeQalingoController {

  @RequestMapping(BoUrls.ERROR_500_URL)
  public ModelAndView error500(final HttpServletRequest request) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ERROR_500.getVelocityPage());

        return modelAndView;
  }
View Full Code Here

        return modelAndView;
  }

    @RequestMapping(BoUrls.ERROR_400_URL)
    public ModelAndView error400(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ERROR_400.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

        return modelAndView;
    }

    @RequestMapping(BoUrls.ERROR_403_URL)
    public ModelAndView error403(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ERROR_403.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

        return modelAndView;
    }

    @RequestMapping(BoUrls.ERROR_404_URL)
    public ModelAndView error404(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ERROR_404.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

        return modelAndView;
  }
 
  @RequestMapping(value = BoUrls.MASTER_CATEGORY_EDIT_URL, method = RequestMethod.GET)
  public ModelAndView editMasterCatalogCategory(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.CATALOG_CATEGORY_FORM) CatalogCategoryForm catalogCategoryForm) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.MASTER_CATEGORY_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Localization currentLocalization = requestData.getMarketAreaLocalization();
       
    final String catalogCategoryCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_CATEGORY_CODE);

        if(StringUtils.isNotEmpty(catalogCategoryCode)){
            // EDIT MODE
            final CatalogCategoryMaster catalogCategory = catalogCategoryService.getMasterCatalogCategoryByCode(catalogCategoryCode, requestData.getMasterCatalogCode(), new FetchPlan(categoryMasterFetchPlans));
           
            Object[] params = {catalogCategory.getName() + " (" + catalogCategory.getCode() + ")"};
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.MASTER_CATEGORY_EDIT.getKey(), params);
           
            initProductMasterCategoryModelAndView(request, modelAndView, catalogCategory);
           
        } else {
            // ADD/CREATE MODE
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.MASTER_CATEGORY_ADD.getKey(), null);
        }
       
    modelAndView.addObject("categories", buildCategories(requestData, catalogCategoryCode));

        modelAndView.addObject("availableGlobaleAttributeDefinitions", backofficeViewBeanFactory.buildListViewBeanAttributeDefinition(requestData, attributeService.findCatalogCategoryGlobalAttributeDefinitions()));
        modelAndView.addObject("availableMarketAreaAttributeDefinitions", backofficeViewBeanFactory.buildListViewBeanAttributeDefinition(requestData, attributeService.findCatalogCategoryMarketAreaAttributeDefinitions()));

        modelAndView.addObject(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.MASTER_CATALOG, requestData));

    return modelAndView;
  }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice

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.