Author: [email protected]
Date: Thu Jun 11 17:53:23 2009
New Revision: 5548

Modified:
     
branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java

Log:
Modified Showcase for crawlabiliy (Note: draft that goes with previous  
revision. Subject to change.)



Modified:  
branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
==============================================================================
---  
branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
   
(original)
+++  
branches/crawlability/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
   
Thu Jun 11 17:53:23 2009
@@ -74,6 +74,7 @@
  import com.google.gwt.user.client.ui.HasHorizontalAlignment;
  import com.google.gwt.user.client.ui.HasVerticalAlignment;
  import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Hyperlink;
  import com.google.gwt.user.client.ui.ListBox;
  import com.google.gwt.user.client.ui.RootPanel;
  import com.google.gwt.user.client.ui.TabBar;
@@ -229,9 +230,10 @@
      app.addSelectionHandler(new SelectionHandler<TreeItem>() {
        public void onSelection(SelectionEvent<TreeItem> event) {
          TreeItem item = event.getSelectedItem();
+        String historyToken =  
((Hyperlink)item.getWidget()).getTargetHistoryToken();
          ContentWidget content = itemWidgets.get(item);
          if (content != null && !content.equals(app.getContent())) {
-          History.newItem(getContentWidgetToken(content));
+          History.newItem(historyToken);
          }
        }
      });
@@ -409,9 +411,11 @@
     */
    private void setupMainMenuOption(TreeItem parent, ContentWidget content,
        AbstractImagePrototype image) {
+
      // Create the TreeItem
-    TreeItem option = parent.addItem(image.getHTML() + " " +  
content.getName());
-
+    Hyperlink hl = new Hyperlink(image.getHTML() + " " +  
content.getName(),true,getContentWidgetToken(content));
+    TreeItem option = parent.addItem(hl);
+
      // Map the item to its history token and content widget
      itemWidgets.put(option, content);
      itemTokens.put(getContentWidgetToken(content), option);

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

Reply via email to