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

popup - updates parent form bean arraylist

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to have a pop-up screen update the formbean on the parent page. The design of this is getting pretty nastey.

Example;
I have a page that creates a user object - user_create.jsp
I have a pop-up that alows you to enter an address - address_create.jsp

A user can have 1..N addresses. I want the user_create page to allow for the pop-up and subsequent creation of multiple addresses.

Any ideas.....
[ August 01, 2005: Message edited by: M Conlin ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's one possible way to do it:
  • Make one of the properties of your create-user form bean to be a List of Address objects
  • Make "session" the scope of the create-user form bean
  • Specify a target attribute on the <html:form> tag in the create-address jsp which refers to the main page. That way, when the action completes, the results will be displayed on the main page.
  • Have the create-address action retrieve the create-user form bean from the HttpSession object and update it with the address that was just added.
  • Have the create-address action forward to the create-user jsp.

  •  
    It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic