• 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:

Struts parent & popup window with validator framework

 
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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


struts-config.xml


<action name="CFSRuleAddEditForm" path="/rsave" scope="request"
type="SaveAction"
input="/WEB-INF/com/gui/pages/popup/AddPopup.jsp"
validate="true">
</action>



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.

Thanks
 
Rajagopal Mani
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody suggest for this topic?
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic