Win a copy of Spark in Action this week in the Open Source Projects 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Struts parent & popup window with validator framework

Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

All the below steps are working fine. But the problem is parent screen gets refreshed though the field validation fails(showing alert box).

[1] Parent window with add button
[2] Click 'Add' button
[3] Opens 'Add' Popup window with some fields and 'Save' button
[4] User enter values and click 'Save' button
[5] Validate the fields using struts validator framework(client side validation)
[6] Once validation success corresponding action needs to be executed & update the data in database
[7] Parent screen needs to be refreshed without closing the popup screen

Please refer the related code snaps below,

'Save' button JSP syntax

Javascript function for 'Save' button


<action name="CFSRuleAddEditForm" path="/rsave" scope="request"

The parent screen getting refreshed always irrespective of the validation result. The parent screen should be refreshed only the validation success. I understood since the parent screen form is submitted in javascript function, the parent screen is reloaded if validation fails also. Please share your suggestions to resolve this issue.

If more clarifications are required, please revert back.

Rajagopal Mani
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody suggest for this topic?
this is supposed to be a surprise, but it smells like a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic