Is there anything "special" you have to do to get a page to refresh itself with new data?
I am trying to build a
test site where a question will be asked on a page then submitted, then the next question will show up on that same page then submitted, until all of the questions are answered.
Since each question can have a variable number of answers, I dynamicaly build the answer list as a group of radio buttons. The first time I come to the test page, everything works just fine. The question along with the radio buttons that correspond to the possible answers show up, but when the user hits submit, instead of the next question showing up, the same one continues to display every time.
I verify that in the test page's constructor the next question is being loaded and the old components are cleared out before I rebuild them.
The entire code in the test page's constructor looks something like this:
Note that I am using
Java Studio Creator for this and have posted a similar question (
http://swforum.sun.com/jive/thread.jspa?threadID=93475)on that forum since I first thought it might be a JSC thing, but now I'm thinking more like it is some sort of
JSF rule I need to adhere to.
Note that I tried returning both null and a unbound
string (unbound meaning not in the mapping) in the submit button handler...same thing happened each time, the page submits, the consructor gets called, and the new question gets loaded along with the new components, but the old question and answers still show up.