• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Checked SelectManyCheckbox Values are not written to Backingbean Property

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i started with Java and JSF two weeks ago and made quite some progress (at least i think so ) thanks alot to many posters here!

I 'm writing an OnlineQuiz where Questions, Answers and Results are read from a DB and displayed, but now i got a problem
which i can't solve because any example given is just like the way i've written it.

The possible answers are displayed but no matter if the boxes are checked or not the set property is never called only the get

JSF part:


bean part

NewQuiz is an Object of Quiz which has an ArrayList Property with all answers per question as Strings.
When the button is clicked the index of the questions ArrayList is increased and the next question and the answers are written into the properties
and loaded into the form.

Please can anybody help me? I'm stuck here now for for two days trying many possible ways to achieve what i need and i have no ideas left.
I even have written a method to analyze the results already which i never get...

P.S. "Frage" = Question, "Antwort" = Answer and "Ergebnis" = Result
 
Dominik Scholz
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Done a workaround with a ValueChangeListener but the problem still persists



Log:
12:52:35,461 DEBUG [quiz.quiz.WissensQuizHandler] Mit welchen Fragen kann ich das Gespräch am besten steuern?
12:52:35,461 DEBUG [quiz.quiz.WissensQuizHandler] []OLD
12:52:35,461 DEBUG [quiz.quiz.WissensQuizHandler] [geschlossene Fragen]NEW // the answer i selected
12:52:35,461 DEBUG [quiz.quiz.WissensQuizHandler] j_id_jsp_999753246_15ID

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove the immediate attribute from the commandbutton. It makes no sense here. This cause all input values which doesn't have immediate attribute set being skipped during update model values phase.
 
Dominik Scholz
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
17:12:43,915 DEBUG [quiz.quiz.WissensQuizHandler] WissensQuizHandler.setErgebnisse (Ergebnisse schreiben)

You're the best! Thanks a lot!

I knew it would be something stupid...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic