Package org.zkoss.zul

Examples of org.zkoss.zul.Listcell


  @Override
  public void render(Listitem item, Object data) throws Exception {

    final Article article = (Article) data;

    Listcell lc = new Listcell(article.getArtNr());
    lc.setParent(item);
    lc = new Listcell(article.getArtKurzbezeichnung());
    lc.setParent(item);
    lc = new Listcell(article.getArtPreis().toString());
    lc.setStyle("text-align: right");
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
    // img.setSrc("/images/icons/page_detail.gif");
    // lc.appendChild(img);
View Full Code Here


  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecGroup group = (SecGroup) data;

    final Listcell lc = new Listcell(group.getGrpShortdescription());
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
    // img.setSrc("/images/icons/page_detail.gif");
    // lc.appendChild(img);
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final DummyBean dummyBean = (DummyBean) data;

    Listcell lc;

    lc = new Listcell();
    final Hbox hbox = new Hbox();
    hbox.setParent(lc);

    /* Flag-image */
    final Image img = new Image();
    final String path = "/images/countrycode_flags/";
    final String flag = StringUtils.lowerCase(dummyBean.getCountry()) + ".gif";
    img.setSrc(path + flag);
    hbox.appendChild(img);

    final Separator sep = new Separator();
    hbox.appendChild(sep);

    /* Country */
    final Label label = new Label();
    label.setValue(dummyBean.getCountry());
    hbox.appendChild(label);
    lc.setParent(item);

    lc = new Listcell(dummyBean.getCountryName());
    lc.setParent(item);

    lc = new Listcell(dummyBean.getTotalCount().toString());
    lc.setStyle("text-align: right");
    lc.setParent(item);

    item.setAttribute("data", data);
    // ComponentsCtrl.applyForward(img, "onClick=onImageClicked");
    // ComponentsCtrl.applyForward(item, "onClick=onClicked");
    // ComponentsCtrl.applyForward(item, "onDoubleClick=onDoubleClicked");
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecRight right = (SecRight) data;

    Listcell lc = new Listcell();
    final Checkbox cb = new Checkbox();

    // get the role for which we pull the data
    final SecGroup group = this.parentController.getSelected();

    if (group != null) {
      if (getSecurityService().isRightinGroup(right, group)) {
        cb.setChecked(true);
      } else {
        cb.setChecked(false);
      }
    } else {
      cb.setChecked(false);
    }

    lc.appendChild(cb);
    lc.setParent(item);

    lc = new Listcell(right.getRigName());
    lc.setParent(item);

    final SecTyp typ = getSecurityService().getTypById(right.getRigType().intValue());
    lc = new Listcell(String.valueOf(typ.getStpTypname()));
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
    // img.setSrc("/images/icons/page_detail.gif");
    // lc.appendChild(img);
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecRole role = (SecRole) data;
    Listcell lc;

    lc = new Listcell(role.getRolShortdescription());
    lc.setStyle("padding-left: 5px");
    lc.setParent(item);

    lc = new Listcell(role.getRolLongdescription());
    lc.setStyle("padding-left: 5px");
    lc.setParent(item);

    item.setAttribute("data", data);
    ComponentsCtrl.applyForward(item, "onDoubleClick=onRoleItemDoubleClicked");

  }
View Full Code Here

      @Override
      public void render(Listitem item, Object data) throws Exception {

        YoutubeLink youtubeLink = (YoutubeLink) data;

        Listcell lc;

        lc = new Listcell(youtubeLink.getInterpret());
        lc.setParent(item);
        lc = new Listcell(youtubeLink.getTitle());
        lc.setParent(item);

        item.setAttribute("data", data);
        ComponentsCtrl.applyForward(item, "onDoubleClick=onDoubleClicked");
      }
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecGroupright groupRight = (SecGroupright) data;

    Listcell lc = null;
    lc = new Listcell(groupRight.getSecGroup().getGrpShortdescription());
    lc.setParent(item);
    lc = new Listcell(groupRight.getSecRight().getRigName());
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
    // img.setSrc("/images/icons/page_detail.gif");
    // lc.appendChild(img);
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecLoginlog log = (SecLoginlog) data;

    Listcell lc;
    final LoginStatus loginStatus = getLoginLoggingService().getTypById(log.getLglStatusid());

    lc = new Listcell(getDateTime(log.getLglLogtime()));

    if (log.getLglStatusid() == 0) {
      lc.setStyle("color:red");
    }
    lc.setParent(item);

    lc = new Listcell(log.getLglLoginname());
    if (log.getLglStatusid() == 0) {
      lc.setStyle("color:red");
    }
    lc.setParent(item);

    lc = new Listcell(loginStatus.getStpTypname());
    if (log.getLglStatusid() == 0) {
      lc.setStyle("color:red");
    }
    lc.setParent(item);

    // lc = new Listcell(log.getLglIp());
    // truncate the IP for privacy
    lc = new Listcell(truncateIPForPrivacy(log.getLglIp()));
    if (log.getLglStatusid() == 0) {
      lc.setStyle("color:red");
    }
    lc.setParent(item);

    /* Country Code / Flag+Short+Provider-City */
    final String currentIp = log.getLglIp();
    final Ip2Country ip2 = log.getIp2Country();

    if (ip2 != null) {
      lc = new Listcell();
      final Hbox hbox = new Hbox();
      hbox.setParent(lc);

      // Fill with the related data for CountryCode
      final CountryCode cc = ip2.getCountryCode();
      if (cc != null) {
        /* Flag-image */
        final Image img = new Image();
        final String path = "/images/countrycode_flags/";
        final String flag = StringUtils.lowerCase(cc.getCcdCode2()) + ".gif";
        img.setSrc(path + flag);
        hbox.appendChild(img);

        final Separator sep = new Separator();
        hbox.appendChild(sep);

        /* Country */
        final Label label = new Label();
        label.setValue(cc.getCcdCode2());
        hbox.appendChild(label);

        // show other stuff from the Ip2Country
        /* Provider-City */
        final Label label2 = new Label();
        if (StringUtils.isNotBlank(ip2.getI2cCity())) {
          label2.setValue("(" + ip2.getI2cCity() + ")");
        } else {
          label2.setValue("");
        }

        hbox.appendChild(label2);
      }

      lc.setParent(item);

    } else {
      lc = new Listcell();
      final Hbox hbox = new Hbox();
      hbox.setParent(lc);

      /* Flag-image */
      final Image img = new Image();
      final String path = "/images/countrycode_flags/";
      final String flag = "xx.gif";
      img.setSrc(path + flag);
      hbox.appendChild(img);
      final Label label = new Label();
      label.setValue("Unknown");
      hbox.appendChild(label);

      lc.setParent(item);

    }

    /* Session-ID */
    lc = new Listcell(log.getLglSessionid());
    if (log.getLglStatusid() == 0) {
      lc.setStyle("color:red");
    }
    lc.setParent(item);

    item.setAttribute("data", data);
    // ComponentsCtrl.applyForward(img, "onClick=onImageClicked");
    // ComponentsCtrl.applyForward(item, "onClick=onClicked");
    // ComponentsCtrl.applyForward(item, "onDoubleClick=onDoubleClicked");
View Full Code Here

    @Override
    public void render(Listitem item, Object data) throws Exception {

      ApplicationNews applicationNews = (ApplicationNews) data;

      Listcell lc;
      Label lb;

      lc = new Listcell();
      lc.setStyle("text-align: left; padding-left: 3px;");
      lb = new Label();
      lb.setParent(lc);
      lb.setValue(ZksampleDateFormat.getDateFormater().format(applicationNews.getDate()));
      lc.setParent(item);

      lc = new Listcell();
      lc.setStyle("text-align: left; padding-left: 3px;");
      lb = new Label();
      lb.setParent(lc);
      lb.setValue(applicationNews.getText().toString());
      lc.setParent(item);

      item.setValue(data);
      // ComponentsCtrl.applyForward(item,
      // "onDoubleClick=onDoubleClicked");
    }
View Full Code Here

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final GuestBook guestBook = (GuestBook) data;

    Listcell lc = null;

    lc = new Listcell(getFormattedDateTime(guestBook.getGubDate()));
    lc.setParent(item);
    lc = new Listcell(guestBook.getGubUsrname());
    lc.setParent(item);
    lc = new Listcell(guestBook.getGubSubject());
    lc.setParent(item);

    item.setValue(data);
    ComponentsCtrl.applyForward(item, "onDoubleClick=onDoubleClickedGuestBookItem");
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listcell

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.