Examples of Choix


Examples of org.xrace.model.Choix

  private void createTestChoix(final Evenement evenement)
  {
    //On crée des choix pour l'événement du Mont-Ste-Anne.
    if (evenement.getNo().equals(new Integer(4)))
    {
      Choix choix;

      choix = new Choix(evenement, "Amène un ami", 0.0, false, true,
          "Entrez le nom de l'ami : ");
      getChoixService().save(choix);

      choix = new Choix(evenement, "Amène ta gang", 0.0, false, true,
          "Entrez le nom des personnes dans ta gang : ");
      getChoixService().save(choix);

      choix = new Choix(evenement, "BBQ", 10.0, false, false, "");
      getChoixService().save(choix);

      choix = new Choix(evenement, "BBQ (invité)", 12.0, true, false, "");
      getChoixService().save(choix);

      choix = new Choix(evenement, "BBQ (enfant)", 5.0, true, false, "");
      getChoixService().save(choix);

      choix = new Choix(evenement, "Navette (Québec)", 9.0, false, false,
          "");
      getChoixService().save(choix);

      choix = new Choix(evenement, "Navette (Lévis)", 7.0, false, false,
          "");
      getChoixService().save(choix);
    }
  }
View Full Code Here

Examples of org.xrace.model.Choix

  {

    Image img;

    img = this.getImageService().getImageById(1);
    Choix choix;
    choix = new Choix();
    choix.setDescription(("Brosen_city_bicycle"));
    choix.setDetail("Une vieux vélo");
    choix.setPrix(152.3);
    choix.setInactif(false);
    choix.setQuantite(false);
    choix.setTextField(false);
    choix.setImage(img);
    getChoixService().save(choix);

    img = this.getImageService().getImageById(2);

    choix = new Choix();
    choix.setDescription(("Draisine"));
    choix.setDetail("La draisienne de 1817 possédait deux roues alignées, reliées à un cadre en bois par des fourches, la roue avant pouvant pivoter latéralement.");
    choix.setPrix(25.0);
    choix.setInactif(false);
    choix.setQuantite(false);
    choix.setTextField(false);
    choix.setImage(img);
    getChoixService().save(choix);

    img = this.getImageService().getImageById(3);

    choix = new Choix();
    choix.setDescription(("Honda_mountain_bike"));
    choix.setDetail("Vélo tout terrain extrême");
    choix.setPrix(125.0);
    choix.setInactif(false);
    choix.setQuantite(false);
    choix.setTextField(false);
    choix.setImage(img);
    getChoixService().save(choix);

    img = this.getImageService().getImageById(4);

    choix = new Choix();
    choix.setDescription(("RacingBicycle"));
    choix.setDetail("Vélo de course classique");
    choix.setPrix(48.56);
    choix.setInactif(false);
    choix.setQuantite(false);
    choix.setTextField(false);
    choix.setImage(img);
    getChoixService().save(choix);

    img = this.getImageService().getImageById(5);

    choix = new Choix();
    choix.setDescription(("Tandem"));
    choix.setDetail("Les deux cyclistes sont situés sur la même ligne, l'un derrière l'autre");
    choix.setPrix(458.6);
    choix.setInactif(false);
    choix.setQuantite(false);
    choix.setTextField(false);
    choix.setImage(img);
    getChoixService().save(choix);

  }
View Full Code Here

Examples of org.xrace.model.Choix

  private void createComponents()
  {
    final Form form = new Form("ArticleVenteSimpleForm",
        new CompoundPropertyModel(getModel()));

    final Choix choix = (Choix) getModelObject();

    form.add(new Label("description"));
    form.add(new Label("detail"));
    form.add(new Label("prix"));

    Image img;

    if (choix.getImage() != null)
    {
      BlobImage rscBlob = new BlobImage(choix.getImage(), imageService);
      img = new Image("image", rscBlob);
    }
    else
    {
      img = new Image("image");
      img.setVisible(false);
    }

    PageLink linkZoom;

    linkZoom = new PageLink("linkZoom", new IPageLink()
    {
      private static final long serialVersionUID = 1L;

      public Page getPage()
      {
        return new ImagePage(choix.getImage());
      }

      public Class getPageIdentity()
      {
        return ImagePage.class;
      }
    });

    linkZoom.add(img);
    form.add(linkZoom);

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

      @Override
      public void onSubmit()
      {

        if (choix.isTextField() || choix.isAfficherQuestion1()
            || choix.isAfficherQuestion2())
        {
          this.setResponsePage(new ArticleVenteOptionsPage(choix));
        }
        else
        {
View Full Code Here

Examples of org.xrace.model.Choix

    final Tarification tarificationXmxF4 = getTarificationService()
        .findByCourseCategorie(courseXC4, categorieXmxF);
    final Tarification tarificationDssF4 = getTarificationService()
        .findByCourseCategorie(courseDH4, categorieDssF);

    Choix choixAmeneAmi = getChoixService()
        .findChoixByEvenement(evenement4).get(0);
    Choix choixBBQ = getChoixService().findChoixByEvenement(evenement4)
        .get(2);
    Choix choixNavetteLevis = getChoixService().findChoixByEvenement(
        evenement4).get(6);

    final Cart cartNCote1 = new Cart();

    ComposantInscription composantInscription1 = new ComposantInscription(
View Full Code Here

Examples of org.xrace.model.Choix

  @Override
  protected void populateItem(final ListItem item)
  {
    final ChoixDisponible choixDisponible = (ChoixDisponible) item
        .getModelObject();
    final Choix choix = choixDisponible.getChoix();

    final Article article = choixDisponible.getArticle();
    article.setChoix(choix);

    item.add(new Label("description", new PropertyModel(choix,
        "description")));

    item.add(new Label("lblPrix", new ResourceModel("prix"))
        .setVisible(!choix.getPrix().equals(0.0)));
    item.add(new Label("prix", choix.getPrix().toString() + " $")
        .setVisible(!choix.getPrix().equals(0.0)));

    item.add(new Label("lblQty", new ResourceModel("qty")).setVisible(choix
        .isQuantite()));

    final TextField textFieldQty = new TextField("quantite",
        new PropertyModel(article, "quantite"), Integer.class);
    textFieldQty.setVisible(choix.isQuantite());
    item.add(textFieldQty);

    final TextField textFieldValue = new TextField("textFieldValue",
        new PropertyModel(article, "textFieldValue"));
View Full Code Here

Examples of org.xrace.model.Choix

    createComponents();
  }

  private void createComponents()
  {
    final Choix choix = article.getChoix();

    if (choix.getEvenement() != null)
    {
      this.add(new Label("evenement", new PropertyModel(choix
          .getEvenement(),

      "nom")));
      this.add(new Label("saison", new PropertyModel(choix.getEvenement()
          .getSaison(), "annee")));

      this.add(new Label("cycliste", new PropertyModel(article
          .getPersonne(), "string")));

      this.add(new Label("lblCycliste",
          new ResourceModel("labelCycliste")).setVisible(true));
    }
    else
    {
      this.add(new EmptyPanel("evenement"));
      this.add(new EmptyPanel("saison"));
      this.add(new EmptyPanel("cycliste"));
      this.add(new EmptyPanel("lblCycliste"));
    }

    this.add(new Label("description", new PropertyModel(choix,
        "description")));
    this.add(new Label("textFieldValue", new PropertyModel(article,
        "textFieldValue")).setVisible(choix.isTextField()));
    /*this.add(new Label("qtyLabel", new ResourceModel("qty"))
        .setVisible(choix.isQuantite()));
    this.add(new Label("qty", new PropertyModel(article, "quantite"))
        .setVisible(choix.isQuantite()));
    this.add(new Label("prixUnitaireLabel", new ResourceModel(
View Full Code Here

Examples of org.xrace.model.Choix

        //Valider les choix de l'usager.
        for (final ChoixDisponible choixDispo : lstChoixDisponible)
        {
          if (choixDispo.isSelected())
          {
            final Choix choix = choixDispo.getChoix();
            final Article article = choixDispo.getArticle();
            if (choix.isTextField())
            {
              if (article.getTextFieldValue() == null
                  || article.getTextFieldValue().equals(""))
              {
                this.error(getLocalizer().getString(
                    "textFieldMissingError", this,
                    new Model(choix)));
                isValid = false;
              }
            }
            if (choix.isQuantite())
            {
              if (article.getQuantite() == null
                  || article.getQuantite() < 1)
              {
                this.error(getLocalizer().getString("qtyError",
                    this, new Model(choix)));
                isValid = false;
              }
            }
          }
        }

        if (isValid)
        {
          for (final ChoixDisponible choix : lstChoixDisponible)
          {
            if (choix.isSelected())
            {
              final CartItemArticle cartItemPotentiel = new CartItemArticle(
                  gestionProcessusInscription
                      .getProcessusInscription()
                      .getPersonneAinscrire(), choix
                      .getArticle());
              if (!session.getCart().containsItem(
                  cartItemPotentiel))
              {
                session.getCart().add(cartItemPotentiel,
View Full Code Here

Examples of org.xrace.model.Choix

    {
      private static final long serialVersionUID = 1L;

      public Page getPage()
      {
        final Choix choix = new Choix();
        choix.setEvenement(evenement);
        choix.setPrix(0.0);
        return new ChoixUpdatePage(choix);
      }

      public Class getPageIdentity()
      {
View Full Code Here

Examples of org.xrace.model.Choix

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final Choix choix = (Choix) item.getModelObject();

    item.add(new Label("description"));
    item.add(new Label("prix"));

    if (choix.isQuantite())
    {
      item.add(new Label("quantity", "Oui"));
    }
    else
    {
      item.add(new Label("quantity", "Non"));
    }

    if (choix.isTextField())
    {
      item.add(new Label("textField", "Oui"));
    }
    else
    {
View Full Code Here

Examples of org.xrace.model.Choix

          setFactureLieASecteur.add(saison.getSecteur());
        }
        else if (factureItem.getArticle() != null)
        {
          Article article = factureItem.getArticle();
          Choix choix = article.getChoix();
          Evenement evenement = choix.getEvenement();

          if (evenement != null)
          {
            Saison saison = evenement.getSaison();
            setFactureLieASecteur.add(saison.getSecteur());
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.