Display this screen in html input format.
@return true if default params were found for this form.
@param out The http output stream.
@exception DBException File exception.
12375
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        boolean bFieldsFound = false;
        int iNumCols = this.getSFieldCount();
        for (int iIndex = 0; iIndex < iNumCols; iIndex++)
        {
            ScreenField sField = this.getSField(iIndex);
            boolean bPrintControl = this.isPrintableControl(sField, iPrintOptions);
            if (this.isToolbar())
                if (sField.getConverter() == null)
                    bPrintControl = false;
            if (this instanceof BaseGridScreen)
                if (iIndex < ((BaseGridScreen)this).getNavCount())
                    bPrintControl = true;   // Move to isPrintable.
            if (bPrintControl)
            {
                if (!bFieldsFound)
                    this.printDataStartForm(out, iPrintOptions);    // First time
                this.printDataStartField(out, iPrintOptions);
                this.printScreenFieldData(sField, out, iPrintOptions);
                this.printDataEndField(out, iPrintOptions);
                bFieldsFound = true;
            }
        }
        if (bFieldsFound)
            this.printDataEndForm(out, iPrintOptions);
        return bFieldsFound;
    }
1349132
public void printDataStartForm(PrintWriter out, int iPrintOptions)
    {
        String strRecordName = "norecord";
        Record record = this.getMainRecord();
        if (record != null)
            strRecordName = record.getTableNames(false);
        if ((iPrintOptions & HtmlConstants.MAIN_HEADING_SCREEN) == HtmlConstants.MAIN_HEADING_SCREEN)
        {
            out.println(Utility.startTag(XMLTags.HEADING));
            out.println(Utility.startTag(XMLTags.FILE));
            out.println(Utility.startTag(strRecordName));
        }
        if ((iPrintOptions & HtmlConstants.MAIN_FOOTING_SCREEN) == HtmlConstants.MAIN_FOOTING_SCREEN)
        {
            out.println(Utility.startTag(XMLTags.FOOTING));
            out.println(Utility.startTag(XMLTags.FILE));
            out.println(Utility.startTag(strRecordName));
        }
        if ((iPrintOptions & HtmlConstants.REPORT_SCREEN) != HtmlConstants.REPORT_SCREEN)
            out.println(Utility.startTag(XMLTags.DATA));    // If not a report
    }
421107
public boolean printToolbarData(boolean bFieldsFound, PrintWriter out, int iHtmlAttributes)
    {
        int iNumCols = ((ToolScreen)this.getScreenField()).getSFieldCount();
        for (int iIndex = 0; iIndex < iNumCols; iIndex++)
        {
            ScreenField sField = ((ToolScreen)this.getScreenField()).getSField(iIndex);
            if (sField.getConverter() == null)
                if (sField instanceof SCannedBox)
            {
                SCannedBox button = (SCannedBox)sField;   // Found the toolscreen
                String strCommand = button.getButtonCommand();
                if (strCommand.equalsIgnoreCase(MenuConstants.BACK))
                { // Ignore back for HTML
                }
                else if (strCommand.equalsIgnoreCase(MenuConstants.HELP))
                { // Ignore help for HTML
                }
                else if (strCommand.equalsIgnoreCase(MenuConstants.RESET))
                {   // Special case - for reset do an HTML reset
                    out.println("<input type=\"Reset\"/>");
                    bFieldsFound = false; // Don't need Submit/Reset button
                }
                else if ((strCommand.equalsIgnoreCase(MenuConstants.FIRST))
                        || (strCommand.equalsIgnoreCase(MenuConstants.PREVIOUS))
                        || (strCommand.equalsIgnoreCase(MenuConstants.NEXT))
                        || (strCommand.equalsIgnoreCase(MenuConstants.LAST))
                        || (strCommand.equalsIgnoreCase(MenuConstants.SUBMIT))
                        || (strCommand.equalsIgnoreCase(MenuConstants.DELETE)))
                { // Valid command - send it as a post command
                    out.println("<input type=\"submit\" name=\"" + DBParams.COMMAND + "\" value=\"" + strCommand + "\"/>");
                    bFieldsFound = false; // Don't need Submit button
                }
                else if (strCommand.equalsIgnoreCase(MenuConstants.FORM))
                { // Valid command - send it as a post command
                    if (this.getMainRecord() != null)
                    {
                        String strRecord = this.getMainRecord().getClass().getName().toString();
                        String strLink = "?" + DBParams.RECORD + "=" + strRecord + "&" + DBParams.COMMAND + "=" + MenuConstants.REFRESH;
                        out.println("<input type=\"button\" value=" + strCommand + " onclick=\"window.open('" + strLink + "','_top');\"/>");
                    }
                }
                else if (strCommand.equalsIgnoreCase(MenuConstants.LOOKUP))
                { // Valid command - send it as a post command
                    if (this.getMainRecord() != null)
                    {
                        String strRecord = this.getMainRecord().getClass().getName().toString();
                        String strLink = "?" + DBParams.RECORD + "=" + strRecord;
                        out.println("<input type=\"button\" value=\"Lookup\" onclick=\"window.open('" + strLink + "','_top');\"/>");
                    }
                }
                else
                { // Valid command - send it as a post command
                    //+ Add code here to process a doCommand(xxx)
                }
            }
        }
        String strCommand = MenuConstants.SUBMIT;
        if (this.getScreenField().getParentScreen() instanceof GridScreen)
        {
            strCommand = MenuConstants.LOOKUP;
            if (this.getScreenField().getParentScreen().getEditing())
                bFieldsFound = true;        // Need these buttons for grid input
        }
        if (bFieldsFound)
        {
            out.println("<input type=\"submit\" name=\"" + DBParams.COMMAND + "\" value=\"" + strCommand + "\"/>");
            out.println("<input type=\"Reset\"/>");
        }
        return bFieldsFound;
    }
345039
public void printHtmlJavaLogo(PrintWriter out, String strTag, String strParams, String strData)
    {
        String strType = m_recDetail.getField(MenusModel.TYPE).toString();
        String strJava = this.getRecordOwner().getProperty(DBParams.JAVA);
        if ((strJava == null) || (strJava.length() == 0))
            strJava = DBConstants.NO;
        if (strJava.toUpperCase().charAt(0) != 'N')
            if ((strType.equalsIgnoreCase(DBParams.RECORD))
                || (strType.equalsIgnoreCase(DBParams.SCREEN))
                    || (strType.equalsIgnoreCase("form")))
            out.print(strData);
    }
239186
public void printScreen(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strParamRecord = this.getProperty(DBParams.RECORD);      // Display record
        String strParamScreen = this.getProperty(DBParams.SCREEN);      // Display screen
//?        String strParamLimit = this.getProperty("limit");   // Display record
        if (strParamRecord == null)
            strParamRecord = DBConstants.ROOT_PACKAGE;
        if (strParamScreen == null)
            strParamScreen = Constants.BLANK;
        String strHTML = reg.getString("Default");
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "<hr>" +
            "<form action=\"/" + HtmlConstants.SERVLET_PATH + "\" method=\"get\">" +
            "<pre>" +
            " Record : <input type=\"text\" length=\"50\" name=\"record\" value=\"" + HtmlConstants.RECORD_TAG + "\"/>\n" +
            " Screen : <input type=\"text\" length=\"50\" name=\"screen\" value=\"" + HtmlConstants.SCREEN_TAG + "\"/>\n" +
            "  Limit : <input type=\"text\" maxlength=\"7\" name=\"limit\" value=\"200\">\n" +
            "</pre>" +
            "<input type=submit\"submit\" name=\"" + DBParams.COMMAND + "\" VALUE=\"" + ThinMenuConstants.SUBMIT + "\"/>" +
            "</form>";
        strHTML = Utility.replace(strHTML, HtmlConstants.RECORD_TAG, strParamRecord);
        strHTML = Utility.replace(strHTML, HtmlConstants.SCREEN_TAG, strParamScreen);

        if (this.getProperty(DBParams.JOB) != null)
        {
            String strCommand = this.getProperty(DBParams.JOB);
            try   {
                strCommand = URLDecoder.decode(strCommand, DBConstants.URL_ENCODING);
            } catch (Exception ex)  {
                // Ignore
            }
            strHTML = "<p>Job: " + strCommand;
            if (this.getScreenField().handleCommand(strCommand, this.getScreenField(), ScreenConstants.USE_SAME_WINDOW | DBConstants.PUSH_TO_BROWSER))
                strHTML += " queued successfully</p>";
            else
                strHTML += " queued unsuccessfully</p>";
        }
        else if (this.getProperty("menutasks") != null)
        {
            String strCommand = this.getProperty("menutasks");
            Task task = this.getTask();
            if (task == null)
                task = BaseApplet.getSharedInstance();  // ??
//x         TaskScheduler js = task.getApplication().getTaskScheduler();
            PrivateTaskScheduler js = new PrivateTaskScheduler(task.getApplication(), 0, true);
            strHTML = "<p>Multiple Job queue: " + strCommand + "</p>";
            Record recMenu = Record.makeRecordFromClassName(MenusModel.THICK_CLASS, ((DefaultHtmlScreen)this.getScreenField()));
            recMenu.setKeyArea(MenusModel.CODE_KEY);
            recMenu.getField(MenusModel.CODE).setString(strCommand);
            String strMenuObjectID = null;
            if (recMenu.seek("="))
                strMenuObjectID = recMenu.getField(MenusModel.ID).toString();
            if ((strMenuObjectID != null) && (strMenuObjectID.length() > 0))
            {
                recMenu.close();
                recMenu.setKeyArea(MenusModel.PARENT_FOLDER_ID_KEY);
                StringSubFileFilter behMenu = new StringSubFileFilter(strMenuObjectID, recMenu.getField(MenusModel.PARENT_FOLDER_ID), null, null, null, null);
                recMenu.addListener(behMenu);
                while (recMenu.hasNext())
                {
                    recMenu.next();
                    String strLink = ((MenusModel)recMenu).getLink();
                    Map<String,Object> properties = new Hashtable<String,Object>();
                    Util.parseArgs(properties, strLink);
                    strCommand = (String)properties.get(DBParams.JOB);
                    if (strCommand != null)
                    {
                        try   {
                            strCommand = URLDecoder.decode(strCommand, DBConstants.URL_ENCODING);
                        } catch (java.io.UnsupportedEncodingException ex) {
                            ex.printStackTrace();
                        }
                        strHTML += "<p>Job: " + strCommand;
                        js.addTask(strCommand);
                        strHTML += " queued successfully</p>";
                    }
                    else
                        strHTML += "<p>Job: " + strCommand + " illegal job name</p>";
                }
            }
            recMenu.free();
            recMenu = null;
            js.endOfJobs();     // This thing will stop now when its done.
        }
        
        out.println(strHTML);
    }
503524
public void printHtmlNavMenu(PrintWriter out)
        throws DBException
    {
        String strForms = this.getProperty(HtmlConstants.FORMS);                // Html page
        if (strForms != null) if (strForms.equalsIgnoreCase(HtmlConstants.DISPLAY))
            ((BasePanel)this.getScreenField()).setProperty(DBParams.NAVMENUS, UserInfoModel.NO_ICONS);   // Don't display NAV menus
//x            return;   // Don't display NAV menus
        super.printHtmlNavMenu(out);
    }
409593
public boolean hasNext() throws DBException
    {
        Object record = this.next();
        if (record == null)
            return false;
        else
        {
            this.previous();        // Remember, Memory tables are FAAAAST!
            return true;
        }
    }
902104
public int getPrintOptions()
        throws DBException
    {
        int iHtmlOptions = super.getPrintOptions();
        String strForms = this.getProperty(HtmlConstants.FORMS);
        if ((strForms == null) || (strForms.length() == 0))
        {
            if (((DualReportScreen)this.getScreenField()).isPrintReport())
                iHtmlOptions = iHtmlOptions & (~HtmlConstants.DONT_PRINT_SCREEN);
            else
                iHtmlOptions = iHtmlOptions | HtmlConstants.DONT_PRINT_SCREEN;
        }
        return iHtmlOptions;
    }
871408
public int printStartGridScreenData(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.HTML_ADD_DESC_COLUMN) != 0)
            out.println("<td></td>"); // No description needed for a table
        if ((iPrintOptions & HtmlConstants.HTML_IN_TABLE_ROW) != 0)
            out.println("<td>");
        iPrintOptions = iPrintOptions & (~HtmlConstants.HTML_IN_TABLE_ROW);     // sub-controls not in a table row
        iPrintOptions = iPrintOptions & (~HtmlConstants.HTML_ADD_DESC_COLUMN);  // Sub-controls - don't add desc.
        return iPrintOptions;
    }
80000
public boolean printControl(PrintWriter out, int iPrintOptions)
    {
        if (!this.getScreenField().isInputField())
            return false;
        if (this.getScreenField().isToolbar())
            return false;
        String strFieldDesc = DBConstants.BLANK;
        if (this.getScreenField().getConverter() != null)
            strFieldDesc = this.getScreenField().getConverter().getFieldDesc();
        String strFieldName = this.getScreenField().getSFieldParam();
        String strControlType = this.getInputType(null);
        String strFieldType = this.getInputType(ScreenModel.DOJO_TYPE);
        if ((this.getScreenField().isEnabled() == true) && (!this.getScreenField().getParentScreen().isPrintReport()))
        {   // Input field and not printing a report
            Convert converter = this.getScreenField().getConverter();
            int iMaxSize = 10;
            if (converter != null)
                iMaxSize = converter.getMaxLength();
            String strMaxSize = Integer.toString(iMaxSize);
            String strSize = DEFAULT_CONTROL_LENGTH;
            if (iMaxSize < 40)
                strSize = strMaxSize;
            String strValue = this.getScreenField().getSFieldValue(true, false);
        // Overriding methods will replace with: text int checkbox radio hidden float date url textbox
            strFieldDesc = Utility.replace(strFieldDesc, " ", "\240");  // spaces -> nbsp
            this.printInputControl(out, strFieldDesc, strFieldName, strSize, strMaxSize, strValue, strControlType, strFieldType);
        }
        else
            this.printDisplayControl(out, strFieldDesc, strFieldName, strFieldType);
        return true;
    }
916836
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        boolean bFieldsFound = false;
        String strFieldName = this.getScreenField().getSFieldParam();
        String strFieldData = this.getZmlImagePath();
        if (strFieldData == null)
            strFieldData = HtmlConstants.ICON_DIR + "Noimage.gif";
        strFieldData = Utility.encodeXML(strFieldData);
        out.println("    " + Utility.startTag(strFieldName) + strFieldData + Utility.endTag(strFieldName));
        return bFieldsFound;
    }
765691
public void doOpen() throws DBException
    {
        try   {
    // FROM is automatic, since the remote BaseRecord is exactly the same as this one
    // ORDER BY
            KeyArea keyArea = this.getRecord().getKeyArea(-1);  // Current index
            String strKeyArea = null;
            boolean bDirection = DBConstants.ASCENDING;
            if (true)
            {
                strKeyArea = keyArea.getKeyName();
                bDirection = keyArea.getKeyField(DBConstants.MAIN_KEY_FIELD).getKeyOrder();
            }
            m_bDirectionCurrent = bDirection;
    // Open mode
            int iOpenMode = this.getRecord().getOpenMode();
    // SELECT (fields to select)
            String strFields = null;
            if (true) // All selected?
            {
                strFields = this.getRecord().getSQLFields(DBConstants.SQL_SELECT_TYPE, true);
                if (strFields.equals(" *"))
                    strFields = null; // Select all
            }
    // WHERE XYZ >=
            Object objInitialKey = null;
            if (true)
            {
                BaseBuffer buffer = new VectorBuffer(null);
                this.getRecord().handleInitialKey();
                if (keyArea.isModified(DBConstants.START_SELECT_KEY))
                {   // Anything set?
                    keyArea.setupKeyBuffer(buffer, DBConstants.START_SELECT_KEY, false);
                    objInitialKey = buffer.getPhysicalData();
                    buffer.addNextString(Integer.toString(keyArea.lastModified(DBConstants.START_SELECT_KEY, false))); // Largest modified field.
                }
            }
    // WHERE XYZ <=
            Object objEndKey = null;
            if (true)
            {
                BaseBuffer buffer = new VectorBuffer(null);
                this.getRecord().handleEndKey();
                if (keyArea.isModified(DBConstants.END_SELECT_KEY))
                {   // Anything set?
                    keyArea.setupKeyBuffer(buffer, DBConstants.END_SELECT_KEY, false);
                    objEndKey = buffer.getPhysicalData();
                    buffer.addNextString(Integer.toString(keyArea.lastModified(DBConstants.END_SELECT_KEY, false))); // Largest modified field.
                }
            }
    // WHERE XYZ
            byte[] byBehaviorData = null;
            boolean bDirty = false;
            if (this.getRecord().getListener() != null)
            {
                ByteArrayOutputStream baOut = new ByteArrayOutputStream();
                ObjectOutputStream daOut = new ObjectOutputStream(baOut);
                FileListener listener = (FileListener)this.getRecord().getListener();
                while (listener != null)
                {
                    if ((listener.getMasterSlaveFlag() & FileListener.RUN_IN_SLAVE) != 0) // Should exist in a SERVER environment
                        if ((listener.getMasterSlaveFlag() & FileListener.DONT_REPLICATE_TO_SLAVE) == 0) // Yes, replicate to the SERVER environment
                            if (listener.isEnabledListener()) // Yes, only replicate enabled listeners.
                    { // There should be a copy of this on the server
                        bDirty = true;
                        daOut.writeUTF(listener.getClass().getName());
                        listener.initRemoteStub(daOut);
                    }
                    listener = (FileListener)listener.getNextListener();
                }
                daOut.flush();
                if (bDirty)
                    byBehaviorData = baOut.toByteArray();
                daOut.close();
                baOut.close();
            }

            this.checkCacheMode(Boolean.TRUE);      // Make sure the cache is set up correctly for this type of query (typically needed)

            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_tableRemote.open(strKeyArea, iOpenMode, bDirection, strFields, objInitialKey, objEndKey, byBehaviorData);
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
1302777
public boolean printHeadingFootingData(PrintWriter out, int iPrintOptions)
    {
        boolean bIsBreak = false;
        int iNumCols = this.getSFieldCount();
        for (int iIndex = 0; iIndex < iNumCols; iIndex++)
        {
            ScreenField sField = this.getSField(iIndex);
            boolean bPrintControl = this.isPrintableControl(sField, iPrintOptions);
//x            if (!(sField instanceof ReportBreakScreen))
//x                bPrintControl = false;
            if (sField == this.getReportHeading())
                bPrintControl = false;
            if (sField == this.getReportFooting())
                bPrintControl = false;
            if (sField == this.getReportDetail())
            	bPrintControl = false;
            if ((iPrintOptions & HtmlConstants.HEADING_SCREEN) != 0)
                if ((sField.getDisplayFieldDesc() & HtmlConstants.HEADING_SCREEN) == 0)
                    bPrintControl = false;
            if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) != 0)
                if ((sField.getDisplayFieldDesc() & HtmlConstants.FOOTING_SCREEN) == 0)
                    bPrintControl = false;
            if (bPrintControl)
            {
                sField.printData(out, iPrintOptions);
                if (!bIsBreak)
                {
                	if (sField instanceof ReportBreakScreen)
                		bIsBreak = ((ReportBreakScreen)sField).isLastBreak();
                	else
                		bIsBreak = true;	// Always assume a break if this is not a break screen
                }
            }
        }
        return bIsBreak;
    }
565655
public void printScreen(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        out.println("<html>");
        this.printAppletHtmlScreen(out, reg);
        out.println("</html>");
/*        Map<String,Object> propApplet = new Hashtable<String,Object>();
        Map<String,Object> properties = ((AppletHtmlScreen)this.getScreenField()).getAppletProperties(propApplet);
        Utility.startTag("applet-properties");
        out.println(XMLPropertiesField.propertiesToXML(propApplet));
        Utility.endTag("applet-properties");
        Utility.startTag("properties");
        out.println(XMLPropertiesField.propertiesToXML(properties));
        Utility.endTag("properties");
        Utility.startTag("jnlp-url");
        String strJnlpURL = this.getJnlpURL(propApplet, properties);
        out.println(Utility.encodeXML(strJnlpURL));
        Utility.endTag("jnlp-url");
*/    }
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);
        }
    }
826440
@SuppressWarnings("unchecked")
	@Override
	public T outParam(final String paramName, final int sqlType) {
		context().outParam(paramName, sqlType);
		return (T) this;
	}
383101
public void printDataEndField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("</tr>");
    }