The moose likes Struts and the fly likes problem in displaying form elements based on no. of addresses Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "problem in displaying form elements based on no. of addresses" Watch "problem in displaying form elements based on no. of addresses" New topic
Author

problem in displaying form elements based on no. of addresses

Chaitanya Kumar Cheekate
Greenhorn

Joined: Feb 03, 2012
Posts: 1
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.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
 
subject: problem in displaying form elements based on no. of addresses
 
Threads others viewed
how to make a text box readonly
tags
Counter Increment
using Map for logic:iterate
doubt regarding <html:select>
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture