cmu.survey.jsp.tags
Class SurveyPage

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by cmu.survey.jsp.tags.DatabaseConnection
          extended by cmu.survey.jsp.tags.Survey
              extended by cmu.survey.jsp.tags.SurveyBlank
                  extended by cmu.survey.jsp.tags.SurveyPage
All Implemented Interfaces:
SurveyDataCache, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
SurveyAuto

public class SurveyPage
extends SurveyBlank

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cmu.survey.jsp.tags.SurveyBlank
DEFAULT_USER_ID_FIELD
 
Fields inherited from class cmu.survey.jsp.tags.Survey
BackgroundColor1Default, BackgroundColor2Default, clearBackgroundColorDefault, countTimesVisitingPageField, createUsersAtLogin, databaseQuery, dataStorage, debug, deleteImage, deleteImageDown, deleteImageRollover, emailResultsSubjectLine, emailResultsTo, fontSize, fontSizeDefault, HeaderBackgroundColorDefault, ignoreWrongTechniqueError, isLoginPage, neverMakeNewRecord, nextPage, nextPageIfDeleteOrAdd, pageToLoginTo, pageToRedirectToWhenLoginError, pageWidth, pageWidthDefault, percentQuestion, printErrorMessagesInline, QUESTION_INFO_CACHE_STRING, questionsAndInfo, rememberPageUserIsOn, repeatedMeasureDbField, repeatedMeasureValueNumber, repeatedMeasureValueString, retrieveValuesFromDB, showDeleteButton, showSubmitButton, showSubmitButtonOnlyIfNoJavaScript, showUserErrorMessage, skippedBody, submitImage, submitImageDown, submitImageRollover, table, tableToVerifyLoginTo, userHasSetRetrieveValuesFromDB, userHasSetShowDeleteButton, userIDField, userIDValue, where, whereWasSetByUser
 
Fields inherited from class cmu.survey.jsp.tags.DatabaseConnection
databaseConnectionString, databaseType, MS_ACCESS, MYSQL, ODBC, out, session, theConnect, theRequest
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
SurveyPage()
           
 
Method Summary
 int doEndTag()
          This function closes the connection when the ending tag is encountered
protected  void doQuestionStuff()
          So it can be overridden to have more questions, etc.
 int doStartTag()
          This function opens a connection to the requested database when the tag is first encountered
protected  java.util.Vector<Question> getAuxillaryFeatureQuestions()
          This initialized special features after logging in, but before doing questions.
protected  Page getPageData()
           
 java.lang.Integer getPageNumber()
           
 java.lang.String getRepeatedMeasureTable()
           
 java.lang.Object[] getRepeatedMeasureValues()
           
protected  boolean hasMoreRepeatedMeasures()
          This both sets the right thing, and returns whether or not there are repeated measures to handle.
 void reinit()
           
 void setPage(int i)
           
protected  void setPageData(Page pageData)
           
 void setPageName(java.lang.String pageName)
           
 void setRepeatedMeasureTable(java.lang.String repeatedMeasureTable)
           
 void setRepeatedMeasureValues(java.lang.Object[] repeatedMeasureValues)
           
 
Methods inherited from class cmu.survey.jsp.tags.SurveyBlank
initializeAtStartTag
 
Methods inherited from class cmu.survey.jsp.tags.Survey
addQuestionInfoToHistory, addToWhereForAuxillaryFeatureQuestion, cleanStringValueForApostrophesOnly, doDataStuff, getBackgroundColor1, getBackgroundColor2, getCachedDataByPage, getCachedDataIgnoringPage, getClearBackgroundColor, getCreateUsersAtLogin, getCurrentPageSaveInfo, getCurrentPageURLFromPageSaveInfo, getDataBitStorage, getDataStorage, getDataTable, getDeleteImage, getDeleteImageDown, getDeleteImageRollover, getEmailResultsSubjectLine, getEmailResultsTo, getFontSize, getHeaderBackgroundColor, getIsLoginPage, getLastBackgroundColorAlternation, getLastQuestionInHistory, getLoginPageString, getNeverMakeNewRecord, getNextPage, getNextPageIfDeleteOrAdd, getPageContext, getPageToLoginTo, getPageToRedirectToWhenLoginError, getPageWidth, getPercentQuestion, getPrintErrorMessagesInline, getRememberPageUserIsOn, getRepeatedMeasureDbField, getRepeatedMeasureVariable, getRetrieveValuesFromDB, getSavedLoginInfo, getSessionPageString, getSessionVariableByPage, getSessionVariableFromLoginPage, getShowAMessageAboutSubmission, getShowDeleteButton, getShowSubmitButton, getShowSubmitButtonOnlyIfNoJavaScript, getSubmitButtonText, getSubmitImage, getSubmitImageDown, getSubmitImageRollover, getTable, getTableStorage, getTableToVerifyLoginTo, getTimeResponses, getUserIDField, getWhere, goToNextPage, isIgnoreWrongTechniqueError, isShowUserErrorMessages, isUserIDValueANumber, makeAutomaticLoginInfo, saveErrorInfo, saveErrorInfo, saveLoginInfo, setBackgroundColor1, setBackgroundColor2, setCachedDataByPage, setCachedDataIgnoringPage, setClearBackgroundColor, setCountTimesVisitingPageField, setCreateUsersAtLogin, setDeleteImage, setDeleteImageDown, setDeleteImageRollover, setEmailResultsSubjectLine, setEmailResultsTo, setHeaderBackgroundColor, setIgnoreWrongTechniqueError, setIsLoginPage, setLastBackgroundColorAlternation, setNeverMakeNewRecord, setNextPage, setNextPageIfDeleteOrAdd, setPageToLoginTo, setPageToRedirectToWhenLoginError, setPageWidth, setPercentQuestion, setPrintErrorMessagesInline, setRememberPageUserIsOn, setRepeatedMeasureDbField, setRepeatedMeasureNumber, setRepeatedMeasureValue, setRepeatedMeasureValue, setRepeatedMeasureValue, setRepeatedMeasureVariable, setRetrieveValuesFromDB, setSessionVariableFromLoginPage, setShowAMessageAboutSubmission, setShowDeleteButton, setShowSubmitButton, setShowSubmitButtonOnlyIfNoJavaScript, setShowUserErrorMessages, setSubmitButtonText, setSubmitImage, setSubmitImageDown, setSubmitImageRollover, setTable, setTableToVerifyLoginTo, setTimeResponses, setUserIDField, setWhere, showAMessage
 
Methods inherited from class cmu.survey.jsp.tags.DatabaseConnection
checkSQLFieldValid, cleanString, cleanStringBetter, cleanStringThatShouldHaveBeenClean, close, doCatch, doConnection, doFinally, finalize, getConnect, getDatabaseConnectionFrom, getDatabaseName, getDatabaseProgramName, getDatabaseType, getDebuggingInfo, getHelpURL, getLastExceptionThrown, getMySqlDatabaseHost, getMySqlDatabaseName, getMySqlDatabasePassword, getMySqlDatabaseUser, getSession, getThisFolderURL, getThisFullURL, getURLFileName, isOpen, parseAndCleanNumberStringThatShouldHaveBeenClean, parseAndCleanNumberStringThatShouldHaveBeenCleanStatic, saveBugMessage, saveBugMessage, saveNotificationMessage, saveNotificationMessage, setDatabaseName, setHttpServletRequest, setLastExceptionThrownToNull, setPageContext, setSendErrorMessages
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurveyPage

public SurveyPage()
Method Detail

getPageNumber

public java.lang.Integer getPageNumber()

setPage

public void setPage(int i)

setPageName

public void setPageName(java.lang.String pageName)

getRepeatedMeasureValues

public java.lang.Object[] getRepeatedMeasureValues()
Returns:
Returns the repeatedMeasureValues.

setRepeatedMeasureValues

public void setRepeatedMeasureValues(java.lang.Object[] repeatedMeasureValues)
Parameters:
repeatedMeasureValues - The repeatedMeasureValues to set.

setPageData

protected void setPageData(Page pageData)

getRepeatedMeasureTable

public java.lang.String getRepeatedMeasureTable()
Returns:
Returns the repeatedMeasureTable.

setRepeatedMeasureTable

public void setRepeatedMeasureTable(java.lang.String repeatedMeasureTable)
Parameters:
repeatedMeasureTable - The repeatedMeasureTable to set.

getPageData

protected Page getPageData()

doStartTag

public int doStartTag()
Description copied from class: DatabaseConnection
This function opens a connection to the requested database when the tag is first encountered

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class Survey

hasMoreRepeatedMeasures

protected boolean hasMoreRepeatedMeasures()
This both sets the right thing, and returns whether or not there are repeated measures to handle.

Returns:
whether or not there are more repeated measures on this page.

getAuxillaryFeatureQuestions

protected java.util.Vector<Question> getAuxillaryFeatureQuestions()
Description copied from class: Survey
This initialized special features after logging in, but before doing questions. It returns questions to represent those special features. Currently, the special features are only:
  1. User IDs and logging in
  2. Repeated Measures
Thes questions should then:
  1. if they are keys: be added to the WHERE clause for the database queries
  2. get printed in printStartForm()
Subclasses should definitely call this first, and then add their options to it. They may want to set repeated measure options before letting this be called.

Overrides:
getAuxillaryFeatureQuestions in class Survey
Returns:
a vector of HiddenQuestion

doQuestionStuff

protected void doQuestionStuff()
So it can be overridden to have more questions, etc.


doEndTag

public int doEndTag()
Description copied from class: DatabaseConnection
This function closes the connection when the ending tag is encountered

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class Survey

reinit

public void reinit()
Overrides:
reinit in class SurveyBlank