Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

storing arbitrary number of values to an arraylist  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone ,

I started learning JSF a month ago, and I have encountered the following issue.

Let's say I want to create a web application that consists of three pages

page 1 : the user enters a number and then submits it (one text field and a button)
page 2 : displays a number of text fields that was specified by the user (n number of text fields and a button)
page 3: displays the average of the entered numbers in the previous text fields

I managed to get the number from the user that was entered in the first page and
I stored it in a managed bean property called numValues

in the second page I get this numValues and display text fields using a loop

My question is how would I store the entered values in an arraylist

I will be grateful if someone gives me a hint
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!