Re: WOSubmitButton closing the browser window
Re: WOSubmitButton closing the browser window
- Subject: Re: WOSubmitButton closing the browser window
- From: Chuck Hill <email@hidden>
- Date: Thu, 5 Mar 2009 17:26:34 -0800
On Mar 5, 2009, at 1:25 PM, David Ress wrote:
List,
I know I am missing something obvious, but lack of sleep, etc... is
keeping my neurons from firing...
I have 3 WOSubmitButton inside a WOForm, ie,
<webobject name="Form1">
<webobject name="DownloadButton"></webobject>
<webobject name="CloseButton"></webobject>
<webobject name="GraphButton"></webobject>
</webobject>
where:
Form1: WOForm {
}
DownloadButton: WOSubmitButton {
action = downloadReport;
value = "Download";
}
CloseButton: WOSubmitButton {
action = savedPage;
value = "Close";
I think you want this:
onClick = "javascript:window.close(); return false;";
The "return false;" tells the button to not do what it normally does
(submit the form).
}
GraphButton: WOSubmitButton {
action = createGraphs;
value = "Graph";
}
DownloadButton and GraphButton work fine, it is the darn CloseButton
which is causing me issues.
Not sure what exactly my problem is, but if I remove the action
binding
from CloseButton's definition in the WOD then WOLips' component
editor complains. If I leave it in (savedPage returns the last page
visited),
then I receive the following error in the Eclipse console log during
runtime:
<WorkerThreadX> ... Exception while sending response:
java.net.SocketException: Broken pipe
That just means that the browser window has been closed and so the
response can't be returned. That is more of an "info" message than
an error or warning.
What I want to do is close the web page without any errors, either
in WOLips
or the console log. Any thoughts? Better ways?
That should do it. If not, use an AjaxSubmitButton.
Chuck
Oh, using Eclipse 3.3.2, WOLips 3.3.5563, Mac OS X 10.5.5, Wonder 5.4.
Thanks,
David
---
David Ress, PhD
Now with GDIT in Dayton, Ohio, but still using old email account
with ISTL.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden