I am not qualified and trying to edit someones code. Please help putting an external href into a menu

2009-07-11 Thread Ted

Below is the code I am editing. I am trying to change the menu items
so that I can link to a outside website. For example about would link
to http://blog.google.com/about.html

public class FooterMenu extends AbstractMenu {
public FooterMenu() {

HorizontalPanel menu = new HorizontalPanel();

Hyperlink aboutItem = createLink(About, about);
Hyperlink contactItem = createLink(Contact, contact);
Hyperlink faqItem = createLink(FAQ's, faq);
Hyperlink privacyItem = createLink(Privacy Policy, privacy);
Hyperlink tosItem = createLink(Terms of Service, tos);

menu.add(aboutItem);
menu.add(sep());
menu.add(contactItem);
menu.add(sep());
menu.add(faqItem);
menu.add(sep());
menu.add(privacyItem);
menu.add(sep());
menu.add(tosItem);
initWidget(menu);
}

@Override
protected String getMenuStyleName() {
return FooterMenu;
}
}



I started here,
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/792521daa6eec1e1/5b346e9d0db31ee0?lnk=gstq=creating+an+external+links+in+menu#5b346e9d0db31ee0

But I can't figure out where to put the code new html as I get a
compile error each time.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: I am not qualified and trying to edit someones code. Please help putting an external href into a menu

2009-07-11 Thread rjcarr

I'm not sure what youre createLink() method does, but there are
several ways to accomplish what you want to do.  Here are two that I
can think of:

 1) Create an HTML object and embed an a link with where you want to
go.
 2) Create a Label (or button, or any widget really) with an onclick
that makes a call to Window.location()

Good luck!

On Jul 11, 3:39 pm, Ted ted.hack...@gmail.com wrote:
 Below is the code I am editing. I am trying to change the menu items
 so that I can link to a outside website. For example about would link
 tohttp://blog.google.com/about.html

 public class FooterMenu extends AbstractMenu {
         public FooterMenu() {

                 HorizontalPanel menu = new HorizontalPanel();

                 Hyperlink aboutItem = createLink(About, about);
                 Hyperlink contactItem = createLink(Contact, contact);
                 Hyperlink faqItem = createLink(FAQ's, faq);
                 Hyperlink privacyItem = createLink(Privacy Policy, 
 privacy);
                 Hyperlink tosItem = createLink(Terms of Service, tos);

                 menu.add(aboutItem);
                 menu.add(sep());
                 menu.add(contactItem);
                 menu.add(sep());
                 menu.add(faqItem);
                 menu.add(sep());
                 menu.add(privacyItem);
                 menu.add(sep());
                 menu.add(tosItem);
                 initWidget(menu);
         }

         @Override
         protected String getMenuStyleName() {
                 return FooterMenu;
         }

 }

 I started 
 here,http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

 But I can't figure out where to put the code new html as I get a
 compile error each time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---