Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.html
Class StringElement

    java.lang.Object
      |
      +--weblogic.html.HtmlElement
            |
            +--weblogic.html.StringElement

public final class StringElement
extends HtmlElement

A StringElement is used to add String objects to an HtmlPage. A StringElement may be a dbKona Record object that is part of a DataSet retrieved in a database query. Any arbitrary HtmlElement can be returned as a String with the HtmlElement.toString() method.

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.
See Also:
  `Record`, `HtmlElement.toString(java.lang.String)`

Field Summary
`protected java.lang.String` | `contents` Deprecated.

Fields inherited from class weblogic.html.HtmlElement
`codeset, useObsolete`

Constructor Summary
`StringElement()` Deprecated. Constructs a StringElement.
`StringElement(HtmlElement val)` Deprecated. Constructs a StringElement with the specified HtmlElement.
`StringElement(Record rec)` Deprecated. Constructs a StringElement with the specified Record from a DataSet.
`StringElement(Record rec, int[] maxwidths)` Deprecated. Constructs a StringElement with the specified Record from a DataSet.
`StringElement(java.lang.String val)` Deprecated. Constructs a StringElement with the specified String.

Method Summary
`StringElement` | `escape()` Deprecated. Escapes a StringElement using HTML entities.
`void` | `output(java.io.OutputStream out)` Deprecated. Outputs to the specified OutputStream.
`void` | `output(java.io.OutputStream out, java.lang.String codeset)` Deprecated. Outputs to the specified OutputStream.
`void` | `output(java.io.PrintWriter pw)` Deprecated.
`StringElement` | `replace(java.lang.String oldstr, HtmlElement elem)` Deprecated. Replaces a string in a StringElement with the string representation of an HtmlElement.
`StringElement` | `replace(java.lang.String oldstr, java.lang.String newstr)` Deprecated. Replaces a string with a new string in a StringElement.
`StringElement` | `replaceWithElement(java.lang.String oldstr, java.lang.String classname)` Deprecated. Replaces a string in a StringElement with a SinglePartElement or one of its subclasses specified by the classname.
`StringElement` | `setContents(java.lang.String val)` Deprecated. Sets the contents of a StringElement to the specified value.
`StringElement` | `setContentsWithFile(java.lang.String filename)` Deprecated. Sets the contents of a StringElement to the contents of the specified filename.
`int` | `widthAsLiteral()` Deprecated. Returns the number of characters in a StringElement.

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`

Field Detail

### contents

    protected java.lang.String contents

  Deprecated.

Constructor Detail

### StringElement

    public StringElement()

  Deprecated.
  Constructs a StringElement.

### StringElement

    public StringElement(java.lang.String val)

  Deprecated.
  Constructs a StringElement with the specified String.

  Parameters:
    `val` - String object

### StringElement

    public StringElement(HtmlElement val)

  Deprecated.
  Constructs a StringElement with the specified HtmlElement.

  Parameters:
    `val` - HtmlElement object

### StringElement

    public StringElement(Record rec,
                         int[] maxwidths)
                  throws java.sql.SQLException,
                         DataSetException,
                         java.io.IOException

  Deprecated.
  Constructs a StringElement with the specified Record from a DataSet.

  Parameters:
    `val` - HtmlElement object
  Throws:
    java.sql.SQLException - if there is a SQL error
    DataSetException - if there is an error with the DataSet
    java.io.IOException - if there is an IO error

### StringElement

    public StringElement(Record rec)
                  throws java.sql.SQLException,
                         DataSetException,
                         java.io.IOException

  Deprecated.
  Constructs a StringElement with the specified Record from a DataSet.

  Parameters:
    `val` - HtmlElement object
  Throws:
    java.sql.SQLException - if there is a SQL error
    DataSetException - if there is an error with the DataSet
    java.io.IOException - if there is an IO error

Method Detail

### replaceWithElement

    public StringElement replaceWithElement(java.lang.String oldstr,
                                            java.lang.String classname)
                                     throws HtmlException

  Deprecated.
  Replaces a string in a StringElement with a SinglePartElement or one of its subclasses specified by the classname.

  Parameters:
    `oldstr` - String to replace
    `classname` - Classname of the SinglePartElement
  Returns:
    StringElement
  Throws:
    HtmlException - if the new class name is not subclassed from SinglePartElement

### replace

    public StringElement replace(java.lang.String oldstr,
                                 HtmlElement elem)
                          throws java.io.IOException

  Deprecated.
  Replaces a string in a StringElement with the string representation of an HtmlElement.

  Parameters:
    `oldstr` - String to replace
    `elem` - HtmlElement object
  Returns:
    StringElement object
  Throws:
    java.io.IOException - if there is an IO error

### replace

    public StringElement replace(java.lang.String oldstr,
                                 java.lang.String newstr)
                          throws java.io.IOException

  Deprecated.
  Replaces a string with a new string in a StringElement.

  Parameters:
    `oldstr` - String to replace
    `newstr` - MultiPartElement object
  Returns:
    StringElement object
  Throws:
    java.io.IOException - if there is an IO error

### widthAsLiteral

    public int widthAsLiteral()

  Deprecated.
  Returns the number of characters in a StringElement.

  Returns:
    Width
  Overrides:
    widthAsLiteral in class HtmlElement

### setContents

    public StringElement setContents(java.lang.String val)

  Deprecated.
  Sets the contents of a StringElement to the specified value.

  Parameters:
    `val` - String
  Returns:
    StringElement

### setContentsWithFile

    public StringElement setContentsWithFile(java.lang.String filename)
                                      throws HtmlException

  Deprecated.
  Sets the contents of a StringElement to the contents of the specified filename.

  Parameters:
    `filename` - Filename enclosed in double quotes
  Returns:
    StringElement
  Throws:
    HtmlException - if the contents cannot be set

### output

    public void output(java.io.OutputStream out)
                throws java.io.IOException

  Deprecated.
  Outputs to the specified OutputStream.

  Parameters:
    `ostr` - Output stream
  Throws:
    java.io.IOException - if there is an IO error
  Overrides:
    output in class HtmlElement

### output

    public void output(java.io.OutputStream out,
                       java.lang.String codeset)
                throws java.io.IOException

  Deprecated.
  Outputs to the specified OutputStream.

  Parameters:
    `ostr` - Output stream
    `codeset` - Java Codeset
  Throws:
    java.io.IOException - if there is an IO error
  Overrides:
    output in class HtmlElement

### output

    public void output(java.io.PrintWriter pw)
                throws java.io.IOException

  Deprecated.

  Overrides:
    output in class HtmlElement

### escape

    public StringElement escape()

  Deprecated.
  Escapes a StringElement using HTML entities. For example, "&" is returned as "&amp;".

  Returns:
    StringElement

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference