Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set from variables to Bean?  RSS feed

 
Madhu Kaparapu
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
I have a CustomerManagement jsp page which consists customer details, primary address, billing address and credit card address these are the three sections in a CustomerManagement jsp page so i have to set these form variable to bean
i have two ways for it:-
1) write String array in bean for all address variable except customer details and assume that first field is for primary address and second field for billing address and third for credit card address

say: private String[] streetno;
private String[] streetname;
private String[] buildingtype;
private String[] zip; ....

2) writing CustomerBean for customer details and AddressBean for address section, but here how can set the form variable to AddressBeans.
we have to create three instance of AddressBeans for the corresponding address sections and set the corresponding values to the beans

i am in confusion which one is better or any other way to do it;
 
Upendra Logisa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whatever it is you should be using usebean tag only.so any of the two ways you are thinking will go for same target of simplification or complication which ever way you are thinking of. And also you be a bit clear and fluent in making the question reflecting your confusion. I am a bit confused with your question as where did u get confused actually.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mr.Upendra" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!