BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.html
Class LiteralElement

java.lang.Object
  |
  +--weblogic.html.HtmlElement
        |
        +--weblogic.html.ElementWithAttributes
              |
              +--weblogic.html.SinglePartElement
                    |
                    +--weblogic.html.LiteralElement

public class LiteralElement
extends SinglePartElement

LiteralElement objects are used to pass data to the htmlKona engine that creates the HTML exactly as it exists. For instance, information from WebLogic dbkona DataSets can be added as LiteralElements.

Version:
2.1
Author:
Copyright (c) 1995-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems, Inc. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Fields inherited from class weblogic.html.HtmlElement
codeset, useObsolete
 
Constructor Summary
LiteralElement()
          Constructs a LiteralElement.
LiteralElement(DataSet ds)
          Constructs a LiteralElement with the specified DataSet.
LiteralElement(DataSet ds, boolean with_heading)
          Constructs a LiteralElement with the specified DataSet and uses column headings to set widths and specify headings.
LiteralElement(HtmlElement val)
          Constructs a LiteralElement with the specified HtmlElement.
LiteralElement(java.lang.String val)
          Constructs a LiteralElement with the specified string.
 
Method Summary
protected  java.lang.String getHtmlCode()
           
protected  boolean printCR()
           
 LiteralElement setWidth(int characters)
          Sets the WIDTH attribute for a LiteralElement, which specifies the maximum number of (monospaced) characters that will be displayed in a line.
 
Methods inherited from class weblogic.html.SinglePartElement
getElement, printBody, printBody, printBody, setElement, setElement, widthAsLiteral
 
Methods inherited from class weblogic.html.ElementWithAttributes
addAttribute, addAttribute, escapeQuotes, getBooleanAttribute, getElementAttribute, getLocalVar, getQuotedAttribute, output, output, output, printBody, printEndingTag, setBooleanAttribute, setBooleanAttribute, setClass, setDirection, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setId, setLang, setLocalVar, setQuotedAttribute, setStyle
 
Methods inherited from class weblogic.html.HtmlElement
asAnchorElement, asBigElement, asBlockquoteElement, asBoldElement, asCenteredElement, asCiteElement, asCodeElement, asCommentElement, asDefineTermElement, asEmphasisElement, asFontElement, asFontElement, asFontElement, asHtmlContainer, asItalicElement, asKeyboardElement, asLiteralElement, asParagraphElement, asSampleElement, asSmallElement, asStrikeElement, asStrongElement, asSubscriptElement, asSuperscriptElement, asTeletypeElement, asUnderlineElement, asVariableElement, getVersion, setAnchorMode, setCodeset, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiteralElement

public LiteralElement()
Constructs a LiteralElement.

LiteralElement

public LiteralElement(java.lang.String val)
Constructs a LiteralElement with the specified string.

Parameters:
val - Text to be interpreted literally

LiteralElement

public LiteralElement(HtmlElement val)
Constructs a LiteralElement with the specified HtmlElement.

Parameters:
val - HtmlElement to be interpreted literally

LiteralElement

public LiteralElement(DataSet ds)
               throws java.sql.SQLException,
                      DataSetException,
                      HtmlException,
                      java.io.IOException
Constructs a LiteralElement with the specified DataSet.

Parameters:
ds - DataSet
Throws:
java.sql.SQLException - if there is a SQL error
DataSetException - if there is a problem with the dataset
HtmlException - if there is an HTML error
java.io.IOException - if there is an IO error

LiteralElement

public LiteralElement(DataSet ds,
                      boolean with_heading)
               throws java.sql.SQLException,
                      DataSetException,
                      HtmlException,
                      java.io.IOException
Constructs a LiteralElement with the specified DataSet and uses column headings to set widths and specify headings.

Parameters:
ds - DataSet
with_heading - True to use column headings
Throws:
java.sql.SQLException - if there is a SQL error
DataSetException - if there is a problem with the dataset
HtmlException - if there is an HTML error
java.io.IOException - if there is an IO error
Method Detail

setWidth

public LiteralElement setWidth(int characters)
Sets the WIDTH attribute for a LiteralElement, which specifies the maximum number of (monospaced) characters that will be displayed in a line.

Parameters:
characters - Number of characters
Returns:
LiteralElement

getHtmlCode

protected java.lang.String getHtmlCode()

Overrides:
getHtmlCode in class ElementWithAttributes

printCR

protected boolean printCR()

Overrides:
printCR in class ElementWithAttributes

Documentation is available at
http://www.weblogic.com/docs51