You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steve <sm...@neca.com> on 2003/04/09 23:01:18 UTC
Validating, close child window - Best Practice?
I have gone through the previous posts on this topic and would like to
see what if any are the current best practices being used.
I have window A that lists patients. Clicking a patient will pop-up the
patient specifc info in window B. The user can then edit\update the
patient info and submit to the corresponding action for updating this
info.
Case 1:
- Edited patient info passes server-side business rule validation
- info is updated; window B needs to close and window A should refresh
the patient list
Case 2:
- Edited patient info 'fails' validation and the page is re-displayed
with the appropriate msgs to user to fix accordingly
- user fixes
- proceeds as in case 1
I was thinking something along these lines:
window B contains <logic:present name="foo"/>. The success mapping for
the /updateYourPatientInfo.do (window B) would be windowB.jsp. The
updateYourPatientInfo action upon succesfully processing would set:
request.setAttribute("foo", Boolean.valueOf(true));
Your <logic:present/> tag would have some javascript that sets an onLoad
call to your page to submit to your action that loads your patient list
in window A and close itself. Hope that makes some sort of sense. Any
thoughts on how/why this is a bad approach? Just want to get some
feedback before going down that road. Thanks. Sorry for the long post.
Steve S.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org