Package org.xrace.model

Examples of org.xrace.model.Publicite


    GregorianCalendar calendar2 = new java.util.GregorianCalendar();
    calendar2.set(2009, 12, 31);
    calendar2.getTime();

    Image img;
    Publicite p;

    img = new Image();
    img.setType("jpb");
    img.setData(readImage(".\\src\\test\\resources\\480x60.jpg"));

    this.getImageService().save(img);

    p = new Publicite();
    p.setDescription("Demo 480x60");
    p.setDtDebut(calendar1.getTime());
    p.setDtFin(calendar2.getTime());
    p.setActif(true);
    p.setFormat(this.getParametreService().find((long) 100));
    p.setImage(img);
    p.setZone(ZoneAffichage.HEADER);
    p.setHauteurOriginale(false);
    p.setLargeurOriginale(false);

    this.getPubliciteService().save(p);

  }
View Full Code Here


    {
      private static final long serialVersionUID = 1L;

      public Page getPage()
      {
        final Publicite publicite = new Publicite();
        return new PubliciteUpdatePage(publicite);
      }

      public Class getPageIdentity()
      {
View Full Code Here

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final Publicite publicite = (Publicite) item.getModelObject();

    item.add(new Label("description", publicite.getDescription()));
    item.add(new Label("dtDebut", publicite.getDtDebutUI()));
    item.add(new Label("dtFin", publicite.getDtFinUI()));
    item.add(new Label("zone", publicite.getZone()));

    if (publicite.getImage() != null)
    {

      BlobImage rscBlob = new BlobImage(publicite.getImage(),
          imageService);
      Image img = new Image("image", rscBlob);

      item.add(img);
    }
    else
    {

      Image img = new Image("image");
      img.setVisible(false);
      item.add(img);

    }

    if (publicite.isActif())
    {
      item.add(new Label("actif", "Oui"));
    }
    else
    {
View Full Code Here

TOP

Related Classes of org.xrace.model.Publicite

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.