• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

problem in displaying form elements based on no. of addresses

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to develop an application. In registration form, user must enter the present address and if the permanent address and present address are not same then he has to enter the permanent address also. i successfully developed the code to capture the data. And i have update profile page. where user can view the details as well as he can update the details. for that i just used normal form elements
for ex:<html:text property="name" value="${profile.name}" />.

My problem is if the user's present and permanent address are same then i have to display only present address and in Permanent address i have to display message as "Same as Present".
If they are not same i have to display both addresses. I am using Hibernate and Struts for this. where the address variable is "HashSet" type. I have developed the code but i have written redundant code. i think it is inefficient. Please solve my problem. I am posting the code to display the addresses what i wrote.



Thank You in advance.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, I see that you are using Struts tags. We have a forum devoted to Struts so I've moved this post there for you.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic