struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sudheshna aaa" <sudhes...@hotmail.com>
Subject RE: close the window if no errors
Date Thu, 22 Apr 2004 17:31:19 GMT
Thank you. I got it. I need to introduce a new attribute "done" in the 
request scope and check for this existance on the window open.

Thank you Geeta and Nathan!


>From: "Geeta Ramani" <gramani@terralink.com>
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: "Struts Users Mailing List" <user@struts.apache.org>
>Subject: RE: close the window if no errors
>Date: Thu, 22 Apr 2004 12:56:48 -0400
>
>Sudheshna:
>
>I think you may be misstating the problem whne you say "exzamine the errors 
>object in the child window" and thereby tying yourself in knots. :) Because 
>really the "examination" is happening in the action. This may be why you 
>have not seen what Nathan has been trying to suggest. Anyway, here's what 
>you can do (and pretty much Nathan's solution too):
>
>Submit in child window -> go to action -> process.
>If errors dont exist, then forward to "child" window using a forward called 
>"done" in your struts-config.xml mapping: "done" will map to 
>"child.jsp?done=true". (Note that you already have coded child.jsp, so you 
>dont need another jsp at all!) So anyway, when this case happens, the user 
>will be directed to child.jsp with the additional request param "done". In 
>your child.jsp add this kind of code:
>
><%if(request.parameter("done"!= null)) { %>
>	<body onLoad="self.close()">
><%} else {%>
>	<body>
><%}%>
>
>So when child.jsp?done=true is done rendering on the screen, it will 
>immedaitely close, so the user will be left loking at the parent window.
>
>Hth,
>Geeta
>
> > -----Original Message-----
> > From: sudheshna aaa [mailto:sudheshna@hotmail.com]
> > Sent: Thursday, April 22, 2004 12:33 PM
> > To: user@struts.apache.org
> > Subject: RE: close the window if no errors
> >
> >
> > Geeta,
> >
> > Exactly this is what i am looking for. I need to examine the
> > errors object
> > on the child window  and if it is empty, I need to close this
> > child window.
> >
> > Thank you.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Get rid of annoying pop-up ads with the new MSN Toolbar  FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message