• 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

Web Application, Struts (filling grid problem)

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem in filling a grid on parent JSP. My parent JSP has two radio buttons (Accept/ Reject) and three other columns in the grid. On click of any of these two radio buttons(Accept/ Reject), i am invoking a pop-up window.
The pop-up window(JSP) has two text-fields(Remarks1, Remarks2). When user enter data in both fields of pop-up window and click on save button the data of these two fields enter into corresponding fields of parent JSP.

Here I am sending some piece of code:-

Parent JSP Code

Due to some reasons i can't send the code of parent JSP.

###########################################
Pop-up JSP code:-

function fnSetValues()
{
opener.document.forms[0].strRemarks1 = document.forms[0].strRem1Popup.value; //strRem1Popup is pop-up form bean property

opener.document.forms[0].strRemarks2 = document.forms[0].strRem2Popup.value; //strRem2Popup is pop-up form bean property

}

*************************************************************************
Note: In above codes I am setting both remarks properties of pop-up to corres. properties of parent JSP. Tell me whether it is right approach or give me a way to solve this problem.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This looks like a good approach to solving the problem. I've used it many times with popup windows. Is it not working? or are you just concerned about it being "the right way to do things"? I say if it works, and doesn't obviously violate general principles of good design, then why worry about if it's "the right way to do things"?
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic