display this screen in html input format.
@return The HTML options.
@exception DBException File exception.
4414
public int getPrintOptions()
        throws DBException
    {
        int iHtmlOptions = HtmlConstants.HTML_DISPLAY;
        if (((BaseGridScreen)this.getScreenField()).getEditing())
            iHtmlOptions |= HtmlConstants.HTML_INPUT;
        String strParamForm = this.getProperty(HtmlConstants.FORMS);        // Display record
        if ((strParamForm == null) || (strParamForm.length() == 0))
            strParamForm = HtmlConstants.BOTHIFDATA;

        // First, move any params up
        boolean bPrintReport = true;
        if ((strParamForm.equalsIgnoreCase(HtmlConstants.INPUT))
            || (strParamForm.equalsIgnoreCase(HtmlConstants.BOTHIFDATA))
            || (strParamForm.equalsIgnoreCase(HtmlConstants.BOTH)))
        {   // For these options, check to see if the input data has been entered.
            bPrintReport = false;
            boolean bScreenFound = false;
            int iNumCols = ((BaseGridScreen)this.getScreenField()).getSFieldCount();
            for (int iIndex = 0; iIndex < iNumCols; iIndex++)
            {
                ScreenField sField = ((BaseGridScreen)this.getScreenField()).getSField(iIndex);
                if (sField instanceof ToolScreen)
                    if ((!(sField instanceof DisplayToolbar)) &&
                        (!(sField instanceof MaintToolbar)) &&
                        (!(sField instanceof MenuToolbar)))
                {   // Output the Input screen
                    HScreenField vField = (HScreenField)sField.getScreenFieldView();
                    if (vField.moveControlInput(Constants.BLANK) == DBConstants.NORMAL_RETURN)  // I already moved them, but I need to know if they were passed
                        bPrintReport = true;
                    bScreenFound = true;
                }
            }
            if (!bScreenFound)
                bPrintReport = true;    // If no screen, say params were entered
            if (!bPrintReport)
                if (this.getProperty(DBConstants.STRING_OBJECT_ID_HANDLE) != null)
                    bPrintReport = true;    // Special Grid with a header record = found
        }
        if (strParamForm.equalsIgnoreCase(HtmlConstants.DISPLAY))
            iHtmlOptions |= HtmlConstants.HTML_DISPLAY;     // No toolbar, print report
        else if (strParamForm.equalsIgnoreCase(HtmlConstants.DATA))
            iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE;   // Toolbar and report
        else if (strParamForm.equalsIgnoreCase(HtmlConstants.INPUT))
            iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE | HtmlConstants.DONT_PRINT_SCREEN; // Toolbar, no report
        else if (strParamForm.equalsIgnoreCase(HtmlConstants.BOTH))
            iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE;   // Toolbar and report
        else if (strParamForm.equalsIgnoreCase(HtmlConstants.BOTHIFDATA))
        {
            iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE;     // Toolscreen is always displayed
            if (!bPrintReport)
                iHtmlOptions |= HtmlConstants.DONT_PRINT_SCREEN;
        }
        return iHtmlOptions;
    }
644022
public void printHtmlMenuEnd(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strHTML = reg.getString("htmlContentEnd");
        strHTML = Utility.replaceResources(strHTML, reg, null, null);
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "</td>";
        out.println(strHTML);

        strHTML = null;
        char ch = HBasePanel.getFirstToUpper(this.getProperty(DBParams.NAVMENUS), ' ');
        if (ch != UserInfoModel.NO_ICONS.charAt(0))
        {
            if (ch == UserInfoModel.ICONS_ONLY.charAt(0))  /** Icons only */
                strHTML = reg.getString("htmlNavIconsOnlyAfterContent");
            if ((strHTML == null) || (strHTML.length() == 0))
                strHTML = reg.getString("htmlNavAfterContent");
            if ((strHTML != null) && (strHTML.length() > 0))
                out.println(strHTML);
        }
        strHTML = reg.getString("htmlTableEnd");
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "</tr>\n</table>";
        out.println(strHTML);
    }
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 />");
        }
    }
707075
@Override
  public String[] getOptions() {
    List<String>    	result;

    result = new ArrayList<String>();

    if (getDebug())
      result.add("-D");

    return result.toArray(new String[result.size()]);
  }
243748
public static void html(StringBuilder sb, String html) {
        for (int i = 0; i < html.length(); i++) {
            char c = html.charAt(i);
            switch (c) {
            case '&':
                sb.append("&amp;");
                break;
            case '"':
                sb.append("&quot;");
                break;
            case '\'':
                sb.append("&apos;");
                break;
            case '<':
                sb.append("&lt;");
                break;
            case '>':
                sb.append("&gt;");
                break;
            default:
                sb.append(c);
            }
        }
    }
1361834
public String html() {
        StringBuilder accum = StringUtil.borrowBuilder();
        html(accum);
        String html = StringUtil.releaseBuilder(accum);
        return NodeUtils.outputSettings(this).prettyPrint() ? html.trim() : html;
    }
581943
public void printHtmlTrailer(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.TRAILERS), 'H');
        if (chMenubar == 'H') if (((BasePanel)this.getScreenField()).isMainMenu())
            chMenubar = 'Y';
        if (chMenubar == 'Y')
        {
            String strNav = reg.getString("htmlTrailer");
            strNav = Utility.replaceResources(strNav, reg, null, null);
            String strScreen = ((BasePanel)this.getScreenField()).getScreenURL();
            strScreen = Utility.encodeXML(strScreen);
            strNav = Utility.replace(strNav, HtmlConstants.URL_TAG, strScreen);
            this.writeHtmlString(strNav, out);
        }
    }
1062751
public int getPrintOptions()
        throws DBException
    {
        int iHtmlOptions = HtmlConstants.HTML_DISPLAY;
        if (((BasePanel)this.getScreenField()).getEditing())
            iHtmlOptions |= HtmlConstants.HTML_INPUT;
        iHtmlOptions |= HtmlConstants.HTML_ADD_DESC_COLUMN;   // Add a desc row (default)
        iHtmlOptions |= HtmlConstants.HTML_IN_TABLE_ROW;        // Yes, you are in a table row (default)

        iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE;
        String strParamForms = this.getProperty(HtmlConstants.FORMS);   // Display record
        if ((strParamForms == null) || (strParamForms.length() == 0))
        {
            strParamForms = Constants.BLANK;
            if (this.getScreenField().isToolbar())
                if ((!(this.getScreenField() instanceof DisplayToolbar)) &&
                (!(this.getScreenField() instanceof MaintToolbar)) &&
                (!(this.getScreenField() instanceof MenuToolbar)) &&
                (!(this.getScreenField() instanceof HelpToolbar)))
                    strParamForms = HtmlConstants.BOTH;
        }
        if (strParamForms.length() > 0) if (!strParamForms.equalsIgnoreCase(HtmlConstants.DATA))
            iHtmlOptions = (iHtmlOptions & (~HtmlConstants.PRINT_TOOLBAR_BEFORE)) | HtmlConstants.PRINT_TOOLBAR_AFTER;
        return iHtmlOptions;
    }
453832
@Override
    public void displayDialog() throws Exception {

        if (getAction() == ACTION_CANCEL) {
            actionCloseDialog();
        }
        JspWriter out = getJsp().getJspContext().getOut();
        out.print("<link rel='stylesheet' type='text/css' href='");
        out.print(getStyleUri(getJsp()));
        out.println("diff.css'>");
        out.println(dialogContentStart(getParamTitle()));
        out.print("<form name='diff-form' method='post' action='");
        out.print(getDialogUri());
        out.println("'>");
        out.println(allParamsAsHidden());
        out.println("</form>");
        out.println("<p>");
        out.println(getDiffOnlyButtonsHtml());

        String onClic1 = "javascript:document.forms['diff-form'].textmode.value = '";
        onClic1 += MODE_TEXT;
        onClic1 += "'; document.forms['diff-form'].submit();";
        String onClic2 = "javascript:document.forms['diff-form'].textmode.value = '";
        onClic2 += MODE_HTML;
        onClic2 += "'; document.forms['diff-form'].submit();";
        out.println(
            getTwoButtonsHtml(
                Messages.get().container(Messages.GUI_DIFF_MODE_TEXT_0).key(getLocale()),
                Messages.get().container(Messages.GUI_DIFF_MODE_HTML_0).key(getLocale()),
                onClic1,
                onClic2,
                MODE_HTML.equals(getParamTextmode())));

        out.println("</p>");
        out.println(dialogBlockStart(null));
        out.println("<table cellspacing='0' cellpadding='0' class='xmlTable'>\n<tr><td><pre style='overflow:auto'>");
        try {
            CmsHtmlDifferenceConfiguration conf = new CmsHtmlDifferenceConfiguration(
                getMode() == CmsDiffViewMode.ALL ? -1 : getLinesBeforeSkip(),
                getLocale());
            String originalSource = getOriginalSource();
            String copySource = getCopySource();
            if (MODE_TEXT.equals(getParamTextmode())) {
                originalSource = CmsHtml2TextConverter.html2text(originalSource, CmsEncoder.ENCODING_ISO_8859_1);
                copySource = CmsHtml2TextConverter.html2text(copySource, CmsEncoder.ENCODING_ISO_8859_1);
            }
            String diff = Diff.diffAsHtml(originalSource, copySource, conf);
            if (CmsStringUtil.isNotEmpty(diff)) {
                out.println(diff);
            } else {
                String htmlDiff = Diff.diffAsHtml(getOriginalSource(), getCopySource(), conf);
                if (CmsStringUtil.isNotEmpty(htmlDiff)) {
                    // extracted text is equal, but html differs
                    out.println(
                        Messages.get().container(Messages.GUI_COMPARE_IDENTICAL_TEXT_DIFFERENT_HTML_0).key(
                            getLocale()));
                } else if (getMode() == CmsDiffViewMode.ALL) {
                    // print original source, if there are no differences
                    out.println(wrapLinesWithUnchangedStyle(
                        CmsStringUtil.substitute(CmsStringUtil.escapeHtml(originalSource), "<br/>", "")));
                }
            }
        } catch (Exception e) {
            out.print(e);
        }
        out.println("</pre></td></tr>\n</table>");
        out.println(dialogBlockEnd());
        out.println(dialogContentEnd());
        out.println(dialogEnd());
        out.println(bodyEnd());
        out.println(htmlEnd());
    }
266327
public String getHtmlFieldParam()
    {
        String strFieldName = this.getScreenField().getSFieldParam(null, false);

        if (this.getScreenField().getParentScreen() instanceof GridScreen)
        { // These are command buttons such as "Form" or "Detail"
            GridScreen gridScreen = (GridScreen)this.getScreenField().getParentScreen();
            Record record = gridScreen.getMainRecord();
            try {
                Object objBookmark = record.getHandle(DBConstants.OBJECT_ID_HANDLE);
                if (objBookmark == null)
                    objBookmark = record.getHandle(DBConstants.BOOKMARK_HANDLE);
                if (objBookmark != null)
                    strFieldName = strFieldName + '@' + objBookmark.toString();
            } catch (DBException ex)    {
                ex.printStackTrace();
            }
        }

        try {
            strFieldName = URLEncoder.encode(strFieldName, DBConstants.URL_ENCODING);
        } catch (java.io.UnsupportedEncodingException ex) {
            ex.printStackTrace();
        }
        return strFieldName;
    }
1351485
@Override
    public int doStartTag() throws JspException {

        if (!maxRowsSpecified) {
	    Object obj = Config.find(pageContext, Config.SQL_MAX_ROWS);
	    if (obj != null) {
		if (obj instanceof Integer) {
		    maxRows = ((Integer) obj).intValue();
		} else if (obj instanceof String) {
		    try {
			maxRows = Integer.parseInt((String) obj);
		    } catch (NumberFormatException nfe) {
                        throw new JspException(Resources.getMessage("SQL_MAXROWS_PARSE_ERROR",
						 (String) obj),
			    nfe);
		    }
		} else {
                    throw new JspException(Resources.getMessage("SQL_MAXROWS_INVALID"));
		}
            }
        }

	try {
	    conn = getConnection();
	} catch (SQLException e) {
	    throw new JspException(sql + ": " + e.getMessage(), e);
	}

	return EVAL_BODY_BUFFERED;
    }
179725
public String toHTML() {
        StringBuilder builder = new StringBuilder();

        int numClasses = classes.size();
        // Header Row
        builder.append("<table>\n");
        builder.append("<tr><th class=\"empty-space\" colspan=\"2\" rowspan=\"2\">");
        builder.append(String.format("<th class=\"predicted-class-header\" colspan=\"%d\">Predicted Class</th></tr>%n",
                        numClasses + 1));

        // Predicted Classes Header Row
        builder.append("<tr>");
        // builder.append("<th></th><th></th>");
        for (T predicted : classes) {
            builder.append("<th class=\"predicted-class-header\">");
            builder.append(predicted);
            builder.append("</th>");
        }
        builder.append("<th class=\"predicted-class-header\">Total</th>");
        builder.append("</tr>\n");

        // Data Rows
        String firstColumnLabel = String.format(
                        "<tr><th class=\"actual-class-header\" rowspan=\"%d\">Actual Class</th>", numClasses + 1);
        for (T actual : classes) {
            builder.append(firstColumnLabel);
            firstColumnLabel = "<tr>";
            builder.append(String.format("<th class=\"actual-class-header\" >%s</th>", actual));

            for (T predicted : classes) {
                builder.append("<td class=\"count-element\">");
                builder.append(getCount(actual, predicted));
                builder.append("</td>");
            }

            // Actual Class Totals Column
            builder.append("<td class=\"count-element\">");
            builder.append(getActualTotal(actual));
            builder.append("</td>");
            builder.append("</tr>\n");
        }

        // Predicted Class Totals Row
        builder.append("<tr><th class=\"actual-class-header\">Total</th>");
        for (T predicted : classes) {
            builder.append("<td class=\"count-element\">");
            builder.append(getPredictedTotal(predicted));
            builder.append("</td>");
        }
        builder.append("<td class=\"empty-space\"></td>\n");
        builder.append("</tr>\n");
        builder.append("</table>\n");

        return builder.toString();
    }
18061
protected void addOption(AbstractRenderAppender buffer, String type, String optionValue,
                             String optionDisplay, int idx, String altText, char accessKey, boolean disabled)
            throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        if (_cr == null)
            _cr = TagRenderingBase.Factory.getConstantRendering(req);

        assert(buffer != null);
        assert(optionValue != null);
        assert(optionDisplay != null);
        assert(type != null);

        if (_orientation != null && isVertical()) {
            _cr.TR_TD(buffer);
        }

        _inputState.clear();
        _inputState.type = type;
        _inputState.name = getQualifiedDataSourceName();
        _inputState.value = optionValue;
        _inputState.style = _style;
        _inputState.styleClass = _class;

        if (isMatched(optionValue, null)) {
            _inputState.checked = true;
        }
        _inputState.disabled = isDisabled();
        _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, altText);
        if (accessKey != 0x00)
            _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ACCESSKEY, Character.toString(accessKey));

        // if there are attributes defined push them to the options.
        if (_attrs != null && _attrs.size() > 0) {
            Iterator iterator = _attrs.keySet().iterator();
            for (; iterator.hasNext();) {
                String key = (String) iterator.next();
                if (key == null)
                    continue;

                String value = (String) _attrs.get(key);
                _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, key, value);
            }
        }

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(buffer, _inputState);
        br.doEndTag(buffer);

        String ls = _labelStyle;
        String lsc = _labelStyleClass;

        _spanState.style = ls;
        _spanState.styleClass = lsc;

        br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req);
        br.doStartTag(buffer, _spanState);
        buffer.append(optionDisplay);
        br.doEndTag(buffer);

        // backward compatibility this is now overridden by the _orientation
        if (_orientation == null) {
            _cr.BR(buffer);
        }
        else {
            if (isVertical()) {
                _cr.TR_TD(buffer);
            }
            else {
                _cr.NBSP(buffer);
            }
        }
    }
989945
public void printScreen(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strHTML = "";

        ClassInfoModel classInfo = (ClassInfoModel)Record.makeRecordFromClassName(ClassInfoModel.THICK_CLASS, ((HelpScreen)this.getScreenField()));
        if (classInfo != null)
            classInfo = classInfo.readClassInfo(((HelpScreen)this.getScreenField()), null);

        String strClassName = classInfo.getClassName();
        if ((strClassName != null) && (strClassName.equalsIgnoreCase("MenuScreen")))
        {
            strHTML = reg.getString("htmlHelpMenu");
            if ((strHTML == null) || (strHTML.length() == 0))
                strHTML =
                    "<CENTER><h2>" + HtmlConstants.TITLE_TAG + "</h2></CENTER>" +
                    "<h3>Description:</h3>" +
                    "<p>" + HtmlConstants.MENU_DESC_TAG + "</p>" + 
                    "<h3>Menu items:</h3>";
            Record menu = Record.makeRecordFromClassName(MenusModel.THICK_CLASS, null);
            menu.setKeyArea(MenusModel.TYPE_KEY);
            menu.getField(MenusModel.TYPE).setString(DBParams.MENU);
            String strParamMenu = this.getProperty(DBParams.MENU);      // Display record
            menu.getField(MenusModel.PROGRAM).setString(strParamMenu);
            boolean bSuccess = menu.seek("=");
            if (!bSuccess)
                ;   // Do something?
            XMLParser parser = new MenuParser((HelpScreen)this.getScreenField(), menu);
            parser.parseHtmlData(out, strHTML);
            parser.free();
            parser = null;

            menu.free();
            menu = null;
        }
        else
        {
            if (strHTML.length() == 0)
            {
                if ((strClassName != null) && (strClassName.length() > 0))
                    strHTML = reg.getString("htmlHelp");
                else
                {
                    strHTML = reg.getString("htmlHelpDefault");
                    out.println(strHTML);
                    classInfo.free();
                    classInfo = null;
                    return;
                }
            }
            if ((strHTML == null) || (strHTML.length() == 0))
                strHTML =
                "<h2>" + HtmlConstants.TITLE_TAG + "</h2>" +
                "<h3>Description:</h3>" +
                "<p>" + HtmlConstants.MENU_DESC_TAG + "</p>" +
                "<h3>Operation:</h3>" +
                "<p>" + HtmlConstants.HELP_TAG + "</p>";
    
            XMLParser parser = new HelpParser((HelpScreen)this.getScreenField(), classInfo);
            parser.parseHtmlData(out, strHTML);
            parser.free();
            parser = null;
        }
        classInfo.free();
        classInfo = null;
    }
347166
public boolean processServletCommand()
        throws DBException
    {
        String strCommand = this.getProperty(DBParams.COMMAND);        // Display record
        if (strCommand == null)
            strCommand = Constants.BLANK;
        boolean bSuccess = false;
        if (this.getScreenField() instanceof BasePanel)
        {   // Always
            if (strCommand.equalsIgnoreCase(ThinMenuConstants.FIRST))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.FIRST_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.PREVIOUS))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.PREVIOUS_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.NEXT))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.NEXT_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.LAST))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.LAST_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.SUBMIT))
                bSuccess = ((BasePanel)this.getScreenField()).onAdd();
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.DELETE))
                bSuccess = ((BasePanel)this.getScreenField()).onDelete();
            else
            { // Must have sent a user-defined command (send command to this screen)
                bSuccess = false;   // Too dangerous ((BasePanel)this.getScreenField()).handleCommand(strCommand, this.getScreenField(), false);
            }
        }
        return bSuccess;
    }
738962
public boolean printData(PrintWriter out, int iHtmlAttributes)
    {
        boolean bFieldsFound = false;
        String strXmlFilename = this.getProperty(DBParams.XML);                // Html page
        if (strXmlFilename == null)
            strXmlFilename = this.getProperty(DBParams.TEMPLATE);
        if (DBConstants.BLANK.equals(strXmlFilename))
            strXmlFilename = DBConstants.DEFAULT_HELP_FILE;
        if (strXmlFilename != null)
        {
            if ((strXmlFilename.indexOf(':') == -1) && (strXmlFilename.charAt(0) != '/'))
            {
            	if (strXmlFilename.indexOf('/') == -1)
            		strXmlFilename = DBConstants.DEFAULT_HELP_FILE.substring(0, DBConstants.DEFAULT_HELP_FILE.lastIndexOf('/') + 1) + strXmlFilename;
                String strLanguage = ((BaseApplication)this.getTask().getApplication()).getLanguage(false);
                if ((strLanguage == null) || (strLanguage.equalsIgnoreCase("en")))
                    strLanguage = Constants.BLANK;
                if (strLanguage.length() > 0)
                    strLanguage += "/";
                strXmlFilename = strLanguage + strXmlFilename;  // DBConstants.kxxx;
            }
            boolean bHTML = false;
            if ((strXmlFilename.endsWith(".html"))
                || (strXmlFilename.endsWith(".htm")))
                    bHTML = true;
            if (bHTML)
                out.println(Utility.startTag(XMLTags.HTML));
            InputStream streamIn = this.getTask().getInputStream(strXmlFilename);
            if (streamIn != null)
            	Utility.transferURLStream(null, null, new InputStreamReader(streamIn), out);
            else
            	out.println("File not found: " + strXmlFilename + "<br/>");
            if (bHTML)
                out.println(Utility.endTag(XMLTags.HTML));
        }
        else
            return super.printData(out, HtmlConstants.HTML_DISPLAY);     // DO print screen
        return bFieldsFound;
    }
417534
public void printHtmlLogo(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.LOGOS), 'H');
        if (chMenubar == 'H') if (((BasePanel)this.getScreenField()).isMainMenu())
            chMenubar = 'Y';
        if (chMenubar == 'Y')
        {
            String strNav = reg.getString("htmlLogo");
            strNav = Utility.replaceResources(strNav, reg, null, null);
            String strScreen = ((BasePanel)this.getScreenField()).getScreenURL();
            strScreen = Utility.encodeXML(strScreen);
            String strUserName = ((MainApplication)this.getTask().getApplication()).getUserName();
            if (Utility.isNumeric(strUserName))
                strUserName = DBConstants.BLANK;
            String strLanguage = this.getTask().getApplication().getLanguage(false);
            strNav = Utility.replace(strNav, HtmlConstants.URL_TAG, strScreen);
            strNav = Utility.replace(strNav, HtmlConstants.USER_NAME_TAG, strUserName);
            strNav = Utility.replace(strNav, "<language/>", strLanguage);
            this.writeHtmlString(strNav, out);
        }
    }