|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objectplanet.survey.plugin.api.HtmlUtils
public class HtmlUtils
HTML utility class for the plugins. Produces HTML code for survey questions etc.
| Constructor Summary | |
|---|---|
HtmlUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getDropdownInputName(int qNo)
Gets the HTML input name for a dropdown input field for a question. |
static java.lang.String |
getEssayInputName(int qNo,
int index)
Deprecated. use getIntextName((int qNo, int index) |
static java.lang.String |
getFreeTextInputName(int qNo)
Gets the HTML input name for a free text input field for a question. |
static java.lang.String |
getIntextName(int qNo,
int index)
Gets the HTML input field name for an in-text element for a question at the specific index. |
static java.lang.String |
getMatrixGroupIntersectionInputName(int qNo,
int startX,
int startY)
Gets the HTML input name for a matrix group of type Intersection for a question. |
static java.lang.String |
getMatrixGroupOnePerRowInputName(int qNo,
int startX,
int startY,
int row)
Gets the HTML input name for a matrix group of type OnePerRow for a question. |
static java.lang.String |
getMatrixInputName(int qNo,
int col,
int row)
Gets the HTML input name for a matrix input field for a certain cell in a matrix question. |
static java.lang.String |
getMultipleInputName(int qNo,
int index)
Gets the HTML input name for a multiple input field for a question at a specific index, where more than one selections are allowed. |
static java.lang.String |
getMultipleOneSelectionInputName(int qNo)
Gets the HTML input name for a multiple input field for a question, where only one selection is allowed. |
static java.lang.String |
getMultipleOtherInputName(int qNo)
Gets the HTML input name for a multiple other input field for a question |
static java.lang.String |
getNumericInputName(int qNo)
Gets the HTML input name for a numeric input field for a question. |
static java.lang.String |
getQuestionHTML(User user,
long surveyId,
int questionNo,
javax.servlet.http.HttpServletRequest request)
Gets the HTML code for a question. |
static java.lang.String |
getQuestionHTML(User user,
long surveyId,
int questionNo,
javax.servlet.http.HttpServletRequest request,
PipingSource pipingSource)
Gets the HTML code for a question. |
static java.lang.String |
getRatingInputName(int qNo)
Gets the html input name for a rating input field for a question. |
static java.util.ArrayList |
getResponseList(User user,
long surveyId,
long respondentId,
java.lang.String language)
Gets a list of response html, each item in the list contains a label/value pair where label is question text(with essay responses) and value is html for a question response. |
static java.lang.String |
getSingleResponse(User user,
long surveyId,
long respondentId,
java.lang.String language)
Gets a string representation of a single response |
static java.lang.String |
htmlEncode(java.lang.String text)
HTML Encodes a string. |
static java.lang.String |
removeHTMLTags(java.lang.String orig)
Returns a string without HTML tags in it. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlUtils()
| Method Detail |
|---|
public static java.lang.String getQuestionHTML(User user,
long surveyId,
int questionNo,
javax.servlet.http.HttpServletRequest request)
throws SurveySystemException,
SurveySecurityException
user - The user objectsurveyId - Survey idquestionNo - Question numberrequest - The request object
SurveySystemException - Description of the Exception
SurveySecurityException - Description of the Exception
public static java.lang.String getQuestionHTML(User user,
long surveyId,
int questionNo,
javax.servlet.http.HttpServletRequest request,
PipingSource pipingSource)
throws SurveySystemException,
SurveySecurityException
user - The user objectsurveyId - Survey idquestionNo - Question numberrequest - The request object
SurveySystemException - Description of the Exception
SurveySecurityException - Description of the Exception
public static java.lang.String getSingleResponse(User user,
long surveyId,
long respondentId,
java.lang.String language)
throws SurveySystemException
user - The user objectsurveyId - Survey idrespondentId - Respondent idlanguage - The selected language
SurveySystemException - Description of the Exception
public static java.util.ArrayList getResponseList(User user,
long surveyId,
long respondentId,
java.lang.String language)
throws SurveySystemException
user - The user objectsurveyId - Survey idrespondentId - Respondent idlanguage - The selected language
SurveySystemException
public static java.lang.String getEssayInputName(int qNo,
int index)
qNo - Question numberindex - The essay input field index
public static java.lang.String getIntextName(int qNo,
int index)
qNo - Question numberindex - The in-text element index in the question
public static java.lang.String getRatingInputName(int qNo)
qNo - Question number
public static java.lang.String getMultipleOneSelectionInputName(int qNo)
qNo - Question number
public static java.lang.String getMultipleInputName(int qNo,
int index)
qNo - Question numberindex - The multiple input field index
public static java.lang.String getMultipleOtherInputName(int qNo)
qNo - Question number
public static java.lang.String getNumericInputName(int qNo)
qNo - Question number
public static java.lang.String getDropdownInputName(int qNo)
qNo - Question number
public static java.lang.String getMatrixInputName(int qNo,
int col,
int row)
qNo - Question numbercol - The column numberrow - The row number
public static java.lang.String getMatrixGroupIntersectionInputName(int qNo,
int startX,
int startY)
qNo - Question numberstartX - The matrix group's startY valuestartY - The matrix group's startY value
public static java.lang.String getMatrixGroupOnePerRowInputName(int qNo,
int startX,
int startY,
int row)
qNo - Question numberstartX - The matrix group's startY valuestartY - The matrix group's startY valuerow - The row number
public static java.lang.String getFreeTextInputName(int qNo)
qNo - Question number
public static java.lang.String htmlEncode(java.lang.String text)
value - text to be encoded
public static java.lang.String removeHTMLTags(java.lang.String orig)
orig - the original string
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||