|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidaddemo.survey.SurveyBean
public class SurveyBean
class SurveyBean This is the main backing bean for the Survey Demo project. It represents a multiple-choice survey. It contains state about the list of questions to ask in the survey and the user's responses to these questions. It also has methods that help with application navigation.
| Constructor Summary | |
|---|---|
SurveyBean()
Class constructor (no arguments). |
|
SurveyBean(String bundleName)
Class constructor. |
|
| Method Summary | |
|---|---|
void |
advanceToNextQuestion()
increments question index to next question. |
String |
back()
moves the survey to the previous question. |
String |
check()
called to advance to the results page. |
String |
finish()
called when the first run through the survey is completed. |
String |
getA0()
|
String |
getA1()
|
String |
getA2()
|
String |
getA3()
|
boolean |
getA30()
|
boolean |
getA31()
|
boolean |
getA32()
|
boolean |
getA33()
|
String |
getA4()
|
String |
getCorrect()
a hack to return the String "correct" inside a binding using EL |
String |
getCurrentQuestionNumber()
determines the number of the current question in the survey. |
boolean |
getDone()
determines whether we have reached the end of the survey |
String |
getEmptyString()
a hack to return the empty String "" inside a binding using EL |
String |
getError()
a hack to return the String "error" inside a binding using EL |
String |
getIncorrect()
a hack to return the String "incorrect" inside a binding using EL |
String |
getNone()
a hack to return the String "none" inside a binding using EL |
String |
getNumQuestions()
advances the survey to the next question. |
List<SurveyPage> |
getPages()
|
MultChoiceQuestionBean |
getQ0()
IDE generated accessors |
TextQuestionBean |
getQ1()
|
MultChoiceQuestionBean |
getQ2()
|
CheckboxQuestionBean |
getQ3()
|
MultChoiceQuestionBean |
getQ4()
|
void |
goToPreviousQuestion()
decrements question index to previous question. |
void |
initSurveyState()
Initializes various survey state. |
String |
next()
advances the survey to the next question. |
void |
setA0(String a0)
|
void |
setA1(String a1)
|
void |
setA2(String a2)
|
void |
setA3(String a3)
|
void |
setA30(boolean a30)
|
void |
setA31(boolean a31)
|
void |
setA32(boolean a32)
|
void |
setA33(boolean a33)
|
void |
setA4(String a4)
|
String |
start()
called to go back to beginning of survey and clears all previous responses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SurveyBean()
public SurveyBean(String bundleName)
bundleName - the path of a bundle file| Method Detail |
|---|
public void initSurveyState()
public String next()
public String back()
public String finish()
public String check()
public String start()
public String getNumQuestions()
public boolean getDone()
public String getCurrentQuestionNumber()
public void advanceToNextQuestion()
public void goToPreviousQuestion()
public String getError()
public String getNone()
public String getEmptyString()
public String getCorrect()
public String getIncorrect()
public MultChoiceQuestionBean getQ0()
public TextQuestionBean getQ1()
public MultChoiceQuestionBean getQ2()
public CheckboxQuestionBean getQ3()
public MultChoiceQuestionBean getQ4()
public void setA0(String a0)
public String getA0()
public void setA1(String a1)
public String getA1()
public void setA2(String a2)
public String getA2()
public void setA3(String a3)
public String getA3()
public void setA4(String a4)
public String getA4()
public void setA30(boolean a30)
public boolean getA30()
public void setA31(boolean a31)
public boolean getA31()
public void setA32(boolean a32)
public boolean getA32()
public void setA33(boolean a33)
public boolean getA33()
public List<SurveyPage> getPages()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||