• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to send back list of values from child window to parent window?

 
Greenhorn
Posts: 11
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a requirement where I have to select values(multiple rows of values) from a child window and send them back to the parent window.

Kindly guide how can I achieve this?
 
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Same or different action? Use session ...
 
Simar Suvir
Greenhorn
Posts: 11
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is through the same action that it has to be carried out. The thing is we have a parent window where we have a field "NAME". This is a select button field upon which opens a child window where we need to select multiple rows. On the selected basis the NAME field and few other fields in the parent window shall get populated.

We could manage to get the child window open by clicking the select button next to NAME field and also could able to pull in the values from database. Now the challenge for us is to send back the selected rows of values back to the parent window fields.

Kindly guide us through.
 
Jesus Mireles
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you need to persist somewhere. So you either persist to your database or to session.. You can probably add some JavaScript that forces a window refresh so that he parent can go and re-retrieve any persisted data.

It may be better to use modals than opening a new window and then you can probably just use JavaScript.
 
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Jesus Mireles said. I would have used session to backup the user selected data but that's up to you. The usage of a new window for collecting specific user input is quite common now although I hate it for the most part from user POV.
 
Greenhorn
Posts: 22
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am also having 2 jsp's. 1 is parent & other is child. I want to pass the selected values from child to parent page.
I tried using request.getParameter,tat didn't work. Could anybody give me some suggestion to get the values passed from child to parent window?

Any suggestions would be highly appreciated. .

Is this can be achieved through using "href" in javascript.

Thanks all in advance!!
 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Durga Kannan wrote:Is this can be achieved through using "href" in javascript

No

Durga Kannan wrote:I tried using request.getParameter,tat didn't work

This approach should work, what did you do and what is the problem you are facing?

However, I prefer what Jesus Mireles have suggested. Did you try that [usig session]?

 
Durga Kannan
Greenhorn
Posts: 22
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Shankar : Thanks for your reply. I managed to get the value passed from 1 jsp to other page.
Thanks all for your suggestion.

Now i trying to read some values from property file to JSP page. Could you please suggest how to achieve this?


Thanks in advance!!!
 
Ranch Hand
Posts: 55
Mac Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can be done in various ways.
If you are using struts1 you can use

to display any message from properties file.
Also if you want to display an image

Depends on what you want to display.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic