The release 1.0 version of HtmlScreen is now available from 
http://www.ticnet.com/bwit/download.htm.

Following is the README file for the package which may save you a download if this 
isn't something you're interested in.

Regards,
Bob


        HtmlScreen - A HTML dynamic modification library
                                Version 1.0

        Copyright (c) 1999, Bob Withers - [EMAIL PROTECTED]

May be freely copied, modified, and used in both personal and
commercial applications provided that the authors copyright is
not removed and the library source is made available to all
interested users.

HtmlScreen is a small Java package that is intended to aid the
development of servlet based applications rendering screens in
HTML.  The primary purpose of this package is to allow the user
interface of an application to be divorced from the servlet code
that renders that interface.  The HTML screens may be designed and
generated using any number of HTML tools such as Frontpage (Microsoft)
or Visual Page (Symantec).  Each data display/entry field which is
to have data supplied by servlet code is given a name via the HTML
NAME= attribute.  This name provides the link used by the Java
servlet code to identify fields it wishes to modify.

The author welcomes suggestions and code enhancements to make this
package more useful.  The current version of this package may be
downloaded from http://www.pobox.com/~bwit/download.htm.

Bob Withers - Email: [EMAIL PROTECTED]   Web: http://www.pobox.com/~bwit
February 1999

----------------------------------------------------------------------

Following are the HTML field types supported and the effect of the
various HtmlScreen API methods on each of them.

Anchor          <A HREF=...></A>

    getValue()
        Returns the value of the HREF attribute.

    setValue()
        Sets the value of the HREF attribute.

    getText()
        Returns the text that will be displayed for the anchor.

    setText()
        Sets the text that will be displayed for the anchor.

    hide()
        If true the entire anchor is omitted from the generated HTML screen.
        If the anchor is immediately followed by a <BR> tag the break is also
        omitted to avoid leaving a blank line on the screen in place of the
        hidden anchor.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the entire anchor is omitted from the generated HTML screen.
        If the anchor is immediately followed by a <BR> tag the break is also
        omitted to avoid leaving a blank line on the screen in place of the
        hidden anchor.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        Has no effect on this type of field.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.

Push Button     <INPUT TYPE=BUTTON ...>
Submit Button   <INPUT TYPE=SUBMIT ...>
Reset Button    <INPUT TYPE=RESET ...>

    getValue()
        Returns the value that will be returned if the button is pressed.

    setValue()
        Sets the value that will be returned if the button is pressed.

    getText()
        Returns the text that will be displayed on the button.

    setText()
        Sets the text that will be displayed on the button.

    hide()
        If true the button is omitted from the generated HTML screen.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the button is omitted from the generated HTML screen.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        Has no effect on this type of field.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.

Checkbox        <INPUT TYPE=CHECKBOX ...>

    getValue()
        Returns the value that will be returned if the checkbox is checked.

    setValue()
        Sets the value that will be returned if the checkbox is checked.

    getText()
        Has no effect on this type of field.

    setText()
        Has no effect on this type of field.

    hide()
        If true the checkbox is omitted from the generated HTML screen.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the checkbox is omitted from the generated HTML screen.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        Has no effect on this type of field.

    select()
        Sets the checked or unchecked state of the field based on the parameter.

    addOption()
        Has no effect on this type of field.

File box        <INPUT TYPE=FILE ...>
Hidden box      <INPUT TYPE=HIDDEN...>
Image           <INPUT TYPE-IMAGE...>

    getValue()
        Returns the value that will be returned by the field.

    setValue()
        Sets the value that will be returned by the field.

    getText()
        Has no effect on this type of field.

    setText()
        Has no effect on this type of field.

    hide()
        If true the field is omitted from the generated HTML screen.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the field is omitted from the generated HTML screen.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        Has no effect on this type of field.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.

Text box        <INPUT TYPE=TEXT ...>
Password box    <INPUT TYPE=PASSWORD ...>

    getValue()
        Returns the value that will be returned by the field.

    setValue()
        Sets the value that will be returned by the field.

    getText()
        Has no effect on this type of field.

    setText()
        Has no effect on this type of field.

    hide()
        If true the field will be rendered in the HTML but the type
        attribute will be changed to TYPE=HIDDEN.  If false the field
        will be rendered with it's original type.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the field will be rendered in the HTML but the following
        attribute will be added: onfocus="blur()".  This effectively
        renders the field protected under all major browsers.  If the
        DISABLED attribute if the INPUT HTML becomes more widespead this
        would be a better alternative.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        The field value is set to an empty string.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.

Radio Button    <INPUT TYPE=RADIO ...>

    getValue()
        Returns the value that will be returned by the field.
        Note that the two parameter version of getValue must be
        used to get the value of a particular button.  If the one
        parameter version is  used the text returned will be that
        of the first radio button in the group.

    setValue()
        Sets the value that will be returned by the field.
        Note that the three parameter version of getValue must be
        used to get the value of a particular button.  If the two
        parameter version is  used the text returned will be that
        of the first radio button in the group.

    getText()
        Returns the text associated with the radio button.  Note that
        the two parameter version of getText must be used to get the
        text of a particular button.  If the one parameter version is
        used the text returned willbe that of the first radio button
        in the group.

    setText()
        Sets the text associated with the radio button.  Note that
        the three parameter version of getText must be used to set the
        text of a particular button.  If the two parameter version is
        used the text returned willbe that of the first radio button
        in the group.

    hide()
        If true all radio buttons in the group will be omitted from
        the generated HTML.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true all radio buttons in the group will be omitted from
        the generated HTML.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        Has no effect on this type of field.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.

Label       <LABEL ...></LABEL>

    This field type is not accessable via the HtmlScreen API but it
    attaches itself to the field it is associated with via its FORID=
    attribute.  During rendering the label is omitted if its associated
    field is hidden or disabled.

Message     <$MESSAGE NAME=name>Text</$MESSAGE>

    This is an invented HTML tag which allows a screen designer to
    define where on the screen the text messages should be displayed.
    When rendering the field only the "Text" portion is rendered, no
    tag information is generated.  This allows multiple message fields
    to be named and placed anywhere on the screen.  In addition, <$MESSAGE>
    tags may be enclosed within other tags, such as <FONT>, <STRONG>, etc
    to alter the display of the text.

    The message field may be altered via the normal screen API methods.
    The text displayed may be dynamically generated using setValue() or
    setText().

    A good example of this type of field would be to provide an option to
    display an error message at the bottom of the screen.

Dynamic     <$DYNAMIC NAME=fldName CLASS=className ...>Text</$DYNAMIC>

    This is an invented HTML tag which allows a screen designer to
    define where on the screen dynamic content may be generated.  When
    this tag is rendered class "className" will be instantiated with a
    constructor having the following signature:

    public className(PrintWriter out, String name,
                        String text, TagAttr[] attrs);

    where:  out     ==> is the PrintWriter device being used to render
                        the HTML screen.  The dynamic class may write
                        whatever it chooses to this Writer.  This output
                        will replace the <$dynamic></$dynamic> tag in
                        the rendered screen.

            name    ==> The field name supplied in the <$dynamic> tag
                        name attribute or an empty string if one wasn't
                        supplied.

            text    ==> The text value of the field.  This can come from
                        the HTML source or be supplied by the application
                        via the setValue() or setText() methods.

            attrs   ==> An array of name/value attributes supplied with the
                        <$dynamic> tag.  These can be anything the application
                        chooses.  The TagAttr interface supplies a getName()
                        method to retrieve the attribute name.  It also
                        supplies a getValue() method that with return the
                        attribute value if one was present.

    Note that the class specified must be in the current classpath, be a public
    class and define the above public constructor.

Select list <SELECT ...></SELECT>

    getValue()
        Returns the value that will be returned by the field.
        Note that the two parameter version of getValue must be
        used to get the value of a particular option.  If the one
        parameter version is used the value returned will be that
        of the first option entry.

    setValue()
        Sets the value that will be returned by the field.
        Note that the three parameter version of getValue must be
        used to get the value of a particular button.  If the two
        parameter version is used the value of the first option
        entry will be set.

    getText()
        Returns the text associated with a select list option.
        Note that the two parameter version of getText must be
        used to get the text of a particular option.  If the one
        parameter version is used the text returned will be that
        of the first option entry.

    setText()
        Sets the text associated with a select option.  Note that
        the three parameter version of getText must be used to set the
        text of a particular option.  If the two parameter version is
        used the text returned will be that of the first option
        entry.

    hide()
        If true the HTML for the select list will be omitted from
        the generated HTML.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the HTML for the select list will be omitted from
        the generated HTML.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        All option entries are removed from the select list.

    select()
        Selects or deselects an option entry in a select list.

    addOption()
        Adds a new option to the end of a select list.

Textarea    <TEXTAREA ...></TEXTAREA>

    getValue()
        Returns the value that will be displayed in the textarea.

    setValue()
        Sets the value that will be displayed in the textarea.

    getText()
        Same as getValue()

    setText()
        Same as setValue()

    hide()
        If true the field will not be rendered in the HTML file.

    isHidden()
        Returns true or false depending on the hidden state of the field.

    disable()
        If true the field will not be rendered in the HTML file.

    isDisabled()
        Returns true or false depending on the disabled state of the field.

    reset()
        The field value is set to an empty string.

    select()
        Has no effect on this type of field.

    addOption()
        Has no effect on this type of field.


-------------------------------------------------------------------------------------------
Bob Withers                                    Two things are infinite: the universe 
and
[EMAIL PROTECTED]                            human stupidity, and I'm not sure about
http://www.pobox.com/~bwit       the universe.     - Albert Einstein
-------------------------------------------------------------------------------------------
----- BEGIN GEEK CODE BLOCK -----
Version 3.1 http://www.geekcode.com
GCS d- s: a+ C++ UO++ P L++ E--- W++ N++ o-- w++
O M V- PS PE Y+ PGP t+ 5 X++ r* tv+ b++ DI++ D--- G
e++ h--- r+++ y+++
----- END GEEK CODE BLOCK -----




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to