2004.04.29


com.jdc.http.jsp
Class JspView

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.lang.SerializableObject
              |
              +--com.jdc.app.mvc.View
                    |
                    +--com.jdc.http.mvc.HttpView
                          |
                          +--com.jdc.http.jsp.JspView
All Implemented Interfaces:
Serializable

public class JspView
extends HttpView

JspView encapsulates the basic information, i.e. the JspView in a Model-View-Controller (MVC) framework, to be displayed to the user. For this class,, the view to be displayed to the user is a JavaServer Page (JSP).

Version:
1.0
Author:
Jay Damon
See Also:
FormField, Property, Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jdc.http.mvc.HttpView
HttpView.Status
 
Field Summary
protected static String FORM_NAME_SEPARATOR
          The default form name separator character.
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
JspView()
          Constructs a JspView object.
 
Method Summary
 void addColumns()
          Add HTML column tags to all display view input fields.
 void addComment(String text)
          Add comment (usually for debugging);
 void addRows()
          Add HTML row tags to all display view input fields.
protected  String checkFieldValue(String currentValue, String newValue)
          Check the input field value and set the appropriate display view status flags.
 String getAlertMessage()
          Returns the alert message, if one exists, to display to the user.
 String getComments()
          Get HTML comments.
 String getCopyright()
          Returns the copyright to display to the user.
 JspDocument getDocument()
          Returns the document to display to the user.
 String getErrorMessage()
          Returns the first view error message.
 Form getForm()
          Returns the Form object for this HTML page.
 String getIcon()
          Returns the icon link URL.
 String getJavaScript()
          Returns the JavaScript functions required for this HTML page.
 String getStyle()
          Returns the style definitions required for this HTML page.
 String getStyleSheet()
          Returns the style sheet required for this HTML page.
 Title getTitle()
          Returns the Title object for this HTML page.
 boolean isErrors()
          Returns true if the display view has input field errors.
 boolean isNoErrors()
          Returns true if the display view has no input field errors.
 void reset()
          Reset the display view, i.e.
 void setComment(String text)
          Set comment (usually for debugging);
 void setCopyright(String copyright)
          Sets the copyright to display to the user.
 void setIcon(String iconURL)
          Sets the icon URL.
 void setJavaScript(String javascript)
          Sets the JavaScript functions required for this HTML page.
 void setStyle(String pageStyle)
          Sets the style definitions required for this HTML page.
 void setStyleSheet(String stylesheet)
          Sets the style sheet required for this HTML page.
 void setTitle(String title)
          Sets the title for this HTML page.
 
Methods inherited from class com.jdc.http.mvc.HttpView
getStatus, getURL, setURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORM_NAME_SEPARATOR

protected static final String FORM_NAME_SEPARATOR
The default form name separator character.

See Also:
Constant Field Values
Constructor Detail

JspView

public JspView()
Constructs a JspView object.

Method Detail

addColumns

public void addColumns()
Add HTML column tags to all display view input fields.


addComment

public void addComment(String text)
Add comment (usually for debugging);


addRows

public void addRows()
Add HTML row tags to all display view input fields. Adding HTML row tags implies adding HTML column tags to the input fields as well.


checkFieldValue

protected String checkFieldValue(String currentValue,
                                 String newValue)
Check the input field value and set the appropriate display view status flags. Returns the appropriate string value.

Returns:
String The returned field value.

getAlertMessage

public String getAlertMessage()
Returns the alert message, if one exists, to display to the user.

Returns:
String

getComments

public String getComments()
Get HTML comments.


getCopyright

public String getCopyright()
Returns the copyright to display to the user.

Returns:
String

getDocument

public JspDocument getDocument()
Returns the document to display to the user.

Returns:
JspDocument

getErrorMessage

public String getErrorMessage()
Returns the first view error message.

Returns:
String

getForm

public Form getForm()
Returns the Form object for this HTML page.

Returns:
The Form object for this HTML page.

getIcon

public String getIcon()
Returns the icon link URL.

Returns:
String

getJavaScript

public String getJavaScript()
Returns the JavaScript functions required for this HTML page.

Returns:
String

getStyle

public String getStyle()
Returns the style definitions required for this HTML page.

Returns:
String

getStyleSheet

public String getStyleSheet()
Returns the style sheet required for this HTML page.

Returns:
String

getTitle

public Title getTitle()
Returns the Title object for this HTML page.

Returns:
The Title object for this HTML page.

isErrors

public boolean isErrors()
Returns true if the display view has input field errors.

Returns:
boolean

isNoErrors

public boolean isNoErrors()
Returns true if the display view has no input field errors.

Returns:
boolean

reset

public void reset()
Reset the display view, i.e. reset all input field error flags and messages.


setComment

public void setComment(String text)
Set comment (usually for debugging);


setCopyright

public void setCopyright(String copyright)
Sets the copyright to display to the user.


setIcon

public void setIcon(String iconURL)
Sets the icon URL.

Parameters:
iconURL - The icon URL.

setJavaScript

public void setJavaScript(String javascript)
Sets the JavaScript functions required for this HTML page.


setStyle

public void setStyle(String pageStyle)
Sets the style definitions required for this HTML page.


setStyleSheet

public void setStyleSheet(String stylesheet)
Sets the style sheet required for this HTML page.


setTitle

public void setTitle(String title)
Sets the title for this HTML page.


2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.