• Post Reply Bookmark Topic Watch Topic
  • New Topic

new added element to list will update all current elements of the list while using session bean  RSS feed

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am creating a small form in which the user is allowed to enter his multiple phone nos which will be stored in a list , unfortunately whenever i tried to add more then one phone to the list , it will take both the item as the last entered number

example

addPhoneNo Form
User Phone : 1234


again open and add another phone number
User Phone : 4321


now the contents of userPhoneNosList is
phone : 4321
phone : 4321




part of addPhoneNo.xhmtl



part of faces-config.xml





UserDetailsBean.java

 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure.. but can you remove this configuration..



You're saving something in the session that is a string.. although I am not sure enough regarding your business case..
 
Kumaravadivel Subramani
Ranch Hand
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried of debugging the method which uses to add phone numbers in the List? Suspect on setNewUserPhoneno too.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!