Author: [email protected]
Date: Mon Mar 30 14:58:52 2009
New Revision: 5107
Modified:
wiki/IssueReportSample.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/IssueReportSample.wiki
==============================================================================
--- wiki/IssueReportSample.wiki (original)
+++ wiki/IssueReportSample.wiki Mon Mar 30 14:58:52 2009
@@ -25,54 +25,18 @@
3) With the news popup open, try closing the popup and expect the
onClose() method to fire. You'll notice that on the browsers listed above,
the onKeyUp method isn't being fired.
-*Repro code snippet (to help us reproduce the issue)*:
+*Shortest code snippet which demonstrates issue (please indicate where
actual result differs from expected result)*:
-Here is the !PopupPanel that I'm trying to add the !KeyUpHandler to:
+Although in my case I am using a subclass of the PopupPanel (a news panel)
to maintain information about the currently selected article, I boiled down
the issue to this simple code snippet:
-{{{
-public class NewsPopup extends PopupPanel {
- private List<Article> articles = new ArrayList<Article>(16);
- private Article lastArticle = new Article();
- private Grid articlesGrid = new Grid(4,4);
- VerticalPanel articlePanel = new VerticalPanel();
-
- public NewsPopup() {
- super();
- int i = 0, j = 0;
- for(Article article : articles) {
- if(i == 4) {
- i = 0;
- }
-
- if(j == 4) {
- j = 0;
- }
-
- articlesGrid.setWidget(i, j, article);
- i++;
- j++;
- }
- }
-
- /**
- * Retains the last article that was selected when the news popup is
closed.
- */
- public void rememberLastArticle() {
- // Set last article to the last selected article
- }
-}
-}}}
-
-The Article widget is a simple class that wraps a Label indicating the
article title.
-
-Here is the !CloseHandler I'm trying to add to the news popup in the entry
point onModuleLoad() method:
+in onModuleLoad() method:
{{{
-final NewsPopup newsPopup = new NewsPopup();
-newsPopup.addCloseHandler(new CloseHandler<PopupPanel>() {
+final PopupPanel popup = new PopupPanel();
+popup.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
- newsPopup.rememberLastArticle();
+ Window.alert("Popup closed");
}
});
}}}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---