Re: Correct GWT 2.0 way to replace calls to deprecated StyleInjector.injectStylesheet and StyleInjector.setContents
try MyCssResource css = GWT.create(MyCssResource.class); css.ensureInjected(); http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/index.html?com/google/gwt/resources/client/CssResource.html On Dec 20, 8:33 pm, Dazza dazzacoll...@gmail.com wrote: I have an existing GWT project that uses StyleInjector.injectStylesheet and StyleInjector.setContents from the GWT Incubator. I have upgraded to GWT 2.0 and see that StyleInjector is now an official GWT class. Unfortunately the two methods I am using (injectStylesheet and setContents) are now deprecated and I am not sure how best to replace their usage. On initial display of the page I call StyleInjector.injectStylesheet to inject some CSS styles with values specific to the data displayed. At a later point when I refresh the data I need to change the CSS style values, so I call StyleInjector.setContents which replaces the styles I originally created. I may end up replacing the CSS styles thousands of times in the course of a user session. The none deprecated methods inject, injectAtStart and injectAtEnd do not seem to do a replace. Is that correct? What am I supposed to do? -- 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: MVP + UiBinder, thoughts?
I found MVP works great with UiBinder. MVP pattern abstracts logic from widget so that most of logic(i.e., calculation, rpc calls) can be mocked and tested in plain junit test cases separately from those have to be run in GWTTestCases. What's left in the V part are now layout code in the widget which usually are lots of messy code with panels, styling, and positioning. UiBinder cleans up the mess with html. On Dec 1, 5:54 am, Thomas Broyer t.bro...@gmail.com wrote: On Dec 1, 9:48 am, mariyan nenchev nenchev.mari...@gmail.com wrote: Yes, it has nothing to do with MVP. If your team is small and none of them are designers i don't see a reason to use uibinder. We're a small team (4 full-time devs, only 2 of them working on client code; none of us is designer) and we do use UiBinder for nearly 2 months (2.0 MS1) and find it very useful, and productivity gain! For best performances (we're targeting IE6, as it's our client's company standard, unfortunately), we started doing some screens using HTMLPanel. UiBinder binder makes the code: - easier to read (Eclipse is not good at formatting String concatenations, much better at formatting XML) - faster to write and less error-prone (now that we have auto- completion and validation for GWT widgets in the Eclipse plugin) - easier to understand, because the Java code for the view is simpler Compared to our legacy app (UiBinder is used in a new app, to work side-by-side with a year-and-half-old GWT app still using widgets the GWT-1.7-way, without MVP, DI, etc.), the code is much cleaner with UiBinder. My only fear is that we hit the 31-stylesheets limit of IE, which might come quite quickly when using CssResource (both explicitly, and automagically through UiBinder) -- 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: To find loading time.....
Try DebugPanel http://code.google.com/webtoolkit/doc/1.6/DevGuideTesting.html#DevGuideLightweightMetrics Hope it helps. On Oct 29, 7:41 am, Ramesh nitt.ram...@gmail.com wrote: Hi All, Im using Ext gwt along with hibernateIm having ten grids added to a portal...Each grid has 1000 records...Im trying to find load time but before data gets into grid the loading time gets displayed...Only design part comes first into root panel after that only data is visible...I want to find complete load time...ie., After complete loading of dataCan any one help me out...Thanks in advance --~--~-~--~~~---~--~~ 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-contrib] How is benchmark going to work with oophm in 2.0?
Hi there, I found benchmark handy to measure the capabilities of the app I was working on. I just wondered how it (or generally gwt unit test) is going to work with oophm in 2.0. Is it able to run in browsers with plug-in installed or still in the current way? Please shed some light on it. Thanks. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
Re: Help needed - Working with ClientBundle
The css resource needs to be injected manually. public class HelloWorld implements EntryPoint { /* (non-Javadoc) * @see com.google.gwt.core.client.EntryPoint#onModuleLoad() */ @Override public void onModuleLoad() { == StyleInjector.injectStylesheet(HelloWorldResources.INSTANCE.css ().getText()); HTML html = new HTML(Hello World!); html.setStyleName(HelloWorldResources.INSTANCE.css().message()); RootPanel.get().add(html); } On Jun 28, 2:03 am, uwfrog alfred.qy...@gmail.com wrote: I have been trying to get ClientBundle working over the weekend. I got the css selector obfuscation working, however, the browser somehow is not showing what is specified in the css file. Is there someone could help me out? Here is what i did. It is a minimum hello world setup with a css selector to style the hello world text to color blue. I managed to get the following in the browser. htmlhead/head div id=_firebugConsole style=display: none; FirebugVersion=1.3.3/ body iframe id=helloworld src=javascript: style=border: medium none ; position: absolute; width: 0pt; height: 0pt; tabindex=-1.../iframe div class=G1rue18xACHello World!/div /body script type=text/javascript.../script /html As you could see, the Hello World! is of a class with obfuscated name which is the same i see from the debug console. However, browser is not showing the text in blue. Am i missing anything? (I am using ClientBundle code from trunk. Please see the source code attached.) com.aqy.lab.helloworld.gwt.xml = ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 1.6.4// EN http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro- source/core/src/gwt-module.dtd module rename-to=helloworld inherits name=com.google.gwt.user.User / inherits name='com.google.gwt.user.theme.standard.Standard' / inherits name=com.google.gwt.resources.Resources / entry-point class='com.aqy.lab.client.helloworld.HelloWorld' / /module com.aqy.lab.helloworld.HelloWorld === public class HelloWorld implements EntryPoint { @Override public void onModuleLoad() { HTML html = new HTML(Hello World!); html.setStyleName(HelloWorldResources.INSTANCE.css().message()); RootPanel.get().add(html); } } com.aqy.lab.helloworld.HelloWorldCss public interface HelloWorldCss extends CssResource { String message(); } com.aqy.lab.helloworld.HelloWorldResources = public interface HelloWorldResources extends ClientBundle { static final HelloWorldResources INSTANCE = GWT.create (HelloWorldResources.class); @Source(com/aqy/lab/client/helloworld/helloworld.css) HelloWorldCss css(); } com.aqy.lab.client.helloworld/helloworld.css .message { color: blue; } helloworld.html == !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleHello World/title script type=text/javascript language=javascript src=helloworld/helloworld.nocache.js/script /head body /body /html Thanks in advance! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Help needed - Working with ClientBundle
I have been trying to get ClientBundle working over the weekend. I got the css selector obfuscation working, however, the browser somehow is not showing what is specified in the css file. Is there someone could help me out? Here is what i did. It is a minimum hello world setup with a css selector to style the hello world text to color blue. I managed to get the following in the browser. htmlhead/head div id=_firebugConsole style=display: none; FirebugVersion=1.3.3/ body iframe id=helloworld src=javascript: style=border: medium none ; position: absolute; width: 0pt; height: 0pt; tabindex=-1.../iframe div class=G1rue18xACHello World!/div /body script type=text/javascript.../script /html As you could see, the Hello World! is of a class with obfuscated name which is the same i see from the debug console. However, browser is not showing the text in blue. Am i missing anything? (I am using ClientBundle code from trunk. Please see the source code attached.) com.aqy.lab.helloworld.gwt.xml = ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 1.6.4// EN http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro- source/core/src/gwt-module.dtd module rename-to=helloworld inherits name=com.google.gwt.user.User / inherits name='com.google.gwt.user.theme.standard.Standard' / inherits name=com.google.gwt.resources.Resources / entry-point class='com.aqy.lab.client.helloworld.HelloWorld' / /module com.aqy.lab.helloworld.HelloWorld === public class HelloWorld implements EntryPoint { @Override public void onModuleLoad() { HTML html = new HTML(Hello World!); html.setStyleName(HelloWorldResources.INSTANCE.css().message()); RootPanel.get().add(html); } } com.aqy.lab.helloworld.HelloWorldCss public interface HelloWorldCss extends CssResource { String message(); } com.aqy.lab.helloworld.HelloWorldResources = public interface HelloWorldResources extends ClientBundle { static final HelloWorldResources INSTANCE = GWT.create (HelloWorldResources.class); @Source(com/aqy/lab/client/helloworld/helloworld.css) HelloWorldCss css(); } com.aqy.lab.client.helloworld/helloworld.css .message { color: blue; } helloworld.html == !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleHello World/title script type=text/javascript language=javascript src=helloworld/helloworld.nocache.js/script /head body /body /html Thanks in advance! --~--~-~--~~~---~--~~ 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-contrib] Re: Possible currupted ff plugin for OOPHM?
Forgot to include the browser info. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/ 2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729) On Jun 21, 7:37 pm, uwfrog alfred.qy...@gmail.com wrote: Maybe I was so out-of-date that I just tried out the OOPHM this weekend... I had the hosted mode launched successfully from eclipse, but I had a problem installing firefox plugin which became a show stopper. Here is what I did. 1. downloadhttp://code.google.com/p/google-web-toolkit/source/browse/branches/oo... to local disk 2. Open the file with firefox or drag it into firefox. In both cases, firefox complained that Firefox could not install the file at file:///D:/download/oophm-xpcom.xpi because: Not a valid install package -207. I also tried to unzip the .xpi file. 7zips complains Can not open file 'D:/download/oophm-xpcom.xpi' as archive. I suspect my downloaded file was corrupted. However, I downloaded the file several times, they looked all the same. Any suggestions? Thanks in advance! P.S. OOPHM is really cool, I love it! --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Possible currupted ff plugin for OOPHM?
Maybe I was so out-of-date that I just tried out the OOPHM this weekend... I had the hosted mode launched successfully from eclipse, but I had a problem installing firefox plugin which became a show stopper. Here is what I did. 1. download http://code.google.com/p/google-web-toolkit/source/browse/branches/oophm/plugins/xpcom/prebuilt/oophm-xpcom.xpi to local disk 2. Open the file with firefox or drag it into firefox. In both cases, firefox complained that Firefox could not install the file at file:///D:/download/oophm-xpcom.xpi because: Not a valid install package -207. I also tried to unzip the .xpi file. 7zips complains Can not open file 'D:/download/oophm-xpcom.xpi' as archive. I suspect my downloaded file was corrupted. However, I downloaded the file several times, they looked all the same. Any suggestions? Thanks in advance! P.S. OOPHM is really cool, I love it! --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---