Examples of Writer


Examples of java.io.Writer

      throws TeiidComponentException, TeiidProcessingException {       
      boolean success = false;
      final FileStore lobBuffer = bufferMgr.createFileStore("xml"); //$NON-NLS-1$
      FileStoreInputStreamFactory fsisf = new FileStoreInputStreamFactory(lobBuffer, Streamable.ENCODING);
      try
        Writer writer = fsisf.getWriter();
          translator.translate(writer);
          writer.close();
          success = true;
          return new SQLXMLImpl(fsisf);
      } catch(IOException e) {
          throw new TeiidComponentException(e);
      } catch(TransformerException e) {
View Full Code Here

Examples of java.io.Writer

            IOException, XQueryException {
        XQEngine engine = new XQEngineClient(remoteEndpoint);
        String query = IOUtils.toString(new FileInputStream(fileName));
        QueryRequest request = new QueryRequest(query, ReturnType.ASYNC_REMOTE_SEQUENCE);
        Sequence<Item> resultSeq = (Sequence<Item>) engine.execute(request);
        Writer writer = new FastBufferedWriter(new OutputStreamWriter(System.out), 4096);
        SAXWriter saxwr = new SAXWriter(writer, "UTF-8");
        Serializer ser = new SAXSerializer(saxwr, writer);
        ser.emit(resultSeq);
        writer.flush();
    }
View Full Code Here

Examples of java.io.Writer

   public void processRender(WebuiRequestContext context) throws Exception
   {
      if (getChildren() == null || getChildren().size() < 1)
         createUIFormInput(0);

      Writer writer = context.getWriter();

      UIForm uiForm = getAncestorOfType(UIForm.class);
      int size = getChildren().size();
      //    ResourceBundle res = context.getApplicationResourceBundle() ;

      for (int i = 0; i < size; i++)
      {
         UIFormInputBase uiInput = getChild(i);
         writer.append("<div class=\"MultiValueContainer\">");

         uiInput.setEditable(!readonly_);
         uiInput.setEnable(enable_);

         uiInput.processRender(context);

         if ((size >= 2) || ((size == 1) && (uiInput.getValue() != null)))
         {
            writer.append("<img onclick=\"");
            writer.append(uiForm.event("Remove", uiInput.getId())).append("\" title=\"Remove Item\" alt=\"\"");
            writer
               .append(" class=\"MultiFieldAction Remove16x16Icon\" src=\"/eXoResources/skin/sharedImages/Blank.gif\" />");
         }
         if (i == size - 1)
         {

            writer.append("<img onclick=\"");
            writer.append(uiForm.event("Add", getId())).append("\" title=\"Add Item\" alt=\"\"");
            writer
               .append(" class=\"MultiFieldAction AddNewNodeIcon\" src=\"/eXoResources/skin/sharedImages/Blank.gif\" />");
         }
         writer.append("</div>");
      }
   }
View Full Code Here

Examples of java.io.Writer

      }
   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      Writer w = context.getWriter();
      w.write("<input type='checkbox' name='");
      w.write(name);
      w.write("'");
      w.write(" value='");
      if (value_ != null)
         w.write(String.valueOf(value_));
      w.write("' ");
      if (onchange_ != null)
      {
         UIForm uiForm = getAncestorOfType(UIForm.class);
         w.append(" onclick=\"").append(renderOnChangeEvent(uiForm)).append("\"");
      }
      if (checked)
         w.write(" checked ");
      if (!enable_)
         w.write(" disabled ");
      w.write(" class='checkbox'/>");
      if (this.isMandatory())
         w.write(" *");
   }
View Full Code Here

Examples of java.io.Writer

   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      context.getJavascriptManager().addJavascript("eXo.webui.UICombobox.init('" + getId() + "');");
      Writer w = context.getWriter();
      String options = "[";
      String text =
         "<div class='UIComboboxComponent'><div class='UIComboboxList'><div class='UIComboboxContainer'><div class='UIComboboxItemContainer'>";
      for (SelectItemOption item : options_)
      {
         options += "'" + item.getLabel() + "',";
         text +=
            "<a href='javascript:void(0);' onclick='eXo.webui.UICombobox.getValue(this);' value='" + item.getValue()
               + "' class='UIComboboxItem'>";
         text += "<div class='UIComboboxIcon'>";
         text += "<div class='UIComboboxLabel'>" + item.getLabel() + "</div>";
         text += "</div>";
         text += "</a>";
      }
      text += "</div></div></div>";
      options = options.substring(0, options.length() - 1) + "]";
      text += "<input type='hidden'  name='" + getName() + "' id='" + getId() + "'";
      if (value_ != null && value_.trim().length() > 0)
      {
         text += " value='" + encodeValue(value_).toString() + "'";
      }
      text += " />";
      text +=
         "<input class='UIComboboxInput' options=\"" + options
            + "\" onkeyup='eXo.webui.UICombobox.complete(this,event);' type='text' " + renderJsActions();
      if(value_ != null && value_.trim().length() > 0)
      {
         text += "value='" + encodeValue(value_).toString() + "'"
      }
     
      text += " /></div>";
      w.write(text);
   }
View Full Code Here

Examples of java.io.Writer

            for (String model : models) {
                Matcher m = p.matcher(model);
                if (m.find()) {
                    String className = m.group().substring("class".length()).trim();
                    File classFile = new File(parentFile, className + ".java");
                    Writer o = new FileWriter(classFile, false);
                    PrintWriter writer = new PrintWriter(new BufferedWriter(o));
                    writer.write(model);
                    writer.close();
                    System.out.println("Generated " + classFile.getAbsolutePath());
                }
View Full Code Here

Examples of java.io.Writer

   public void processRender(WebuiApplication app, WebuiRequestContext context) throws Exception
   {
      WebuiRequestContext pContext = (WebuiRequestContext)context.getParentAppRequestContext();
      if (context.useAjax() && !pContext.getFullRender())
      {
         Writer w = context.getWriter();

         Set<UIComponent> list = context.getUIComponentToUpdateByAjax();
         //      if(list == null) list = app.getDefaultUIComponentToUpdateByAjax(context) ;
         if (list != null)
         {
View Full Code Here

Examples of java.io.Writer

   {
      //TODO: Tung.Pham edded
      //-------------------------
      refresh();
      //-------------------------
      Writer w = context.getWriter();
      w.write("<div class=\"UIUserInGroup\">");
      renderChildren();
      w.write("</div>");
   }
View Full Code Here

Examples of java.io.Writer

      getChild(UIGrid.class).getUIPageIterator().setPageList(new FindMembershipTypesPageList(5));
   }

   public void processRender(WebuiRequestContext context) throws Exception
   {
      Writer w = context.getWriter();
      w.write("<div class=\"UIListMembershipType\">");
      renderChildren();
      w.write("</div>");
   }
View Full Code Here

Examples of java.io.Writer

   }

   @SuppressWarnings("unused")
   public void processRender(WebuiRequestContext context) throws Exception
   {
      Writer w = context.getWriter();
      w.write("<div id=\"UIMembershipManagement\" class=\"UIMembershipManagement\">");
      renderChildren();
      w.write("</div>");
   }
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.