This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Update Value from a child window

 
pioneer
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I have a peculiar issue with Parent & Child window in struts & tiles.

I have a parent window - that has a dropdown values & a submit button. On click of the button, it must open a popup window which is mostly static (but for a couple of session values) with 2 buttons - 'Continue' and 'Cancel'.

When user clicks on
a. 'Cancel' button, I need to close the popup window w/o doing anything to the parent window.
b. 'Continue' button, I need to close the popup window with the parent window refreshing and deleting the value that was selected in the dropdown before the popup window was shown.
NOTE: The parent window is implemented in struts/tiles whereas the popup is just a jsp page, since the popup is almost static and doesnt have a header/footer like the parent window.

Does any one has any idea on how to go about doing this?
I tried the following ways but without any luck -
1. create a form with a hidden field in the parent and try and set the value from the child javascript function that is called when 'Continue' button is clicked... - This doesnt work since it looses the request value as soon as the child window is closed.
2. Tried with the above in combination with [html:link ../] surronding the [html:img ../] tag - this somewhat works as it opens up a new window from the child window and hence retains the request value...
3. Tried using 2 different actions for 'Continue' and for 'Cancel' button - but this didnt work either... not sure of the exact reason...
 
Bhaskar Reddy
pioneer
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code for the above issue -

[CODE]
{struts-config.x ml}
<action path="/account/deleteChoice" type="com.epson.edm.struts.actions.account.DeleteChoiceAction">
<forward name="success" path="deleteSelected"/>
</action>
[/action]

{tiles-defs.xm l }
<definition name="deleteSelected" extends="account.myDef">
<put name="title" value="Account Settings - Delete Selected"/>
<put name="content" value="/WEB-INF/jsp/tiles/account/parent.jsp"/>
</definition>

NOTE: I am not able to add the html/jsp into the forum... in case you wanted the html/jsp code to understand my code issue...
[ August 03, 2007: Message edited by: Bhaskar Reddy ]
 
Bhaskar Reddy
pioneer
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this resolved after I created a hidden variable in the parent form which was set using Javascript function calls from both the parent & the popup window button click.
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!