コード例 #1
0
ファイル: FacesConfigMojo.java プロジェクト: Yazan2/gmaps4jsf
  private void writeComponents(BufferedWriter writer, List components) throws IOException {
    for (Iterator iterator = components.iterator(); iterator.hasNext(); ) {
      Component component = (Component) iterator.next();

      writer.write("\t<component>\n");
      writer.write("\t\t<component-type>" + component.getComponentType() + "</component-type>\n");
      writer.write(
          "\t\t<component-class>" + component.getComponentClass() + "</component-class>\n");
      writer.write("\t</component>\n");
      writer.write("\n");
    }
  }
コード例 #2
0
ファイル: FacesConfigMojo.java プロジェクト: Yazan2/gmaps4jsf
  private void writeRenderers(BufferedWriter writer, List components) throws IOException {
    boolean writeParentTag = true;
    for (Iterator iterator = components.iterator(); iterator.hasNext(); ) {
      Component component = (Component) iterator.next();

      if (component.getRendererType() == null) {
        continue;
      } else if (writeParentTag) {
        writer.write("\t<render-kit>\n");
        writeParentTag = false;
      }

      writer.write("\t\t<renderer>\n");
      writer.write(
          "\t\t\t<component-family>" + component.getComponentFamily() + "</component-family>\n");
      writer.write("\t\t\t<renderer-type>" + component.getRendererType() + "</renderer-type>\n");
      writer.write("\t\t\t<renderer-class>" + component.getRendererClass() + "</renderer-class>\n");
      writer.write("\t\t</renderer>\n");
    }

    if (!writeParentTag) {
      writer.write("\t</render-kit>\n\n");
    }
  }