Examples of DataItem


Examples of com.caucho.relaxng.program.DataItem

   * Creates the program (somewhat bogus)
   */
  public Item createItem(GrammarPattern grammar)
    throws RelaxException
  {
    return new DataItem(_type);
  }
View Full Code Here

Examples of com.liferay.faces.alloy.component.dataitem.DataItem

    }

    if (iterateOverDataModel) {

      // Get the first child and use it as a prototype.
      DataItem prototypeChildDataItem = getFirstChildDataItem(dataList);

      if (prototypeChildDataItem == null) {
        logger.warn("Unable to iterate because alloy:dataList does not have an alloy:dataItem child element.");
      }
      else {

        int rowCount = dataList.getRowCount();

        for (int i = 0; i < rowCount; i++) {
          dataList.setRowIndex(i);

          // Encode the starting element that represents the specified child's content.
          responseWriter.startElement(itemTag, prototypeChildDataItem);
          responseWriter.writeAttribute(StringPool.CLASS, styleClass + StringPool.DASH + ITEM,
            StringPool.CLASS);

          // Encode the children of the specified child as the actual content.
          prototypeChildDataItem.encodeAll(facesContext);

          // Encode the closing element for the specified child.
          responseWriter.endElement(itemTag);

          if (facet != null) {
            responseWriter.startElement("dd", uiComponent);
            responseWriter.writeAttribute(StringPool.CLASS, styleClass + StringPool.DASH + DESCRIPTION,
              StringPool.CLASS);
            facet.encodeAll(facesContext);
            responseWriter.endElement("dd");
          }
        }

        dataList.setRowIndex(-1);
      }
    }

    // Otherwise, encode content for each child of the specified dataList.
    else {
      List<UIComponent> children = uiComponent.getChildren();
      int childCount = children.size();

      for (int i = 0; i < childCount; i++) {

        UIComponent child = children.get(i);

        if (child.isRendered() && (child instanceof DataItem)) {
          DataItem childDataItem = (DataItem) child;

          // Encode the starting element that represents the specified child's content.
          responseWriter.startElement(itemTag, childDataItem);
          RendererUtil.encodeStyleable(responseWriter, childDataItem);

          // Encode the children of the specified child as the actual content.
          childDataItem.encodeAll(facesContext);

          // Encode the closing element for the specified child.
          responseWriter.endElement(itemTag);
        }
        else {
View Full Code Here

Examples of com.liferay.faces.alloy.component.dataitem.DataItem

    return childDataItems;
  }

  protected DataItem getFirstChildDataItem(UIData uiData) {

    DataItem prototypeChildType = null;

    List<DataItem> childDataItems = getChildDataItems(uiData);

    if (childDataItems.size() > 0) {
      prototypeChildType = childDataItems.get(0);
View Full Code Here

Examples of cputils.DataItem

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      System.out.println("all size:" + list.size());
View Full Code Here

Examples of cputils.DataItem

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      System.out.println("all size:" + list.size());
View Full Code Here

Examples of cputils.DataItem

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        if (el.attributeValue("ID").indexOf(today) == -1) {
          continue;
        }
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      printMsg(type,"all size:" + list.size());
View Full Code Here

Examples of cputils.DataItem

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + fileName +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        if (StringUtils.isNotBlank(day) && el.attributeValue("ID").indexOf(day) == -1) {
          continue;
        }
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      printMsg(fileName, "^^^^^^all size:" + list.size());
View Full Code Here

Examples of cputils.DataItem

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(day) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), type);
         
          if (utils.addSSCItem(item)) {
            printMsg(id,row.getString("phase") +": "+row.getString("code")+ " insert...");
          }else {
            skipout = true;
View Full Code Here

Examples of cputils.DataItem

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem();
          item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), "blssc");
          if (utils.addSSCItem(item)) {
            System.out.println(row.getString("phase") +": "+row.getString("code")+ " insert...");
          }else {
//            System.err.println(row.getString("phase")+" is inserted!");
            skipout = true;
View Full Code Here

Examples of cputils.DataItem

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), type);
         
          if (utils.addSSCItem(item)) {
            printMsg(id, row.getString("phase") +": "+row.getString("code")+ " insert...");
            dataTipMsg += type + "  " + row.getString("phase") +": "+row.getString("code")+"\r\n";
          }else {
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.