Examples of XRaceSession


Examples of org.xrace.view.session.XRaceSession

  }

  @Override
  public XRaceSession newSession(Request request, Response response)
  {
    return new XRaceSession(request);
  }
View Full Code Here

Examples of org.xrace.view.session.XRaceSession

  public MesCoursesListView(final String id)
  {
    super(id);

    final XRaceSession session = (XRaceSession) getSession();

    setList(inscriptionService.findInSaisonActiveApprovedByPersonne(session
        .getPersonne()));
  }
View Full Code Here

Examples of org.xrace.view.session.XRaceSession

    {
      this.error("Usager ou mot de passe invalide");
    }
    else
    {
      final XRaceSession session = (XRaceSession) getSession();
      session.setCompte(compte);

      if (compte.getLangue() != null && !compte.getLangue().equals(""))
      {
        session.setLocale(new Locale(compte.getLangue()));
      }

      this.setResponsePage(MemberMainPage.class);
    }
View Full Code Here

Examples of org.xrace.view.session.XRaceSession

  protected void createComponents()
  {
    Form form = new Form("form");

    final XRaceSession session = getXRaceSession();
    final Cart cart = session.getCart();

    form.add(new CartConfirmationListView("cartConfirmationListView"));
    form.add(new CurrencyLabel("total", new PropertyModel(cart, "total")));
    form.add(new CurrencyLabel("sousTotal", new PropertyModel(cart,
        "sousTotal")));
    form.add(new CurrencyLabel("escompte", new PropertyModel(cart,
        "escompte")));
    form.add(new CheckBox("acceptedConditions", new PropertyModel(this,
        "acceptedConditions")));

    form.add(new TextArea("conditions", new Model(ResourceBundle.getBundle(
        "org/xrace/XRaceApplication").getString("Global.conditions"))));
    form.add((new Label("policyTitle", new ResourceModel(
        "Global.policyTitle"))));
    form.add((new MultiLineLabel("policy", new ResourceModel(
        "Global.policy"))));

    form.add(new Button("pay", new ResourceModel("pay"))
    {
      private static final long serialVersionUID = 3534043602619164257L;

      @Override
      public void onSubmit()
      {
        if (cart.getItems().size() < 1)
        {
          error(getLocalizer().getString("emptyCartError", this));
        }
        else if (!acceptedConditions)
        {
          error(getLocalizer().getString("mustAcceptConditionsError",
              this));
        }
        else
        {
          // Création de la facture avec les items du panier d'achats

          final Facture facture = factureService.createFacture(
              session.getPersonne(), session.getCart());

          session.getCart().clear();

          final Transaction transaction = transactionService
              .createTransaction(session.getPersonne(), facture);
          final String link = desjardins3Service.runTrx(transaction);

          final RedirectPage url = new RedirectPage(link);
          this.setResponsePage(url);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.