Re: How To Simulate KeyPress
I have a question related to this. I have a KeyPressHandler in the TextBox. When the user presses "Enter", I want to simulate it as "Tab". I have added the necessary code to capture the 'Enter" event, and then I fire the new event using the DomEvent.fireNativeEvent. NativeEvent tabEvent = Document.get().createKeyPressEvent(false, false, false, false, 9, 9); DomEvent.fireNativeEvent(tabEvent, textBox); What I am hoping to see is the 'tabbing' of the current cursor to the next Focusable widget, but it doesn't seem to happen. What am I missing? It basically re-enteres the KeyPressHandler since this is the widget that is being fired. In short, I need the way to suppress the current KeyPressHandler and have the Browser level KeyPressHandler of the 'tabbing' to occur. Any help is appreciated. Regards On May 5, 11:01 am, Thomas Broyer wrote: > On May 4, 9:43 pm, Lukas Laag wrote: > > > It is possible to generate events programmatically in JavaScript. This > > page gives a good overview of the topic, includingkeyevents (look > > for 'Manually firing events'): > > >http://www.howtocreate.co.uk/tutorials/javascript/domevents. > > > I do not know if generating atabevent like this in a JSNI method > > you actually don't need JSNI: just use Document.get().createXxxEvent() > and DomEvent.fireNativeEvent(). > > > would solve your focus problem. > > I doubt it would, otherwise people would have proposed it as a > workaround:http://stackoverflow.com/questions/2398528/set-textbox-focus-in-mobil... > > (note: according to "the web", it's a bug in WebKit) > > -- > 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 > athttp://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: The new 2.1M1 release appears to have a few challenges
The new data-flow optimizer is choking on the code. Some sort of uncommon syntax in the code is breaking one of its assertions. Let me poke around a little to see what's up. Filed as Issue 4957: http://code.google.com/p/google-web-toolkit/issues/detail?id=4957 Lex -- 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 CSS style dynamically
Hello. I have some odd situation where I need to add the style attributes dynamically/programmatically depending on what the saved data is. In short, instead of defining the css style definitions in the file and reference them, I need to create those per Widget, depending on the data. I tried to use DOM.setElementProperty, but it doesn't seem to work properly. It doesn't set the background or the foreground, and the absolute positioning also gets screwed up. Can anyone share your tips/insights on how I can achieve this? private void setStyle(Element dom, ScreenElement e) { DOM.setElementProperty(dom, "position", "absolute"); DOM.setElementProperty(dom, "top", e.getYpos() + "px"); DOM.setElementProperty(dom, "left", e.getXpos() + "px"); DOM.setElementProperty(dom, "height", e.getHeight() + "px"); DOM.setElementProperty(dom, "width", e.getWidth() + "px"); DOM.setElementProperty(dom, "fontSize", e.getFontSize() + "pt"); DOM.setElementProperty(dom, "fontFamily", e.getFontFamily()); DOM.setElementProperty(dom, "backgroundColor", e.getBackColor()); DOM.setElementProperty(dom, "color", e.getForeColor()); if (e.isFontStyleUnderline()) { DOM.setElementProperty(dom, "textDecoration", "underlined"); } else { DOM.setElementProperty(dom, "textDecoration", "normal"); } if (e.isFontStyleItalic()) { DOM.setElementProperty(dom, "fontStyle", "italic"); } else { DOM.setElementProperty(dom, "fontStyle", "normal"); } if (e.isFontStyleBold()) { DOM.setElementProperty(dom, "fontWeight", "bold"); } else { DOM.setElementProperty(dom, "fontWeight", "normal"); } } -- 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.
How to add "remove" icon on TabLayoutPanel
Hello there.. First time here, so be gentle with me. :-) I've searched around, but couldn't find the answer to my question, so here it goes. I have added the Tab(s)s to the TabLayoutPanel through UiBinder and programmatically. However, I needed a way to remove this tab from the TabLayoutPanel when the user clicks on the "x" icon or similar in the Tab header. I can't seem to find the way to add this "x" icon to the header, nor a way to extend the to provide the image or a text. Can anyone help or direct me to the link where I can find more info? Cheers. -- 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.
erro while try to do "Store data in the datastore" Example
Hi, I would like some help to resolve this problem at the example of GWT using Gdatastore: http://code.google.com/webtoolkit/tutorials/1.6/appengine.html#data All application run well following the getting start tutorial, so when I try to improve using data store at this implementation an erro occurs because stockService is not declare yet. I tryed to force the declaration using "StockService stockService = GWT.create(StockService.class);" but another erro is get with the method getStocks. private void loadStocks() { stockService = GWT.create(StockService.class); stockService.getStocks(new AsyncCallback() { public void onFailure(Throwable error) { } public void onSuccess(String[] symbols) { displayStocks(symbols); } }); } private void displayStocks(String[] symbols) { for (String symbol : symbols) { displayStock(symbol); } } If there is no mistake I would like to know where I can download the caomplete example with datastore workings. Ty. --~--~-~--~~~---~--~~ 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: Slow data loading to a FlexTable
Hello all, And we are generating the Table HTML on server side, and put it as innerHTML and have performance 1000 rows - 3-4 second in IE. The biggest problem is using components which should handle events and placed in such table, but it seems JSNI is a solution in this case. In our case Links already working. So it seems this is the optimal solution if you need high performance. On Mar 4, 7:36 pm, eadams wrote: > Thanks for the suggestions. > > Changing the code to add the FlexTable to the scroll panel after > loading the data resulted in a good improvement. The 268 row parts > list will now load in IE in just over 5 seconds. I tried the setVisible > () suggestion as well, but that did not yield much change. The changes > yielded an elapsed time of 0.3 seconds in Firefox. > > On Mar 4, 11:55 am, Lothar Kimmeringer wrote: > > > > > > > eadams schrieb: > > > > The > > > timings showed the first third was in about 1.5 seconds, the next > > > third was in about 4 seconds and the last third in over 6 seconds. > > > This elapsed time is after thedatahas been received from the server > > > (which is also very fast). > > > > All of the above is on a Windows Vista client using IE 7. Testing the > > > same code on FireFox 3.0.6, the 268 rows display in under 1 second. Is > > > this a known problem with IE and are there any work arounds? > > > Unfortunately FireFox is not a solution for this issue as the > > > company's only approved browser is IE. > > > It's a rendering issue and not the only one. Try creating a > > Tree with 100.000 elements and have a look how much fun you > > have with InternetExplorer and Firefox (Safari is very fast > > here which makes me jealous). > > > One thing I haven't tried but you might try out is adding > > the flex-table to the panel after adding all rows. This > > might speed up things because InternetExplorer seems to > > redraw the whole table when adding rows (this is not GWT- > > specific, I had the same effects with other web-frameworks > > in the Good Old Days(R) as well). Or - if that has no effect - > > you might play around with setVisible. > > > Regards, Lothar --~--~-~--~~~---~--~~ 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: How to debug my entire web app in hosted mode
Hello You may find answer here: http://code.google.com/support/bin/answer.py?answer=55200 On Jan 17, 3:20 am, "chandraj...@gmail.com" wrote: > I want my entire legacy app to be run from the hosted mode so that I > can debug the front end code(java). > Currently if I deploy to tomcat and attach a Remote debugger I can't > debug the GWT code because they are now html & JS. > > I want a way to debug GWT working within the full application. How can > I please? --~--~-~--~~~---~--~~ 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: GWT applications memory management
Hello Dmitry, We are also thinking about splitting application into several. So now we will try this approach starting with creation some "proof of concept" demo application. Thanks a lot for your explanation. On Jan 16, 12:17 pm, "buz...@gmail.com" wrote: > Hello Alexey, > > Unfortunately this is a typical situation in large GWT application > which uses a lot of custom Widgets and DOM/native code. > > We have found no tooling which would efficiently show us the exact > places of memory leaks and the only approach left is to cut you > application into two halves and see how the memory behaves. > > We have succeeded in reducing the memory leak by carefully analyzing > the code and unlinking custom event listeners and object hierarchies > by overriding onUnload() methods of custom widgets. Splitting your > application into several and providing hard navigation by changing > window.url from time to time, instead of relying on GWT History > mechanism also helps. > > Memory leak situation is a lot better in Firefox and Opera, but Chrome > went further by providing separate memory space for each tab, thus it > guarantees that if you close the tab everything is "garbage > collected", because process is killed. I guess Google took the only > right way to solve the problem :) > > I hope it will help you to deal with your problems. > > Dmitry > > On Jan 14, 4:00 pm, Lex wrote: > > > > > Hello all. > > > I'd like to ask the question about the approaches normally used to > > manage memory in GWT applications. Till the moment I wrote this post, > > I read most of discussions on the group related to this topik, but > > unfortunately have no answer on my question. > > > What I'm actually looking for: is some guide or list of rules "What is > > necessary to be done in GWT code, to prevent GWT application to > > consume more and more memory". This problem occurs in Internet > > Explorer. > > > Currently we are developing rather big application using GWT. During > > developement process we had noticed that Internet Explorer consumes > > memory more and more and never release it. We had also noticed that > > after we press refresh button in IE, it finally releases most of > > consumed memory (but not all). We try to check out pages with IE leak > > detectors, sIEve, and Microsoft JS Memory Leak Detector. Those tools > > are not detect any memory leaks in our application. > > > After this we create very simple test. We create SimplePanelwidget, > > and put some FlexTable on it. After this we put in this flex table > > different widgets (Buttons, checkboxes, etc.). After we add > > SimplePanel to the rootPanel, and remove it from root panel. Do this > > several times (using timer). After each cycle (add, remove SimplePanel > > from RootPanel) some amount of memory ~200 KB is not released. > > > So my questions are following: > > - Does the situation when IE is not released all memory it consumes > > is know issue or not? > > - Does anybody know what may be done to reduce or remove at all > > memory leaking? > > - Does anybody have URL to some guides of memory management in GWT > > applications? > > > Any help will be highly appreciated- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: GWT applications memory management
Hello Bob, Thanks for answer, I'll check the article on Microsoft. Considering the natives, we have prepared test application, where we exclude all natives, DOM class method calls, and even eventListeners. Sometimes browser frees some memory, but not all (after memory release, total browser's memory allocation is greater then before allocation). So the problem seems still exists. On Jan 15, 3:04 pm, Bob Stachel wrote: > Try this article as a starting point in understanding IE memory leaks. > Internet Explorer is far worse than other browsers in memory > managment. > > http://msdn.microsoft.com/en-us/library/bb250448.aspx > > If your application uses "pure" GWT you will be somewhat protected > from leaks, but perhaps you have some native methods that employ > function closures (by far the easiest way to incur major leaks). > > On Jan 14, 9:00 am, Lex wrote: > > > Hello all. > > > I'd like to ask the question about the approaches normally used to > > manage memory in GWT applications. Till the moment I wrote this post, > > I read most of discussions on the group related to this topik, but > > unfortunately have no answer on my question. > > > What I'm actually looking for: is some guide or list of rules "What is > > necessary to be done in GWT code, to prevent GWT application to > > consume more and more memory". This problem occurs in Internet > > Explorer. > > > Currently we are developing rather big application using GWT. During > > developement process we had noticed that Internet Explorer consumes > > memory more and more and never release it. We had also noticed that > > after we press refresh button in IE, it finally releases most of > > consumed memory (but not all). We try to check out pages with IE leak > > detectors, sIEve, and Microsoft JS Memory Leak Detector. Those tools > > are not detect any memory leaks in our application. > > > After this we create very simple test. We create SimplePanelwidget, > > and put some FlexTable on it. After this we put in this flex table > > different widgets (Buttons, checkboxes, etc.). After we add > > SimplePanel to the rootPanel, and remove it from root panel. Do this > > several times (using timer). After each cycle (add, remove SimplePanel > > from RootPanel) some amount of memory ~200 KB is not released. > > > So my questions are following: > > - Does the situation when IE is not released all memory it consumes > > is know issue or not? > > - Does anybody know what may be done to reduce or remove at all > > memory leaking? > > - Does anybody have URL to some guides of memory management in GWT > > applications? > > > Any help will be highly 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-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 -~--~~~~--~~--~--~---
GWT applications memory management
Hello all. I'd like to ask the question about the approaches normally used to manage memory in GWT applications. Till the moment I wrote this post, I read most of discussions on the group related to this topik, but unfortunately have no answer on my question. What I'm actually looking for: is some guide or list of rules "What is necessary to be done in GWT code, to prevent GWT application to consume more and more memory". This problem occurs in Internet Explorer. Currently we are developing rather big application using GWT. During developement process we had noticed that Internet Explorer consumes memory more and more and never release it. We had also noticed that after we press refresh button in IE, it finally releases most of consumed memory (but not all). We try to check out pages with IE leak detectors, sIEve, and Microsoft JS Memory Leak Detector. Those tools are not detect any memory leaks in our application. After this we create very simple test. We create SimplePanelwidget, and put some FlexTable on it. After this we put in this flex table different widgets (Buttons, checkboxes, etc.). After we add SimplePanel to the rootPanel, and remove it from root panel. Do this several times (using timer). After each cycle (add, remove SimplePanel from RootPanel) some amount of memory ~200 KB is not released. So my questions are following: - Does the situation when IE is not released all memory it consumes is know issue or not? - Does anybody know what may be done to reduce or remove at all memory leaking? - Does anybody have URL to some guides of memory management in GWT applications? Any help will be highly 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-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: Unable to clone a local reference in a function being inlined
On Thu, Oct 16, 2008 at 11:10 AM, Eric Ayers <[EMAIL PROTECTED]> wrote: > I'm wondering if this is the problem: > > Internal compiler error with autoboxed fields and ++ operator > > http://code.google.com/p/google-web-toolkit/issues/detail?id=2886&q=inlined > > I see that autoincrement is used within fillTree(). > > If this is the issue, there is a patch for it and will be fixed in the > next production release of 1.5 It looks like it. That theory could be tested by changing " indexCounter++" to "indexCounter = indexCounter + 1". If that fixes it, then 1.5.3 should fix the original code. -Lex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---