Code to display the side Menu.
@param out The http output stream.
@param reg Local resource bundle.
@exception DBException File exception.
334729
public void printXmlTrailer(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strTrailer = reg.getString("xmlTrailer");
        if ((strTrailer == null) || (strTrailer.length() == 0))
            strTrailer =
                " <trailer>" +
                " </trailer>";
        out.println(strTrailer);
    }
209848
public void processInputData(PrintWriter out)
        throws DBException
    {
        String strMoveValue = this.getProperty(DBParams.COMMAND);      // Display record
        if (strMoveValue == null)
            strMoveValue = Constants.BLANK;

        String strError = this.getTask().getLastError(0);
        if ((strError != null) && (strError.length() > 0))
            strError = strError + " on " + strMoveValue;
        if ((strError != null) && (strError.length() > 0))
        {
            out.println("<span class=\"error\">Error: " + strError + "</span><br />");
            Record record = ((BasePanel)this.getScreenField()).getMainRecord();
            if (record != null)
                record.setEditMode(Constants.EDIT_NONE);    // Make sure this isn't updated on screen free
        }
        else
        {
            String strMessage = this.getTask().getStatusText(DBConstants.INFORMATION_MESSAGE);
            if (strMessage != null)
                if (strMoveValue.length() > 0)
                    if ((strMessage.length() > 0) && (!(this.getScreenField() instanceof BaseGridScreen))) // TODO localize
                        out.println("<span class=\"information\">" + strMessage + "</span><br />");
        }
    }
1031754
public void createAbout(String name, String version, String targetGoVersion, String description) {
        about = new GoPluginDescriptor.About(name, version, targetGoVersion, description, vendor, targetOperatingSystems);
    }
432912
public void writeExternal(ObjectOutput out) throws IOException
   {
      out.writeInt(eventType);

      byte[] buff = sessionId.getBytes(Constants.DEFAULT_ENCODING);
      out.writeInt(buff.length);
      out.write(buff);

      int listSize = items.size();
      out.writeInt(listSize);
      for (int i = 0; i < listSize; i++)
      {
         out.writeObject(items.get(i));
      }

      if (pairId != null)
      {
         out.writeInt(NOT_NULL_VALUE);
         buff = pairId.getBytes(Constants.DEFAULT_ENCODING);
         out.writeInt(buff.length);
         out.write(buff);
      }
      else
      {
         out.writeInt(NULL_VALUE);
      }
   }
104601
public void printHtmlStartForm(PrintWriter out)
        throws DBException
    {
        String strAction = "post";

        BasePanel modelScreen = (BaseScreen)this.getScreenField();
        int iNumCols = modelScreen.getSFieldCount();
        int iInputCount = 0;
        for (int i = 0; i < iNumCols; i++)
        {
            ScreenField sField = modelScreen.getSField(i);
            if (!sField.isToolbar())
                if (sField.getConverter() != null)
                    if (sField.getConverter().getField() != null)
                    {
                        if (DBParams.PASSWORD.equalsIgnoreCase(sField.getConverter().getField().getFieldName()))
                            iInputCount = 5;    // Always post if password is in the URL
                        iInputCount++;
                    }
        }
        if (iInputCount < 5)
            strAction = "get";
        if (modelScreen instanceof GridScreen)
            if (modelScreen.getEditing() == true)
                strAction = "post";
        out.println("<form action=\"" + modelScreen.getServletPath(null) + "\" method=\"" + strAction + "\">");
        this.addHiddenParams(out, this.getHiddenParams());
    }
811186
protected void renderSelectTag(FacesContext context, ResponseWriter rw, String clientId, String name,
			SelectMultiMenu menu) throws IOException {
		renderSelectTag(rw, menu);
		renderSelectTagAttributes(rw, clientId, name, menu);
        AJAXRenderer.generateBootsFacesAJAXAndJavaScript(FacesContext.getCurrentInstance(), menu, rw, false);
		Object selectedOption = getValue2Render(context, menu);
		String[] optionList;
		if (selectedOption == null) {
			optionList = new String[0];
		} else if (!(selectedOption instanceof String)) {
			throw new FacesException("SelectMultiMenu only works with Strings!");
		} else {
			optionList = ((String) selectedOption).split(",");
		}
		renderOptions(context, rw, optionList, menu);

		renderInputTagEnd(rw);
	}
547936
@Override
	public void printContentHorizontalDivider(ChainWriter out, WebSiteRequest req, HttpServletResponse resp, int[] colspansAndDirections, boolean endsInternal) {
		out.print("  <tr>\n");
		for(int c=0;c<colspansAndDirections.length;c+=2) {
			int direction=c==0?-1:colspansAndDirections[c-1];
			if(direction!=-1) {
				switch(direction) {
					case UP:
						out.print("    <td>&#160;</td>\n");
						break;
					case DOWN:
						out.print("    <td>&#160;</td>\n");
						break;
					case UP_AND_DOWN:
						out.print("    <td>&#160;</td>\n");
						break;
					default: throw new IllegalArgumentException("Unknown direction: "+direction);
				}
			}

			int colspan=colspansAndDirections[c];
			out.print("    <td");
			if(colspan!=1) out.print(" colspan='").print(colspan).print('\'');
			out.print("><hr /></td>\n");
		}
		out.print("  </tr>\n");
	}
1059085
public void printHtmlMenubar(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.MENUBARS)) != UserInfoModel.NO.charAt(0))
        {
            if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.NAVMENUS)) != UserInfoModel.NO_ICONS.charAt(0)) // Applets frequently turn off menu bars temporarly
            {
                String strHTML = reg.getString("htmlHelpMenubar");
                Hashtable<String,String> ht = new Hashtable<String,String>();
// ** HACK ** Call this only once (very expensive)
                String strScreen = this.getProperty(DBParams.SCREEN);
                if (strScreen == null)
                    strScreen = DBConstants.BLANK;
                ht.put(HtmlConstants.SCREEN_TAG, strScreen);
                String strRecord = this.getProperty(DBParams.RECORD);
                if (strRecord == null)
                    strRecord = DBConstants.BLANK;
                ht.put(HtmlConstants.RECORD_TAG, strRecord);
                String strMenu = this.getProperty(DBParams.MENU);
                if (strMenu == null)
                    strMenu = DBConstants.BLANK;
                ht.put(HtmlConstants.MENU_TAG, strMenu);
                strHTML = Utility.replace(strHTML, ht);
                this.writeHtmlString(strHTML, out);
            }
        }
    }
916780
public static void renderIndex(final PrintWriter out, final Collection<? extends HelpPage> pages) {
    checkNotNull(out);
    checkNotNull(pages);

    checkArgument(!pages.isEmpty(), "No help pages to render index");

    // construct a printf format with sizing for showing columns
    int max = pages.stream().mapToInt(page -> page.getName().length()).max().orElse(0);
    String nameFormat = "%-" + max + 's';

    for (HelpPage page : pages) {
      String formattedName = String.format(nameFormat, page.getName());
      out.format("  @{bold %s}", formattedName);

      String description = page.getDescription();
      if (description != null) {
        out.printf("   %s%n", description);
      }
      else {
        out.println();
      }
    }
  }
117322
public void printHtmlNavMenu(PrintWriter out)
        throws DBException
    {
        if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.NAVMENUS)) != UserInfoModel.NO_ICONS.charAt(0))
            super.printHtmlNavMenu(out);
        else
        { // Applets frequently turn off menu bars temporarly
            String strHTML = "\t<tr valign=top>\n\t<td>"; // Default menu = no table items
            out.println(strHTML);
        }
    }
400845
public final static int readMdLinkId(final StringBuilder out, final String in, final int start)
    {
        int pos = start;
        int counter = 1;
        while (pos < in.length())
        {
            final char ch = in.charAt(pos);
            boolean endReached = false;
            switch (ch)
            {
            case '\n':
                out.append(' ');
                break;
            case '[':
                counter++;
                out.append(ch);
                break;
            case ']':
                counter--;
                if (counter == 0)
                {
                    endReached = true;
                }
                else
                {
                    out.append(ch);
                }
                break;
            default:
                out.append(ch);
                break;
            }
            if (endReached)
            {
                break;
            }
            pos++;
        }

        return (pos == in.length()) ? -1 : pos;
    }
884818
public void printEndGridScreenData(PrintWriter out, int iPrintOptions)
    {
        out.println(Utility.endTag(XMLTags.DATA));
    }
407596
public void printControlEndForm(PrintWriter out, int iPrintOptions)
    {
        out.println(Utility.endTag(XMLTags.CONTROLS));
        if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN)
            out.println(Utility.endTag(XMLTags.FOOTING));
        else
            out.println(Utility.endTag(XMLTags.HEADING));
    }
1055504
public void emit(final StringBuilder out, final Block root)
    {
        root.removeSurroundingEmptyLines();

        switch (root.type)
        {
        case RULER:
            this.config.decorator.horizontalRuler(out);
            return;
        case NONE:
        case XML:
            break;
        case HEADLINE:
            this.config.decorator.openHeadline(out, root.hlDepth);
            if (this.useExtensions && root.id != null)
            {
                out.append(" id=\"");
                Utils.appendCode(out, root.id, 0, root.id.length());
                out.append('"');
            }
            out.append('>');
            break;
        case PARAGRAPH:
            this.config.decorator.openParagraph(out);
            break;
        case CODE:
        case FENCED_CODE:
            if (this.config.codeBlockEmitter == null)
            {
                this.config.decorator.openCodeBlock(out);
            }
            break;
        case BLOCKQUOTE:
            this.config.decorator.openBlockquote(out);
            break;
        case UNORDERED_LIST:
            this.config.decorator.openUnorderedList(out);
            break;
        case ORDERED_LIST:
            this.config.decorator.openOrderedList(out);
            break;
        case LIST_ITEM:
            this.config.decorator.openListItem(out);
            if (this.useExtensions && root.id != null)
            {
                out.append(" id=\"");
                Utils.appendCode(out, root.id, 0, root.id.length());
                out.append('"');
            }
            out.append('>');
            break;
        }

        if (root.hasLines())
        {
            this.emitLines(out, root);
        }
        else
        {
            Block block = root.blocks;
            while (block != null)
            {
                this.emit(out, block);
                block = block.next;
            }
        }

        switch (root.type)
        {
        case RULER:
        case NONE:
        case XML:
            break;
        case HEADLINE:
            this.config.decorator.closeHeadline(out, root.hlDepth);
            break;
        case PARAGRAPH:
            this.config.decorator.closeParagraph(out);
            break;
        case CODE:
        case FENCED_CODE:
            if (this.config.codeBlockEmitter == null)
            {
                this.config.decorator.closeCodeBlock(out);
            }
            break;
        case BLOCKQUOTE:
            this.config.decorator.closeBlockquote(out);
            break;
        case UNORDERED_LIST:
            this.config.decorator.closeUnorderedList(out);
            break;
        case ORDERED_LIST:
            this.config.decorator.closeOrderedList(out);
            break;
        case LIST_ITEM:
            this.config.decorator.closeListItem(out);
            break;
        }
    }
466899
public void printScreen(BaseScreen screen, PrintWriter out)
    {
        try {
            ResourceBundle reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.XML_RESOURCE, false);
            String string = XmlUtilities.XML_LEAD_LINE;
            out.println(string);
        
            String strStylesheetPath = screen.getScreenFieldView().getStylesheetPath();
            if (strStylesheetPath != null)
            {
                string = "<?xml-stylesheet type=\"text/xsl\" href=\"" + strStylesheetPath + "\" ?>";
                out.println(string);
            }
            out.println(Utility.startTag(XMLTags.CONTENT_AREA));
        
            screen.printScreen(out, reg);
        
            out.println(Utility.endTag(XMLTags.CONTENT_AREA));
        } catch (DBException ex) {
            ex.printStackTrace();
        }
    }
1100882
public void printHtmlTitle(PrintWriter out, String strTag, String strParams, String strData)
    {
        out.print(m_recDetail.getField(MenusModel.NAME).toString());
    }
1314014
public void printControlEndForm(PrintWriter out, int iPrintOptions)
    {
        BasePanel scrDetail = ((BaseGridScreen)this.getScreenField()).getReportDetail();

        this.printHeadingFootingControls(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN);
        if (scrDetail != null)
        {
            scrDetail.printControl(out, iPrintOptions | HtmlConstants.DETAIL_SCREEN);
        }
        Record record = ((BaseGridScreen)this.getScreenField()).getMainRecord();
        if (record != null)
        	out.println(Utility.endTag(XMLTags.DETAIL));

        BasePanel scrFooting = ((BaseGridScreen)this.getScreenField()).getReportFooting();
        if (scrFooting != null)
        {
            out.println(Utility.startTag(XMLTags.FOOTING));
            scrFooting.printControl(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN);
            out.println(Utility.endTag(XMLTags.FOOTING));
        }

        super.printControlEndForm(out, iPrintOptions);
    }