org.dbforms.taglib
Class DbFormTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.dbforms.taglib.AbstractScriptHandlerTag
              extended by org.dbforms.taglib.DbFormTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally, ISqlFilter

public class DbFormTag
extends AbstractScriptHandlerTag
implements ISqlFilter, javax.servlet.jsp.tagext.TryCatchFinally

This is the root element of a data manipulation form

Author:
Joachim Peer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
DbFormTag()
           
 
Method Summary
 void addChildName(String tableFieldName, String dbFormGeneratedName)
          Adds a feature to the ChildName attribute of the DbFormTag object
 void addJavascriptFunction(String jsFctName, StringBuffer jsFct)
          Adds a feature to the JavascriptFunction attribute of the DbFormTag object
 void addValidationForm(String formName, Hashtable childFields)
          DOCUMENT ME!
 void appendToChildElementOutput(String str)
          Append the input string to the childElementOutput stringBuffer.
 int doAfterBody()
          DOCUMENT ME!
 int doEndTag()
          D O E N D T A G
 void doFinally()
          DOCUMENT ME!
 int doStartTag()
          Philip Grunikiewicz 2001-08-17 Added an attribute to allow developer to bypass navigation: If we are not going to use navigation, eliminate the creation of, and execution of "fancy!"
 boolean existJavascriptFunction(String jsFctName)
          Check if the input name of the JavaScript function exists.
 String getAction()
          Get the action attribute value.
 String getAutocomplete()
          DOCUMENT ME!
 String getAutoUpdate()
          Gets the autoUpdate attribute of the DbFormTag object
 String getChildField()
          Gets the childField attribute of the DbFormTag object
 int getCount()
          Gets the count attribute of the DbFormTag object
 int getCurrentCount()
          Gets the currentCount attribute of the DbFormTag object
 String getDbConnectionName()
          Gets the dbConnectionName attribute of the DbFormTag object
 String getFilter()
          Gets the filter attribute of the DbFormTag object
 String getFollowUp()
          Gets the followUp attribute of the DbFormTag object
 String getFollowUpOnError()
          Gets the followUpOnError
 String getFormValidatorName()
          Gets the formValidatorName attribute of the DbFormTag object
 Hashtable getGotoHt()
          Gets the gotoHt attribute of the DbFormTag object
 String getGotoPrefix()
          Gets the gotoPrefix attribute of the DbFormTag object
 String getJavascriptValidationSrcFile()
          Gets the javascriptValidationSrcFile attribute of the DbFormTag object
 Locale getLocale()
          Returns the locale the form is created with.
 String getLocalWebEvent()
          Gets the localWebEvent attribute of the DbFormTag object
 String getMaxRows()
          Gets the maxRows attribute of the DbFormTag object
 String getName()
          DOCUMENT ME!
 String getOnSubmit()
          Get the onSubmit attribute.
 String getOrderBy()
          Gets the orderBy attribute of the DbFormTag object
 FieldValues getOrderFields()
          DOCUMENT ME!
 String getOverrideFieldCheck()
          DOCUMENT ME!
 String getParentField()
          Gets the parentField attribute of the DbFormTag object
 DbFormTag getParentForm()
          Gets the parentForm DbFormTag object
 String getPositionPath()
          Gets the positionPath attribute of the DbFormTag object
 String getPositionPathCore()
          Gets the positionPathCore attribute of the DbFormTag object.
 ResultSetVector getResultSetVector()
          Gets the resultSetVector attribute of the DbFormTag object
 String getSearchFilterRequired()
           
 String getSqlFilter()
          DOCUMENT ME!
 Table getTable()
          Gets the table attribute of the DbFormTag object
 String getTableList()
          Get the table list attribute.
 String getTableName()
          Gets the tableName attribute of the DbFormTag object
 String getTarget()
          Gets the target attribute of the DbFormTag object
 AbstractWebEvent getWebEvent()
          DOCUMENT ME!
 String getWhereClause()
          Gets the whereClause attribute of the DbFormTag object
 boolean hasCaptionResourceSet()
          Gets the captionResource attribute of the DbFormTag object
 boolean hasJavascriptFieldsArraySet()
          Gets the javascriptFieldsArray attribute of the DbFormTag object
 boolean hasJavascriptValidationSet()
          Gets the javascriptValidation attribute of the DbFormTag object
 boolean hasMultipartSet()
          Description of the Method
 boolean hasReadOnlySet()
          Gets the readOnly attribute of the DbFormTag object
 boolean hasRedisplayFieldsOnErrorSet()
          Get the redisplayFieldsOnError attribute.
 boolean isFooterReached()
          Gets the footerReached attribute of the DbFormTag object
 boolean isSubForm()
          Gets the subForm attribute of the DbFormTag object
 String produceLinkedTags()
          DOCUMENT ME!
 void setAction(String newAction)
          Set the action attribute value.
 void setAutocomplete(String string)
          DOCUMENT ME!
 void setAutoUpdate(String autoUpdate)
          Sets the autoUpdate attribute of the DbFormTag object
 void setCaptionResource(String res)
          Sets the captionResource attribute of the DbFormTag object
 void setChildField(String childField)
          Sets the childField attribute of the DbFormTag object
 void setDbConnectionName(String dbConnectionName)
          Sets the dbConnectionName attribute of the DbFormTag object
 void setFilter(String filter)
          Sets the filter attribute of the DbFormTag object
 void setFollowUp(String followUp)
          Sets the followUp attribute of the DbFormTag object
 void setFollowUpOnError(String followUpOnError)
          Sets the followUpOnError attribute
 void setFooterReached(boolean footerReached)
          Sets the footerReached attribute of the DbFormTag object
 void setFormValidatorName(String fv)
          Sets the formValidatorName attribute of the DbFormTag object
 void setGotoHt(Hashtable gotoHt)
          Sets the gotoHt attribute of the DbFormTag object
 void setGotoPrefix(String gotoPrefix)
          Sets the gotoPrefix attribute of the DbFormTag object
 void setJavascriptFieldsArray(String jfa)
          Sets the javascriptFieldsArray attribute of the DbFormTag object
 void setJavascriptValidation(String jsv)
          Sets the javascriptValidation attribute of the DbFormTag object
 void setJavascriptValidationSrcFile(String jsvs)
          Sets the javascriptFieldsArray attribute of the DbFormTag object
 void setLocalWebEvent(String localWebEvent)
          Sets the localWebEvent attribute of the DbFormTag object
 void setMaxRows(String maxRows)
          Sets the maxRows attribute of the DbFormTag object
 void setMultipart(String value)
          Sets the multipart attribute of the DbFormTag object
 void setName(String string)
          DOCUMENT ME!
 void setOnSubmit(String newonSubmit)
          Set the onSubmit attribute value
 void setOrderBy(String orderBy)
          Sets the orderBy attribute of the DbFormTag object
 void setOverrideFieldCheck(String string)
          DOCUMENT ME!
 void setParent(javax.servlet.jsp.tagext.Tag p)
          Set the parent tag
 void setParentField(String parentField)
          Sets the parentField attribute of the DbFormTag object
 void setReadOnly(String readOnly)
          Sets the readOnly attribute of the DbFormTag object
 void setRedisplayFieldsOnError(String newRedisplayFieldsOnError)
          Set the redisplayFieldsOnError attribute
 void setSearchFilterRequired(String searchFilterRequired)
           
 void setSqlFilter(String string)
          DOCUMENT ME!
 void setTableList(String tableList)
          Set the table list attribute value
 void setTableName(String tableName)
          Sets the tableName attribute of the DbFormTag object
 void setTarget(String target)
          Sets the target attribute of the DbFormTag object
 void setWhereClause(String wc)
          Sets the whereClause attribute of the DbFormTag object
 void strikeOut(Field f)
          This method gets called by input-tags like "DbTextFieldTag" and others.
 void updatePositionPath()
          Update the position path.
 
Methods inherited from class org.dbforms.taglib.AbstractScriptHandlerTag
doCatch, getAccessKey, getConfig, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getStyleClass, getTabIndex, getTitle, prepareEventHandlers, prepareStyles, setAccessKey, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyleClass, setTabIndex, setTitle
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.TryCatchFinally
doCatch
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext
 

Constructor Detail

DbFormTag

public DbFormTag()
Method Detail

setAction

public void setAction(String newAction)
Set the action attribute value.

Parameters:
newAction - the new attribute value

getAction

public String getAction()
Get the action attribute value.

Returns:
the action attribute value

setAutoUpdate

public void setAutoUpdate(String autoUpdate)
Sets the autoUpdate attribute of the DbFormTag object

Parameters:
autoUpdate - The new autoUpdate value

getAutoUpdate

public String getAutoUpdate()
Gets the autoUpdate attribute of the DbFormTag object

Returns:
The autoUpdate value

setAutocomplete

public void setAutocomplete(String string)
DOCUMENT ME!

Parameters:
string -

getAutocomplete

public String getAutocomplete()
DOCUMENT ME!

Returns:
autocomplete

setCaptionResource

public void setCaptionResource(String res)
Sets the captionResource attribute of the DbFormTag object

Parameters:
res - The new captionResource value

setChildField

public void setChildField(String childField)
Sets the childField attribute of the DbFormTag object

Parameters:
childField - The new childField value

getChildField

public String getChildField()
Gets the childField attribute of the DbFormTag object

Returns:
The childField value

getCount

public int getCount()
Gets the count attribute of the DbFormTag object

Returns:
The count value

getCurrentCount

public int getCurrentCount()
Gets the currentCount attribute of the DbFormTag object

Returns:
The currentCount value

setDbConnectionName

public void setDbConnectionName(String dbConnectionName)
Sets the dbConnectionName attribute of the DbFormTag object

Parameters:
dbConnectionName - The new dbConnectionName value

getDbConnectionName

public String getDbConnectionName()
Gets the dbConnectionName attribute of the DbFormTag object

Returns:
The dbConnectionName value

setFilter

public void setFilter(String filter)
Sets the filter attribute of the DbFormTag object

Parameters:
filter - The new filter value

getFilter

public String getFilter()
Gets the filter attribute of the DbFormTag object

Returns:
The filter value

setFollowUp

public void setFollowUp(String followUp)
Sets the followUp attribute of the DbFormTag object

Parameters:
followUp - The new followUp value

getFollowUp

public String getFollowUp()
Gets the followUp attribute of the DbFormTag object

Returns:
The followUp value

setFollowUpOnError

public void setFollowUpOnError(String followUpOnError)
Sets the followUpOnError attribute

Parameters:
followUpOnError - The followUpOnError to set

getFollowUpOnError

public String getFollowUpOnError()
Gets the followUpOnError

Returns:
Returns a String

setFooterReached

public void setFooterReached(boolean footerReached)
Sets the footerReached attribute of the DbFormTag object

Parameters:
footerReached - The new footerReached value

isFooterReached

public boolean isFooterReached()
Gets the footerReached attribute of the DbFormTag object

Returns:
The footerReached value

setFormValidatorName

public void setFormValidatorName(String fv)
Sets the formValidatorName attribute of the DbFormTag object

Parameters:
fv - The new formValidatorName value

getFormValidatorName

public String getFormValidatorName()
Gets the formValidatorName attribute of the DbFormTag object

Returns:
The formValidatorName value

setGotoHt

public void setGotoHt(Hashtable gotoHt)
Sets the gotoHt attribute of the DbFormTag object

Parameters:
gotoHt - The new gotoHt value

getGotoHt

public Hashtable getGotoHt()
Gets the gotoHt attribute of the DbFormTag object

Returns:
The gotoHt value

setGotoPrefix

public void setGotoPrefix(String gotoPrefix)
Sets the gotoPrefix attribute of the DbFormTag object

Parameters:
gotoPrefix - The new gotoPrefix value

getGotoPrefix

public String getGotoPrefix()
Gets the gotoPrefix attribute of the DbFormTag object

Returns:
The gotoPrefix value

setJavascriptFieldsArray

public void setJavascriptFieldsArray(String jfa)
Sets the javascriptFieldsArray attribute of the DbFormTag object

Parameters:
jfa - The new javascriptFieldsArray value

setJavascriptValidation

public void setJavascriptValidation(String jsv)
Sets the javascriptValidation attribute of the DbFormTag object

Parameters:
jsv - The new javascriptValidation value

setJavascriptValidationSrcFile

public void setJavascriptValidationSrcFile(String jsvs)
Sets the javascriptFieldsArray attribute of the DbFormTag object

Parameters:
jsvs - The javascriptFieldsArray value

getJavascriptValidationSrcFile

public String getJavascriptValidationSrcFile()
Gets the javascriptValidationSrcFile attribute of the DbFormTag object

Returns:
The javascriptValidationSrcFile value

setLocalWebEvent

public void setLocalWebEvent(String localWebEvent)
Sets the localWebEvent attribute of the DbFormTag object

Parameters:
localWebEvent - The new localWebEvent value

getLocalWebEvent

public String getLocalWebEvent()
Gets the localWebEvent attribute of the DbFormTag object

Returns:
The localWebEvent value

getLocale

public Locale getLocale()
Returns the locale the form is created with. Can be readed from other tags

Returns:
DOCUMENT ME!

setMaxRows

public void setMaxRows(String maxRows)
Sets the maxRows attribute of the DbFormTag object

Parameters:
maxRows - The new maxRows value

getMaxRows

public String getMaxRows()
Gets the maxRows attribute of the DbFormTag object

Returns:
The maxRows value

setMultipart

public void setMultipart(String value)
Sets the multipart attribute of the DbFormTag object

Parameters:
value - The new multipart value

setName

public void setName(String string)
DOCUMENT ME!

Parameters:
string -

getName

public String getName()
DOCUMENT ME!

Returns:

setOnSubmit

public void setOnSubmit(String newonSubmit)
Set the onSubmit attribute value

Parameters:
newonSubmit - the new onSubmit value

getOnSubmit

public String getOnSubmit()
Get the onSubmit attribute.

Returns:
the onSubmit attribute

setOrderBy

public void setOrderBy(String orderBy)
Sets the orderBy attribute of the DbFormTag object

Parameters:
orderBy - The new orderBy value

getOrderBy

public String getOrderBy()
Gets the orderBy attribute of the DbFormTag object

Returns:
The orderBy value

getOrderFields

public FieldValues getOrderFields()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setOverrideFieldCheck

public void setOverrideFieldCheck(String string)
DOCUMENT ME!

Parameters:
string -

getOverrideFieldCheck

public String getOverrideFieldCheck()
DOCUMENT ME!

Returns:

setParent

public void setParent(javax.servlet.jsp.tagext.Tag p)
Set the parent tag

Specified by:
setParent in interface javax.servlet.jsp.tagext.Tag
Overrides:
setParent in class javax.servlet.jsp.tagext.TagSupport
Parameters:
p - the parent tag

setParentField

public void setParentField(String parentField)
Sets the parentField attribute of the DbFormTag object

Parameters:
parentField - The new parentField value

getParentField

public String getParentField()
Gets the parentField attribute of the DbFormTag object

Returns:
The parentField value

getPositionPath

public String getPositionPath()
Gets the positionPath attribute of the DbFormTag object

Returns:
The positionPath value

getPositionPathCore

public String getPositionPathCore()
Gets the positionPathCore attribute of the DbFormTag object.

Returns:
The positionPathCore value

setReadOnly

public void setReadOnly(String readOnly)
Sets the readOnly attribute of the DbFormTag object

Parameters:
readOnly - The new readOnly value

setRedisplayFieldsOnError

public void setRedisplayFieldsOnError(String newRedisplayFieldsOnError)
Set the redisplayFieldsOnError attribute

Parameters:
newRedisplayFieldsOnError - the new redisplayFieldsOnError value

getResultSetVector

public ResultSetVector getResultSetVector()
Gets the resultSetVector attribute of the DbFormTag object

Returns:
The resultSetVector value

setSqlFilter

public void setSqlFilter(String string)
DOCUMENT ME!

Specified by:
setSqlFilter in interface ISqlFilter
Parameters:
string -

getSqlFilter

public String getSqlFilter()
DOCUMENT ME!

Specified by:
getSqlFilter in interface ISqlFilter
Returns:

isSubForm

public boolean isSubForm()
Gets the subForm attribute of the DbFormTag object

Returns:
The subForm value

getParentForm

public DbFormTag getParentForm()
Gets the parentForm DbFormTag object

Returns:
The parentForm value

getTable

public Table getTable()
Gets the table attribute of the DbFormTag object

Returns:
The table value

setTableList

public void setTableList(String tableList)
Set the table list attribute value

Parameters:
tableList - the new tableList value

getTableList

public String getTableList()
Get the table list attribute.

Returns:
the table list string

setTableName

public void setTableName(String tableName)
                  throws Exception
Sets the tableName attribute of the DbFormTag object

Parameters:
tableName - The new tableName value
Throws:
Exception - DOCUMENT ME!

getTableName

public String getTableName()
Gets the tableName attribute of the DbFormTag object

Returns:
The tableName value

setTarget

public void setTarget(String target)
Sets the target attribute of the DbFormTag object

Parameters:
target - The new target value

getTarget

public String getTarget()
Gets the target attribute of the DbFormTag object

Returns:
The target value

getWebEvent

public AbstractWebEvent getWebEvent()
DOCUMENT ME!

Returns:

setWhereClause

public void setWhereClause(String wc)
Sets the whereClause attribute of the DbFormTag object

Parameters:
wc - The new whereClause value

getWhereClause

public String getWhereClause()
Gets the whereClause attribute of the DbFormTag object

Returns:
The whereClause value

addChildName

public void addChildName(String tableFieldName,
                         String dbFormGeneratedName)
Adds a feature to the ChildName attribute of the DbFormTag object

Parameters:
tableFieldName - The feature to be added to the ChildName attribute
dbFormGeneratedName - The feature to be added to the ChildName attribute

addJavascriptFunction

public void addJavascriptFunction(String jsFctName,
                                  StringBuffer jsFct)
Adds a feature to the JavascriptFunction attribute of the DbFormTag object

Parameters:
jsFctName - The feature to be added to the JavascriptFunction attribute
jsFct - The feature to be added to the JavascriptFunction attribute

addValidationForm

public void addValidationForm(String formName,
                              Hashtable childFields)
DOCUMENT ME!

Parameters:
formName - DOCUMENT ME!
childFields - DOCUMENT ME!

appendToChildElementOutput

public void appendToChildElementOutput(String str)
Append the input string to the childElementOutput stringBuffer.

Parameters:
str - the string to append

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
DOCUMENT ME!

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
DOCUMENT ME!
Throws:
javax.servlet.jsp.JspException - DOCUMENT ME!

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
D O E N D T A G

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
Description of the Return Value
Throws:
javax.servlet.jsp.JspException - Description of the Exception

doFinally

public void doFinally()
DOCUMENT ME!

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally
Overrides:
doFinally in class AbstractScriptHandlerTag
See Also:
TryCatchFinally.doFinally()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Philip Grunikiewicz 2001-08-17 Added an attribute to allow developer to bypass navigation: If we are not going to use navigation, eliminate the creation of, and execution of "fancy!" queries. Henner Kollmann 2002-07-03 Added onSubmit support Philip Grunikiewicz 2001-10-22 Sometimes we use dbForms to simply display information on screen but wish to call another servlet to process the post. I've added the 'action' attribute to allow a developer to set the wanted action instead of defaulting to the dbforms control servlet. Important: Use a fully qualified path. Philip Grunikiewicz 2001-11-28 Introducing Free-form select queries. Using the whereClause attribute, developers are now able to specify the ending of an actual DbForms query. Dbforms generates the "Select From" part, and the developers have the responsibility of completing the query. ie: adding the whereClause, an orderBy, etc... Note that using this function renders navigation impossible!

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
Description of the Return Value
Throws:
javax.servlet.jsp.JspException

existJavascriptFunction

public boolean existJavascriptFunction(String jsFctName)
Check if the input name of the JavaScript function exists.

Parameters:
jsFctName - the name of the JS function
Returns:
true if the function exists, false otherwise

hasCaptionResourceSet

public boolean hasCaptionResourceSet()
Gets the captionResource attribute of the DbFormTag object

Returns:
The captionResource value

hasJavascriptFieldsArraySet

public boolean hasJavascriptFieldsArraySet()
Gets the javascriptFieldsArray attribute of the DbFormTag object

Returns:
The javascriptFieldsArray value

hasJavascriptValidationSet

public boolean hasJavascriptValidationSet()
Gets the javascriptValidation attribute of the DbFormTag object

Returns:
The javascriptValidation value

hasMultipartSet

public boolean hasMultipartSet()
Description of the Method

Returns:
Description of the Return Value

hasReadOnlySet

public boolean hasReadOnlySet()
Gets the readOnly attribute of the DbFormTag object

Returns:
The readOnly value

hasRedisplayFieldsOnErrorSet

public boolean hasRedisplayFieldsOnErrorSet()
Get the redisplayFieldsOnError attribute.
author: philip grunikiewicz
creation date: (2001-05-31 13:11:00)

Returns:
the redisplayFieldsOnError

produceLinkedTags

public String produceLinkedTags()
DOCUMENT ME!

Returns:
DOCUMENT ME!

strikeOut

public void strikeOut(Field f)
This method gets called by input-tags like "DbTextFieldTag" and others. they signalize that _they_ will generate the tag for the controller, not this form.
see produceLinkedTags().
This method is only used if this class is instantiated as sub-form (== embedded in another form's body tag)

Parameters:
f - the Field object

updatePositionPath

public void updatePositionPath()
Update the position path.


getSearchFilterRequired

public String getSearchFilterRequired()

setSearchFilterRequired

public void setSearchFilterRequired(String searchFilterRequired)


Copyright © 2002-2006 DbForms. All Rights Reserved.