Package com.m4f.web.bind.form

Examples of com.m4f.web.bind.form.MediationForm


  @RequestMapping(method=RequestMethod.GET)
  public String getView(Principal currentUser, Model model, Locale locale,
      @RequestHeader(required=false,value="referer") String referer,
      HttpSession session) {
    try {
      MediationForm form = new MediationForm();
      form.setMediationService(this.serviceLocator.getMediatorService().createMediationService());
      form.setProvider(this.serviceLocator.getProviderService().createProvider());
      model.addAttribute("mediation", form);
      model.addAttribute("provinces", this.serviceLocator.getTerritorialService().getAllProvinces(locale));
      session.setAttribute(this.REFERER_PARAM, referer);
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
View Full Code Here


      @RequestHeader(required=false,value="referer") String referer,
      HttpSession session) {
    try {
      MediationService mediationService =
        this.serviceLocator.getMediatorService().getMediationService(mediationId, locale);
      MediationForm form = new MediationForm();
      form.setMediationService(mediationService);
      form.setLongitude(mediationService.getGeoLocation().getLongitude());
      form.setLatitude(mediationService.getGeoLocation().getLatitude());
      //TODO aunque no sea un servicio de mediacion automatico también tiene un proveedor asociado.
      Provider provider = this.serviceLocator.getProviderService().createProvider();
      if(mediationService.getHasFeed()) {
        provider = this.serviceLocator.getProviderService().findProviderByMediator(mediationService, locale);
      }
      form.setProvider(provider);
      form.addMembers(this.serviceLocator.getUserService().findUsersByMediationService(mediationService));
      model.addAttribute("mediation", form);
      model.addAttribute("provinces", this.serviceLocator.getTerritorialService().getAllProvinces(locale));
      session.setAttribute(this.REFERER_PARAM, referer);
    }catch(Exception e) {
      this.viewHelper.errorManagement(e);
View Full Code Here

TOP

Related Classes of com.m4f.web.bind.form.MediationForm

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.