Re: How do disable and/or hide a MenuItem ????
Ok. I had the menu itself being a singleton class and I do not know why but changing it to an instance changed everything so now the methods work. On Friday, February 28, 2014 12:34:13 PM UTC, Jens wrote: > > menuItem.setEnabled() should work. It sets an internal boolean flag and > updates the style of MenuItem. MenuBar does always check if a MenuItem is > enabled before executing the command. > > Maybe you accidentally enable the MenuItem again in your code? > > -- J. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How do disable and/or hide a MenuItem ????
menuItem.setEnabled() should work. It sets an internal boolean flag and updates the style of MenuItem. MenuBar does always check if a MenuItem is enabled before executing the command. Maybe you accidentally enable the MenuItem again in your code? -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How do disable and/or hide a MenuItem ????
MenuItem is a pretty standard Widget in GWT. I have a UiBinder as follows: Home Edit and in code I want to be able to to disable or hide the menuItem based on some rules. e.g. menuItem.setEnabled(false); menuItem.setVisible(false); On Friday, February 28, 2014 11:53:30 AM UTC, Ed wrote: > > Please give more details so people can help you... > No idea what menu item is or what you are trying to do. > Tip: use your debugger to see what is actually happening... > You probably aren't defining any styles that are set by your enable action. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How do disable and/or hide a MenuItem ????
Please give more details so people can help you... No idea what menu item is or what you are trying to do. Tip: use your debugger to see what is actually happening... You probably aren't defining any styles that are set by your enable action. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How do disable and/or hide a MenuItem ????
I am using GWT 2.5.1 I have been struggling with this for hours now. How do you disable and/or hide a MenuItem in GWT. menuItem.setEnabled(false); // DOES NOT WORK !!! menuItem.setVisible(false); // DOES NOT WORK !!! UIObject.setVisible(menuItem.getElement(), false); // DOES NOT WORK !!! Why ? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: MenuBar: How to open MenuItem in new tab/window?
Just create a MenuItem with new MenuItem("< a href="someURL">The Text, true, (ScheduledCommand)null) Et voilà you're done. Am Donnerstag, 30. Januar 2014 16:32:28 UTC+1 schrieb kibu Kuhn: > > hi, > > as MenuItem does not render a html link but just peforms a function call > when you click onto an item, you can't open the new page in a new tab or > window (A menu item here does not perform a place change but just opens a > new page from the server). How can I achieve this? > > TIA > kibu > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: MenuBar: How to open MenuItem in new tab/window?
defined the function to call Window.open( ... ) http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/Window.html#open(java.lang.String, java.lang.String, java.lang.String) On Thu, Jan 30, 2014 at 7:32 AM, kibu Kuhn wrote: > hi, > > as MenuItem does not render a html link but just peforms a function call > when you click onto an item, you can't open the new page in a new tab or > window (A menu item here does not perform a place change but just opens a > new page from the server). How can I achieve this? > > TIA > kibu > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-web-toolkit+unsubscr...@googlegroups.com. > To post to this group, send email to google-web-toolkit@googlegroups.com. > Visit this group at http://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- A. Stevko === "If everything seems under control, you're just not going fast enough." M. Andretti -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
MenuBar: How to open MenuItem in new tab/window?
hi, as MenuItem does not render a html link but just peforms a function call when you click onto an item, you can't open the new page in a new tab or window (A menu item here does not perform a place change but just opens a new page from the server). How can I achieve this? TIA kibu -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to add an icon to MenuItem?
Yep, this is a nice way to do this as well but if you want to use UiBinder with having the MenuItem subclassed is much more convenient because then I can set ImageResource directly from the ClientBundle. On Monday, May 13, 2013 1:15:28 PM UTC+2, Andrea Boscolo wrote: > > You don't need to extend MenuItem. See > http://stackoverflow.com/questions/16399241/how-to-add-an-icon-to-a-menuitem-in-gwt > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to add an icon to MenuItem?
You don't need to extend MenuItem. See http://stackoverflow.com/questions/16399241/how-to-add-an-icon-to-a-menuitem-in-gwt -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to add an icon to MenuItem?
Hi, I came across the same problem, I had to create a subclass of MenuItem which sets MenuItem's setHTML and gives it a built up image + text HTML string. I used ClippedImageImpl to create the image HTML. On Monday, May 6, 2013 3:38:38 PM UTC+2, membersound wrote: > > Hi, > > how can I get add an icon with text to a menu item in GWT? The following > does not work: > > > > > > > Resulting error: > Not allowed in an HTML context: > > So how can I have an icon in menuitem? > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
How to add an icon to MenuItem?
Hi, how can I get add an icon with text to a menu item in GWT? The following does not work: Resulting error: Not allowed in an HTML context: So how can I have an icon in menuitem? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
Hi Vivek , but i want to add a parameter in my function execute it is possible ? 2012/7/5 Vivek Ghavle > Hi Assiya, > no need to use handlers there > you can use the below code > > > MenuItem mntmNewItem = new MenuItem("Vivek", false, new Command() { > public void execute() { > > Window.alert("Hi Vivek"); > > } > }); > menuBar.addItem(mntmNewItem); > > > > Hope this code will satisfy your need > > On Thu, Jul 5, 2012 at 6:41 PM, Assiya EL wrote: > >> >> hi all, >> >> i have a problem with MenuBar or MenuItem , addClickHandler(new >> ClickHandler() >> >> i can't add a event in my MenuItem or MenuBar ??? >> >> any idea PLZ >> >> >> -- >> >> Assiya EL >> Master Qualité du Logiciel >> >> >> >> Plz consider environment - Only print this if necessary >> >> >> -- >> 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. >> > > > > -- > Regards > Vivek Ghavle > 8885630971 > > -- > 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. > -- Assiya EL Master Qualité du Logiciel Plz consider environment - Only print this if necessary -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
Hi Assiya, no need to use handlers there you can use the below code MenuItem mntmNewItem = new MenuItem("Vivek", false, new Command() { public void execute() { Window.alert("Hi Vivek"); } }); menuBar.addItem(mntmNewItem); Hope this code will satisfy your need On Thu, Jul 5, 2012 at 6:41 PM, Assiya EL wrote: > > hi all, > > i have a problem with MenuBar or MenuItem , addClickHandler(new > ClickHandler() > > i can't add a event in my MenuItem or MenuBar ??? > > any idea PLZ > > > -- > > Assiya EL > Master Qualité du Logiciel > > > > Plz consider environment - Only print this if necessary > > > -- > 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. > -- Regards Vivek Ghavle 8885630971 -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
hello, _id in the constructor is compile but returns null after the click on the menu, I think we should pass it to paramettrs function which is calling server in this case it is *execute* , it is possible to add a event to menu with other solution ? thank you 2012/7/5 Ali Thabet > class MyCommand implements Command >{ > private String _id; > > public MyCommand(String id) > { > _id = id; > } > > @Override > public void execute() > { > GreetingServiceAsync greetingService = > GWT.create(GreetingService.class); > > greetingService.loadCategoryPage(_id,new > AsyncCallback() { > > @Override > public void onFailure(Throwable caught) { > } > > @Override > public void onSuccess(GridPageModel grid) { > > GridPageBuilder.build(grid); > > } > }); > > } >} > >public void addItemToMenuBar(MenuBar menuBar) >{ > menuBar.addItem("firstItem", new MyCommand("firstId")); > menuBar.addItem("secondItem", new MyCommand("secondId")); >} > > -- > 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. > -- Assiya EL Master Qualité du Logiciel Plz consider environment - Only print this if necessary -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
Okey thank you so much 2012/7/5 Ali Thabet > class MyCommand implements Command >{ > private String _id; > > public MyCommand(String id) > { > _id = id; > } > > @Override > public void execute() > { > GreetingServiceAsync greetingService = > GWT.create(GreetingService.class); > > greetingService.loadCategoryPage(_id,new > AsyncCallback() { > > @Override > public void onFailure(Throwable caught) { > } > > @Override > public void onSuccess(GridPageModel grid) { > > GridPageBuilder.build(grid); > > } > }); > > } >} > >public void addItemToMenuBar(MenuBar menuBar) >{ > menuBar.addItem("firstItem", new MyCommand("firstId")); > menuBar.addItem("secondItem", new MyCommand("secondId")); >} > > -- > 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. > -- Assiya EL Master Qualité du Logiciel Plz consider environment - Only print this if necessary -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
class MyCommand implements Command { private String _id; public MyCommand(String id) { _id = id; } @Override public void execute() { GreetingServiceAsync greetingService = GWT.create(GreetingService.class); greetingService.loadCategoryPage(_id,new AsyncCallback() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(GridPageModel grid) { GridPageBuilder.build(grid); } }); } } public void addItemToMenuBar(MenuBar menuBar) { menuBar.addItem("firstItem", new MyCommand("firstId")); menuBar.addItem("secondItem", new MyCommand("secondId")); } -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
thank you , you have an example of class Command PLZ ? 2012/7/5 Ali Thabet > But the command can have fields so you must create your command class > witch implements the Command interface and put your parameters in the > constructor to set fields > > -- > 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. > -- Assiya EL Master Qualité du Logiciel Plz consider environment - Only print this if necessary -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
But the command can have fields so you must create your command class witch implements the Command interface and put your parameters in the constructor to set fields -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
Form MenuItem i set the command witch execute the same code of the ClickHandler. why you want tu add a ClickHandler to the MenuBar? 2012/7/5 Jens > You have to use the Command interface. A Command will be executed then a > MenuItem is activated. See JavaDoc for MenuBar/MenuItem. > > -- J. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/1o_U4YFxWbEJ. > > 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. > -- 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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()
You have to use the Command interface. A Command will be executed then a MenuItem is activated. See JavaDoc for MenuBar/MenuItem. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/1o_U4YFxWbEJ. 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.
type MenuBar or MenuItem with addClickHandler(new ClickHandler()
hi all, i have a problem with MenuBar or MenuItem , addClickHandler(new ClickHandler() i can't add a event in my MenuItem or MenuBar ??? any idea PLZ -- Assiya EL Master Qualité du Logiciel Plz consider environment - Only print this if necessary -- 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.
Converting GWT menuitem into hyperlink
How do we convert GWT menuitem into hyperlink. As menuitem sends the data in terms of text,the rightclick context menu options doesn't appear in IE. We want rightclick context menu options like "Open In New Tab" to appear for menu items in GWT pages.Please let me know how do we convert following code ,such that menuitems behave like hyperlink: *private* MenuItem getInventoryTargetAdminMenuItem() {**** MenuItem menuItem = *new* MenuItem( *MESSAGES* .siteNavigatorInventoryTargetAdmin(), *new* Command() { *public* *void* *execute()* { *navigateInventoryTargetAdmin**()*; } } ); menuItem.getElement().setId( Constants.*MNU_INVENTORY_TARGET_ADMIN* );** ** *return* menuItem; } -- 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.
Is it possible to select menuItem onMouseOver?
Hello, I realize a web application that run commands displayed in menuItem. These commands may depend on each other, for example if a command C depends on B, B depends on A to execute C we must execute in order A- > B-> C. In short, I would like to improve the feedback on my application and select menuItems automatically when the mouse is over a command that depends on them. Thanks in advance for your helps. NB: I use GWT 2.3 -- 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.
Problems with keyboard events+MenuItem+gwt-print-it
Good morning everyone! I'm having problems with updating the look of MenuItem smartgwt. I'm leaving the subitems disabled and enabled dynamically, but the look is not, has problems, only updates the look when the cursor is over the icon, but needs to be updated to access the menu, follow what I'm trying to do: 2 subitems begin disabled and are only able to access another sub-item, but in doing so enabled this subsection which sets should be disabled. They are disabled but the bigger problem is the question that is not dynamic visual ... How do I pose to fix it? The other problem is concerned a repetition of events from the keyboard, how can I do to run a command only while precione is the shortcut key that I generated? HandlerRegistration logHandler = Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { NativeEvent ne = event.getNativeEvent(); if (ne.getCtrlKey() && (ne.getKeyCode()=='l' || ne.getKeyCode()=='L')) { ne.preventDefault(); DeferredCommand.addCommand(new Command() { @Override public void execute() { loggerWindow.show(); } }); } } }); And the last problem is with the gwt-print: cmo do I print full pages in firefox? They are coming out blank! package br.com.freller.tool.client; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.DeferredCommand; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.Timer; public class Print { /** * If true, use a Timer instead of DeferredCommand to print the internal fram */ public static boolean USE_TIMER = false; /** * Time in seconds to wait before printing the internal frame when using Timer */ public static int TIMER_DELAY = 2; public static native void it() /*-{ $wnd.print(); }-*/; public static void it(UIObject obj) { it("", obj); } public static void it(Element element) { it("", element); } public static void it(String style, UIObject obj) { it(style, obj.getElement()); } public static void it(String style, Element element) { it("", style, element); } public static void it(String docType, String style, Element element) { it(docType, style, DOM.toString(element)); } public static void it(String docType, String style, String it) { it(docType +"" +"" +"" +"" +style +""+"" +it +""+ ""); } public static void it(String html) { try { buildFrame(html); if (USE_TIMER) { Timer timer = new Timer() { public void run() { printFrame(); } }; timer.schedule(TIMER_DELAY * 1000); } else { DeferredCommand.addCommand(new Command() { public void execute() { printFrame(); } }); } } catch (Throwable exc) { Window.alert(exc.getMessage()); } } public static native void buildFrame(String html) /*-{ var frame = $doc.getElementById('__printingFrame'); if (!frame) { $wnd.alert("Error: Can't find printing frame."); return; } var doc = frame.contentWindow.document; doc.open(); doc.write(html); doc.close(); }-*/; public static native void printFrame() /*-{ var frame = $doc.getElementById('__printingFrame'); frame = frame.contentWindow; frame.focus(); frame.print(); }-*/; } Thanks! -- 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-tool...@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.
menuItem command create tab in tabPanel
hi In my application I have created a widget that contain a menubar and menuItem. I have also create another widget that contain a tabPanel. each off this object are instantiate separately. I don't know howto : When user click on menuItem i want to create a new tab I don't understand howto retrieve my tabPanel object for use : myTabPanel.add(widget) in menuBar widget class. thanks -- 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-tool...@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.
MenuItem
hi, I am integrating gwt with jsp. fatched the gwt menu component on jsp but how to sent perticuler jsp page as link on it. Thanks in Advance Siraj -- 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-tool...@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.
GWT MenuItem with FileBrowse
Hi , I am trying to use MenuItem called "Open" to open up a FileBrowser and then be able to select a file. The problem i am seeing is MenuItem can fire a command , and if i try to use the FileUpload widget in the command code , it requires a form panel and submit button to be able to use that request. Is there a way to do this without having to use the form , or any workaorund that could be used. Any code snippet is greatly appreciated. -- 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-tool...@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: Adding an Image/HTML to the MenuItem of a MenuBar
Thanks Alan, Please send me the zip ASAP. That will be a great help. Thanks again, -Tapas On Mon, Feb 22, 2010 at 9:53 PM, Alan Hadsell wrote: > > > On Feb 22, 9:13 am, Tapas Adhikary wrote: > > Hi All, > > How to add an image or a html to the menu item of a menu bar ? I have a > > menu bar (vertical) of 6 menu items. I would like to add a tick(ok/right) > > image in-front of the menu item on selection. With that , I want to hide > the > > tick image on select of other menu item in the menu or clicking on the > > already selected menu item again. > > I'm using a local version of the MenuBar and MenuItem from GWTLib > (http://code.google.com/p/gwtlib/). It currently does check marks, > but not the > radio button effect that you're looking for. It also supports enabling > and > disabling menu items, which is the main reason I'm using it. > > I've updated it to work with GWT 2.0.2, and replace the deprecated > Listeners with > Handlers. I have not committed it back to the project yet, as it's > still in > development (read: not completely tested), and I'm not a committer on > the project. > > I'm planning to add an Action-like object to it before I'm done, > (http://java.sun.com/javase/6/docs/api/javax/swing/Action.html). This > centralizes > the information about a particular UI-initiated action, so that > disabling the > action automatically disables all the associated UI controls (buttons, > menu items, > etc.) and the tooltips and help text are kept together. > > I can send you a zip file in its current state, if you like, but with > no promises > of support or further updates, as my time available for this project > is limited. > > -- > 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-tool...@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. > > -- 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-tool...@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: Adding an Image/HTML to the MenuItem of a MenuBar
On Feb 22, 9:13 am, Tapas Adhikary wrote: > Hi All, > How to add an image or a html to the menu item of a menu bar ? I have a > menu bar (vertical) of 6 menu items. I would like to add a tick(ok/right) > image in-front of the menu item on selection. With that , I want to hide the > tick image on select of other menu item in the menu or clicking on the > already selected menu item again. I'm using a local version of the MenuBar and MenuItem from GWTLib (http://code.google.com/p/gwtlib/). It currently does check marks, but not the radio button effect that you're looking for. It also supports enabling and disabling menu items, which is the main reason I'm using it. I've updated it to work with GWT 2.0.2, and replace the deprecated Listeners with Handlers. I have not committed it back to the project yet, as it's still in development (read: not completely tested), and I'm not a committer on the project. I'm planning to add an Action-like object to it before I'm done, (http://java.sun.com/javase/6/docs/api/javax/swing/Action.html). This centralizes the information about a particular UI-initiated action, so that disabling the action automatically disables all the associated UI controls (buttons, menu items, etc.) and the tooltips and help text are kept together. I can send you a zip file in its current state, if you like, but with no promises of support or further updates, as my time available for this project is limited. -- 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-tool...@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.
Adding an Image/HTML to the MenuItem of a MenuBar
Hi All, How to add an image or a html to the menu item of a menu bar ? I have a menu bar (vertical) of 6 menu items. I would like to add a tick(ok/right) image in-front of the menu item on selection. With that , I want to hide the tick image on select of other menu item in the menu or clicking on the already selected menu item again. How to achieve this scenario ? I thought of adding radio buttons as a menu items as radio button selection is mutually exclusive but I couldn't add as API doesn't support it. Please help. Thanks, -Tapas -- 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-tool...@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.
Menubar, menuitem show on the left
Hello, we're using menubar and menuitem for ou application's menu. The menu takes the entire screen width, so when when we have submenus on the right side of the menu they open on the right, but the user doesn't see them. Is it possible to open them on the left ? Thank's, -- 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-tool...@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.
Programmatic MenuItem Selection
Hi, How can I programmatically select a MenuItem of a MenuBar (or simulate click)? Thanks, Sandy --~--~-~--~~~---~--~~ 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: Change individual menuitem css
I found a solution and wanted to share it in case anyone else needs it. I needed to change: .georgeMenuItem .gwt-MenuItem-selected { background: #c1272d; color: #FFF200; } to .georgeMenuItem-selected { background: #c1272d; color: #FFF200; } On May 22, 8:21 am, Tracy wrote: > Hi, > > I'm new to GWT and have been scouring the discussion groups and > internet for an answer to my question but I have had no luck. > > Here is my question: > > I need to change the style on an individual menuitem on my menubar. > > I tried to remove the style for the menuitem and then add my new style > it but only changed the the "georgeMenuItem" part of my css. > > Here is a snippet of my code > > MenuItem georgetownMenuItem = new MenuItem("Georgetown - Union > Station", new Command() { > public void execute() { > RootPanel.get().remove(0); > RootPanel.get().add(createPage(createGoButtonPanel > (),assembleContent(createGeorgetownContent(), GEORGETOWN_TOP_IMG, > "georgetownMainPanel"))); > // sideBar.setStyleName("adRatesSidePanel"); > //rightPanel.setStyleName("adRatesRightPanel"); > } > }); > > georgetownMenuItem.removeStyleName("gwt-MenuItem"); > > georgetownMenuItem.setStyleName("georgeMenuItem"); > > toGo.addItem(georgetownMenuItem); > > ****** > > CSS > .georgeMenuItem { > cursor: default; > border: 1px solid #FFF200; > background-color: #FF; > color: #FFF200; > > } > > .georgeMenuItem .gwt-MenuItem { > cursor: default; > height: 33px; > width: 95px; > font-size: 12px; > background-color: #FF; > color: #FFF200; > font-family: helvetica, impact, sans-serif; > text-align: left; > vertical-align: center; > padding-left: 10px;} > > .georgeMenuItem table { > margin: 0px; > border-collapse: collapse; > border-spacing: 0px; > > } > > .georgeMenuItem .gwt-MenuItem-selected { > background: #c1272d; > color: #FFF200; > > } > > Any help would be appreciated. > > Thank you, > > Tracy --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Change individual menuitem css
Hi, I'm new to GWT and have been scouring the discussion groups and internet for an answer to my question but I have had no luck. Here is my question: I need to change the style on an individual menuitem on my menubar. I tried to remove the style for the menuitem and then add my new style it but only changed the the "georgeMenuItem" part of my css. Here is a snippet of my code MenuItem georgetownMenuItem = new MenuItem("Georgetown - Union Station", new Command() { public void execute() { RootPanel.get().remove(0); RootPanel.get().add(createPage(createGoButtonPanel (),assembleContent(createGeorgetownContent(), GEORGETOWN_TOP_IMG, "georgetownMainPanel"))); // sideBar.setStyleName("adRatesSidePanel"); //rightPanel.setStyleName("adRatesRightPanel"); } }); georgetownMenuItem.removeStyleName("gwt-MenuItem"); georgetownMenuItem.setStyleName("georgeMenuItem"); toGo.addItem(georgetownMenuItem); ** CSS .georgeMenuItem { cursor: default; border: 1px solid #FFF200; background-color: #FF; color: #FFF200; } .georgeMenuItem .gwt-MenuItem { cursor: default; height: 33px; width: 95px; font-size: 12px; background-color: #FF; color: #FFF200; font-family: helvetica, impact, sans-serif; text-align: left; vertical-align: center; padding-left: 10px; } .georgeMenuItem table { margin: 0px; border-collapse: collapse; border-spacing: 0px; } .georgeMenuItem .gwt-MenuItem-selected { background: #c1272d; color: #FFF200; } Any help would be appreciated. Thank you, Tracy --~--~-~--~~~---~--~~ 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: MenuItem icons
This works fine, thank you. On Apr 27, 3:58 am, Vitali Lovich wrote: > yes. you probably want to know how, don't you :). new > MenuItem(bundle.image().getHTML(), true, /* whatever 3rd parameter goes here > */); > > bundle is your ImageBundle, image is the method that returns an > AbstractImagePrototype. > > On Sun, Apr 26, 2009 at 11:32 PM, Hannson wrote: > > > Hi all, > > > Is there some standard way to add an icon to a MenuItem using an > > ImageBundle? --~--~-~--~~~---~--~~ 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: MenuItem icons
yes. you probably want to know how, don't you :). new MenuItem(bundle.image().getHTML(), true, /* whatever 3rd parameter goes here */); bundle is your ImageBundle, image is the method that returns an AbstractImagePrototype. On Sun, Apr 26, 2009 at 11:32 PM, Hannson wrote: > > Hi all, > > Is there some standard way to add an icon to a MenuItem using an > ImageBundle? > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MenuItem icons
Hi all, Is there some standard way to add an icon to a MenuItem using an ImageBundle? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Please help with gwt MenuItem CSS define
I need to change the menu item into different colors (both front & background) when mouse over and the item is selected. So I defined the following in my css: .gwt-MenuBar-vertical .gwt-MenuItem { color: yellow; background: blue; } .gwt-MenuBar-vertical .gwt-MenuItem-selected { color: black; background: red; } .gwt-MenuBar-vertical .gwt-MenuItem-hover { color: white; background: green; } But the actual result is not right. When mouse is over, the display is using '.gwt-MenuItem-selected'. If I selected a item, then move the mouse to other item, the selected item back to default color. What's wrong with my css? Please help. Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to set image/icon for MenuItem?
GWT newbie question: I need to create a menu bar with menu items where some items have dynamic icons; that is some of the icons change depending on program state. I don't see any methods in GWT to set the icon for a menu item. Rather it seems it uses a static set of images via the MenuBar.MenuBarImages param. Can someone show how I can set dynamic images? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
creating a custom MenuItem - ?
I'm thinking of putting a Button and a TextBox to MenuBar. Is there an easy/described way of extending MenuItem in order to achieve that? Any hints? TIA. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: creating a custom MenuItem - ?
You could try creating a custom class that extends Composite :) This was our solution for creating a left sided tab panel (like the regular one you can find in GWT, but tabs are not up, but on left). On Oct 3, 10:08 am, gsmd <[EMAIL PROTECTED]> wrote: > I'm thinking of putting a Button and a TextBox to MenuBar. > Is there an easy/described way of extending MenuItem in order to > achieve that? Any hints? > > TIA. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---