Author: [email protected]
Date: Mon Mar 30 11:54:58 2009
New Revision: 5100

Added:
    wiki/IssueReportSample.wiki

Log:
Created wiki page through web user interface.

Added: wiki/IssueReportSample.wiki
==============================================================================
--- (empty file)
+++ wiki/IssueReportSample.wiki Mon Mar 30 11:54:58 2009
@@ -0,0 +1,94 @@
+#summary An example of a well reported issue on the GWT Issue Tracker.
+
+Issue Report Summary:
+CloseHandler.onClose() doesn't fire when added to PopupPanel
+
+Found in GWT Release (e.g. 1.5.3, 1.6 RC):
+GWT 1.6.2
+
+Encountered on OS / Browser (e.g. WinXP, IE6-7 | Fedora 10, FF3):
+WinXP, IE6-8, Chrome, hosted mode | MacOSX Leopard Safari 3.2.1, hosted  
mode
+This is not an issue on WinXP FF3.
+
+
+Detailed description (please be as specific as possible):
+
+If I add a CloseHandler to a PopupPanel, the onClose() method nevers seems  
to fire. I've tried adding the same CloseHandler to other widgets like a  
MenuBar and it worked fine in all browsers there.
+
+You can reproduce this issue by doing the following:
+
+1) Setup your test application with the repro code snippet below.
+
+2) Start the application in hosted mode and click to put focus on the news  
popup widget.
+
+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):
+
+Here is the PopupPanel that I'm trying to add the KeyUpHandler to:
+
+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:
+
+final NewsPopup newsPopup = new NewsPopup();
+newsPopup.addCloseHandler(new CloseHandler<PopupPanel>() {
+  @Override
+  public void onClose(CloseEvent<PopupPanel> event) {
+    newsPopup.rememberLastArticle();
+  }
+});
+
+Workaround if you have one:
+
+Maintain state everytime there is a change to the news panel, but this  
gets expensive.
+
+
+Links to relevant GWT Developer Forum posts:
+
+http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/samplelink
+
+
+= Introduction =
+
+Add your content here.
+
+
+= Details =
+
+Add your content here.  Format your content with:
+  * Text in *bold* or _italic_
+  * Headings, paragraphs, and lists
+  * Automatic links to other wiki pages
\ No newline at end of file

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to