cmu.survey.jsp.tags
Class SurveyAuto

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
                      extended by cmu.survey.jsp.tags.SurveyAuto
All Implemented Interfaces:
SurveyDataCache, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class SurveyAuto
extends SurveyPage

See Also:
Serialized Form

Field Summary
protected  Survey dataSurvey
           
 
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
SurveyAuto()
           
 
Method Summary
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.lang.String getCurrentPageSaveInfo()
          For saving which page we're on.
protected  java.lang.String getCurrentPageURLFromPageSaveInfo(java.lang.String pageSaveInfo)
          Complements the next method.
protected  Survey getDataSurvey()
           
protected  java.lang.String getNextPage()
          Called to check what the next page is.
protected  java.lang.String getPageURLTo(int pageNumber)
           
protected  java.lang.String getSessionPageString(javax.servlet.jsp.PageContext pageContext, java.lang.String attributeName)
          Similar to Survey.getLoginPageString(java.lang.String) May be overridden by subclasses who have a different concept of what this page is, e.g.
protected  java.lang.String getThisPageURL()
           
static void initTranslator()
           
 void reinit()
           
 
Methods inherited from class cmu.survey.jsp.tags.SurveyPage
doEndTag, getAuxillaryFeatureQuestions, getPageData, getPageNumber, getRepeatedMeasureTable, getRepeatedMeasureValues, hasMoreRepeatedMeasures, setPage, setPageData, setPageName, setRepeatedMeasureTable, setRepeatedMeasureValues
 
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, getDataBitStorage, getDataStorage, getDataTable, getDeleteImage, getDeleteImageDown, getDeleteImageRollover, getEmailResultsSubjectLine, getEmailResultsTo, getFontSize, getHeaderBackgroundColor, getIsLoginPage, getLastBackgroundColorAlternation, getLastQuestionInHistory, getLoginPageString, getNeverMakeNewRecord, getNextPageIfDeleteOrAdd, getPageContext, getPageToLoginTo, getPageToRedirectToWhenLoginError, getPageWidth, getPercentQuestion, getPrintErrorMessagesInline, getRememberPageUserIsOn, getRepeatedMeasureDbField, getRepeatedMeasureVariable, getRetrieveValuesFromDB, getSavedLoginInfo, 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
 

Field Detail

dataSurvey

protected Survey dataSurvey
Constructor Detail

SurveyAuto

public SurveyAuto()
Method Detail

getThisPageURL

protected java.lang.String getThisPageURL()

getPageURLTo

protected java.lang.String getPageURLTo(int pageNumber)

getSessionPageString

protected java.lang.String getSessionPageString(javax.servlet.jsp.PageContext pageContext,
                                                java.lang.String attributeName)
Description copied from class: Survey
Similar to Survey.getLoginPageString(java.lang.String) May be overridden by subclasses who have a different concept of what this page is, e.g. SurveyAuto.

Overrides:
getSessionPageString in class Survey

getCurrentPageURLFromPageSaveInfo

protected java.lang.String getCurrentPageURLFromPageSaveInfo(java.lang.String pageSaveInfo)
Description copied from class: Survey
Complements the next method. Is basically the same -- should return the

Overrides:
getCurrentPageURLFromPageSaveInfo in class Survey
Parameters:
pageSaveInfo - the info saved, as per getCurrentPageSaveInfo().
Returns:
the partial URL for the next page.

getNextPage

protected java.lang.String getNextPage()
Description copied from class: Survey
Called to check what the next page is. Can be overridden by subclasses. When subclasess return a page, it will use that as the next page to go to, after this page is finished. This may return null. This will be called once before the user has logged in. At that time, it's not necessary to return the right thing -- it can return null. When it it called after the user has logged in (i.e. getSavedLoginInfo()!=null if user has logged in), it means that we're about to transition to the new page, so this should not return null unless it is intended to stay on the same page. Return null at any time to stay on the same page.

Overrides:
getNextPage in class Survey
Returns:

getDataSurvey

protected Survey getDataSurvey()

getCurrentPageSaveInfo

protected java.lang.String getCurrentPageSaveInfo()
For saving which page we're on. This method may be overridden to save different information about what page we should be on (and is overridden in SurveyAuto) This method is assumed to send back database-clean information -- no apostrophes, no backslashes, etc.

Overrides:
getCurrentPageSaveInfo in class Survey

initTranslator

public static void initTranslator()

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 SurveyPage

doQuestionStuff

protected void doQuestionStuff()
Description copied from class: SurveyPage
So it can be overridden to have more questions, etc.

Overrides:
doQuestionStuff in class SurveyPage

reinit

public void reinit()
Overrides:
reinit in class SurveyPage