Re: How to scroll page to element
The next problem: I have finished big gwt-application and I cant add a ScrollPanel in it. But i know position of browser scrollbar, where I want to jump (scroll). Is there no way to simply scroll through the document to a given position? On 12 апр, 19:12, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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.
Recursive call to native JS method
I have a native method, and need to make a recursive call... Is this the correct way to do it? protected native JavaScriptObject foo(JavaScriptObject bar) /*-{ ... th...@myclass::foo(com/google/gwt/core/client/JavaScriptObject;) (bar); ... return bar }-*/ I'm getting some errors so I'd like to eliminate the possibility that I made a wrong call to the native method... -- 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.
MouseMoveEvent problem when i move my mouse very fast
addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
How to get value of Div tag(GWT textbox) in Javascript
Hi to All, I am trying to make application where i have to GWT textbox one is for email and another is for password. I put that textbox with the help of div tag like div id=nameContainer/div div id=passwordContainer/div Once user enter some information in this textbox on jsp page i require that value in javascript how can i do that? Can you give me some example or give me guide line. -- 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: GWT calendar
I am still waiting for some reply on this... Any one who has integrated GWT component with a normal project can share what you did.. Thanks On Apr 8, 8:15 pm, Naveen r.naveens...@gmail.com wrote: Hi I need to implementcalendarfunctionality to an already existing nonGWTproject. I would like to know if it is possible to integrate theGWTcalendarto my nonGWTproject. I am aware that we need to convert the java code into java script, so my question is can i run this as an separateGWTproject and then implement that java script in my project.. Plz let me know if this will work also any other info will be of great 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-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: MouseMoveEvent problem when i move my mouse very fast
http://www.farbtube.com this is the demo, or should i use a canvas? Anyone know how to implement it? On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
Re: How to scroll page to element
I don't understand well your question, but why don't you use div to separate parts from the page, and then call the div class that you need?? On 13 abr, 08:55, redlaber vyalov.e...@gmail.com wrote: The next problem: I have finished big gwt-application and I cant add a ScrollPanel in it. But i know position of browser scrollbar, where I want to jump (scroll). Is there no way to simply scroll through the document to a given position? On 12 апр, 19:12, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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: How to scroll page to element
I assume you're using GWT 2.0. If so dom.client.Element has a method: scrollIntoView which may be what you are looking for. To scroll to a Button for example: Button button = new Button(); //... button.getElement().scrollIntoView(); This will scroll any required elements (including ScrollPanels and the document itself) to make sure that the Button is visible to the user. Hope that helps. //Jason On Tuesday, 13 April 2010 10:35:21 mram wrote: I don't understand well your question, but why don't you use div to separate parts from the page, and then call the div class that you need?? On 13 abr, 08:55, redlaber vyalov.e...@gmail.com wrote: The next problem: I have finished big gwt-application and I cant add a ScrollPanel in it. But i know position of browser scrollbar, where I want to jump (scroll). Is there no way to simply scroll through the document to a given position? On 12 апр, 19:12, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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: Recursive call to native JS method
I managed to resolve all the problems I had - and the following code works just fine. With a small change th...@myclass::foo(Lcom/google/gwt/core/client/JavaScriptObject;) (bar); (notice the L before com/...) On Apr 13, 9:30 am, markovuksanovic markovuksano...@gmail.com wrote: I have a native method, and need to make a recursive call... Is this the correct way to do it? protected native JavaScriptObject foo(JavaScriptObject bar) /*-{ ... th...@myclass::foo(com/google/gwt/core/client/JavaScriptObject;) (bar); ... return bar }-*/ I'm getting some errors so I'd like to eliminate the possibility that I made a wrong call to the native method... -- 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: ERROR Unable to find 'org/sempere/gwt/toolbox/core/toolbox-core.gwt.xml' on your classpath
inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ are the gwt-toolbox-0.1 package. I download on site codes-google : http://code.google.com/p/gwt-toolbox/downloads/list On Apr 12, 6:09 pm, Sripathi Krishnan sripathikrish...@gmail.com wrote: inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ Are these two regular java packages? Or have you create jar files for each of these? In GWTs module.xml, you don't inherit java packages. You inherit other modules. The path that you provide (org.sempere.gwt.toolbox.core.toolbox-core) must have a corresponding .gwt.xml file. You should go through this document -http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects Second, GWT works on java source files and not compiled class files. Also, by default, it expects these java files to be present under the client sub-package. Your package org.sempere.gwt.toolbox.core.toolbox-core *can*work, but it is better that you stick to conventions and introduce a client sub-package. --Sri On 12 April 2010 19:17, dev_web_fr thiquynhtrang...@gmail.com wrote: Hi, I have a pb : when i run the file mywebapp-shell.cmd on shell mode, i have this error : [TRACE] Loading inherited module 'org.sempere.gwt.toolbox.core.toolbox- core' [ERROR] Unable to find 'org/sempere/gwt/toolbox/core/toolbox- core.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? Or, in my file mywebapp.xml module !-- Inherit the core Web Toolkit stuff. -- inherits name='com.google.gwt.user.User'/ !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines. -- inherits name='com.google.gwt.user.theme.standard.Standard'/ inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- . /module and , in my file .classpath ?xml version=1.0 encoding=UTF-8? classpath classpathentry kind=src path=src/ classpathentry kind=src path=test/ classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=lib path=C:/travail/gwt-1.5.3/gwt-user.jar attributes attribute name=javadoc_location value=file:/C:/travail/ gwt-1.5.3/doc/javadoc// /attributes /classpathentry classpathentry kind=var path=JUNIT_HOME/junit.jar/ classpathentry kind=lib path=C:/travail/gdata/java/lib/gdata- spreadsheet-3.0.jar sourcepath=C:/travail/gdata/java/src/ classpathentry kind=lib path=C:/travail/commons-beanutils-1.8.3/ commons-beanutils-1.8.3.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-core-0.1.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-utils-0.1.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-remoting-0.1.jar/ classpathentry kind=lib path=C:/travail/gdata/java/lib/gdata- core-1.0.jar/ classpathentry kind=lib path=C:/travail/gwt-2.0.3/gwt- servlet.jar/ classpathentry kind=lib path=C:/travail/gwt-2.0.3/gwt-dev.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ aopalliance.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ guice-servlet-snapshot20081123.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ guice-snapshot20081123.jar/ classpathentry kind=con path=com.google.gwt.eclipse.core.GWT_CONTAINER/ classpathentry kind=con path=com.google.appengine.eclipse.core.GAE_CONTAINER/ classpathentry kind=output path=bin/ /classpath help me, please regards, -- 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.comgoogle-web-toolkit%2Bunsubs cr...@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
Re: ERROR Unable to find 'org/sempere/gwt/toolbox/core/toolbox-core.gwt.xml' on your classpath
inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ are the gwt-toolbox-0.1 package. I download on site codes-google : http://code.google.com/p/gwt-toolbox/downloads/list On Apr 12, 6:09 pm, Sripathi Krishnan sripathikrish...@gmail.com wrote: inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ Are these two regular java packages? Or have you create jar files for each of these? In GWTs module.xml, you don't inherit java packages. You inherit other modules. The path that you provide (org.sempere.gwt.toolbox.core.toolbox-core) must have a corresponding .gwt.xml file. You should go through this document -http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects Second, GWT works on java source files and not compiled class files. Also, by default, it expects these java files to be present under the client sub-package. Your package org.sempere.gwt.toolbox.core.toolbox-core *can*work, but it is better that you stick to conventions and introduce a client sub-package. --Sri On 12 April 2010 19:17, dev_web_fr thiquynhtrang...@gmail.com wrote: Hi, I have a pb : when i run the file mywebapp-shell.cmd on shell mode, i have this error : [TRACE] Loading inherited module 'org.sempere.gwt.toolbox.core.toolbox- core' [ERROR] Unable to find 'org/sempere/gwt/toolbox/core/toolbox- core.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? Or, in my file mywebapp.xml module !-- Inherit the core Web Toolkit stuff. -- inherits name='com.google.gwt.user.User'/ !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines. -- inherits name='com.google.gwt.user.theme.standard.Standard'/ inherits name=org.sempere.gwt.toolbox.core.toolbox-core/ inherits name=org.sempere.gwt.toolbox.remoting.toolbox-remoting/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- . /module and , in my file .classpath ?xml version=1.0 encoding=UTF-8? classpath classpathentry kind=src path=src/ classpathentry kind=src path=test/ classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=lib path=C:/travail/gwt-1.5.3/gwt-user.jar attributes attribute name=javadoc_location value=file:/C:/travail/ gwt-1.5.3/doc/javadoc// /attributes /classpathentry classpathentry kind=var path=JUNIT_HOME/junit.jar/ classpathentry kind=lib path=C:/travail/gdata/java/lib/gdata- spreadsheet-3.0.jar sourcepath=C:/travail/gdata/java/src/ classpathentry kind=lib path=C:/travail/commons-beanutils-1.8.3/ commons-beanutils-1.8.3.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-core-0.1.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-utils-0.1.jar/ classpathentry kind=lib path=C:/travail/gwt-toolbox-0.1/dist/ toolbox-remoting-0.1.jar/ classpathentry kind=lib path=C:/travail/gdata/java/lib/gdata- core-1.0.jar/ classpathentry kind=lib path=C:/travail/gwt-2.0.3/gwt- servlet.jar/ classpathentry kind=lib path=C:/travail/gwt-2.0.3/gwt-dev.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ aopalliance.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ guice-servlet-snapshot20081123.jar/ classpathentry kind=lib path=C:/travail/guice-snapshot20081123/ guice-snapshot20081123.jar/ classpathentry kind=con path=com.google.gwt.eclipse.core.GWT_CONTAINER/ classpathentry kind=con path=com.google.appengine.eclipse.core.GAE_CONTAINER/ classpathentry kind=output path=bin/ /classpath help me, please regards, -- 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.comgoogle-web-toolkit%2Bunsubs cr...@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
Re: -port keeps disappearing
On Apr 13, 7:19 am, Abdullah Shaikh abdullah.shaik...@gmail.com wrote: OK, but is it not required to specify the port no. of my external server ? I am using port 8080. Not at all. You can specify a -startupUrl so the DevMode appends the ?gwt.codesrv= and you just have to copy/paste it to your browser; e.g. -startupUrl http://myserver:8080/myapp.php -- 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: Serialization whitelist
aha, that is helpful. I didn't know about the existence of the {App}.rpc.log file (is that documented anywhere?) for anyone reading this who isn't aware, this log file is presumably created as the compiler works out what types are reachable and whether they are serializable and goes something like: com.foo.bar.MyClass Serialization status Instantiable Path 'com.foo.bar.MyClass' is reachable as a subtype of type 'interface com.bar.whatever.ICommandT' Started from 'com.itf.shared.actions.ICommandT' and so on. On Apr 12, 3:05 pm, kozura koz...@gmail.com wrote: Yes, T must extend a serializable type, as you said otherwise GWT can't tell what it might be. Yes serialization discovery issues are a pain...right now you just have to stare through the RPC log and try to divine what happened. On Apr 12, 4:46 am, Jon Vaughan jsvaug...@gmail.com wrote: I think the problem is that on this example the type of the payload can be anything (it is not required to be serializable); given that this is possible, GWT must say, OK, then this type itself cannot be serialized (I would like this to fail the compile though somehow) On Apr 12, 10:27 am, Jon Vaughan jsvaug...@gmail.com wrote: Hi, I have a serialization issue to solve, where a class that is passed to the client, and is marked as IsSerializable, with a default no arg constructor, does not end up in the whitelist. There are no messages during the gwt compile (at debug level) 1. Does anyone have any thoughts about how I could automatically test for, or fail a build, if this is the case? 2. Does anyone know how I can get detailed information from GWT about this type of issue? 3. Anybody got any ideas what the problem itself is? :) (Are there issues with generic types and serialization? Do I have to explicitly whitelist the variations I want to use somehow?) Thanks if anyone has the time to look Jon My specific problem is as follows: Type 'com.itf.shared.actions.ResponseWithPayload' was not included in the set of types which can be serialized by this SerializationPolicy With the following command pattern style interface (where SingleQuestion is itself in the whitelist) 1. The service public interface ApplicationService extends RemoteService { T extends IResponse T execute(ICommandT action); } 2. The command public class SingleQuestionRequest implements ICommandResponseWithPayloadSingleQuestion, IsSerializable { public SingleQuestionRequest() { } } 3. The response class that doesn't end up in the whitelist public class ResponseWithPayloadT implements IResponse, IsSerializable { private T payload; @SuppressWarnings(unused) private ResponseWithPayload() { } public ResponseWithPayload(T payload) { super(); this.payload = payload; } public T getPayload() { return payload; } } -- 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.
Loading please wait + Animated GIF
Hi, I am showing a Loading, please wait.. message along with an animated gif. For this I have added following in my host page. div id=loadingimg src=loading.gif/ Loading Please wait../div I have used http://www.ajaxload.info/ to generate a simple loading GIF image. And onModuleLoad() I am am removing this div before adding actual components into Rool Panel. This is working fine. The issue is that the animation of the GIF is not displayed. I found out that when javascript code in mymodule.nocache.js starts running in browser, the animation of GIF stops. I even wrote following HTML page to test this. When I click on Click me button, I just run some big for loop in javascript. When the javascript is running, the animation of GIF is stopped. script function bigJS() { for (var i=1; i=1000; i++); alert('done'); } /script BODY div id=loadingimg src=loading.gif/ Loading Please wait../div input id=btnClick name=btnClick type=button value=Click me! onclick=bigJS() / /BODY Anyone know how to display the animated GIF properly? -- 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 internationalize widget attributes in uibinder ?
Hello, I can't find a way to internationalize widget attributes like text or value for TextBox. I've got this uibinder block: g:TextBox ui:field=login text=Enter your login/g:TextBox and I want to internationalize the Enter your login string (like I do with ui:msg tag in HTMLPanel). How can I do it without doing it manually in an external resource that I unclude with the ui:with tag ? Second question, How can I insert a translated key in an html block without using a span tag ? eg: div Here is an example of {myTranslatedResource.translatedWord}/ div 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.
Re: Project Stopped Working (wasn't me, I never touched it!)
Hi, Thanks for the response. It's nothing like that - like I say, I can rename the project and it works OK. Rename it back and it stops working. Something somewhere has a setting that stops it working is my guess. Ian http://examples.roughian.com On 12 April 2010 14:15, Katharina Probst kpro...@google.com wrote: Write permissions in the war directory? Files being read (do you have the app running from this directory?) so it can't override them...? kathrin On Mon, Apr 12, 2010 at 7:18 AM, Ian Bambury ianbamb...@gmail.com wrote: I have a bit of a weird problem. A project stopped working. When I run it, it fails to create the directory in the /war/ directory for the project (as in rename-to). I wasn't doing anything to the project structure, just coding when it happened. The odd thing is that if I just rename the project, it works fine, name it back again and it stops working. Any suggestions? Ian http://examples.roughian.com -- 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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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: UIBinder with custom widget and having Image as attribute.
Hi Thomas, Thanks for your help. I think i just did something wrong when I posted above message with the code snipet in it. Actually I am not having UIBinder xml for the MyImageButton class. I am trying to create a separate class with UIBinder and trying to use MyImageButton in it which you can say that I wrote in GWT1.5.3. Is there any way to achieve this? Where can find some of the advanced or complex UIBinder xml examples. -Thanks On Apr 8, 7:06 pm, Thomas Broyer t.bro...@gmail.com wrote: On Apr 8, 12:33 pm, San sandip.pati...@gmail.com wrote: Hi all, I was trying to use UIBinders for my own custom widget. public class MyImageButton extends CustomButton{ public @UiConstructor MyImageButton(Image upImage) { super(upImage); // TODO Auto-generated constructor stub } } My UiBinder.xml is as follows g:FlowPanel ui:field=flowPanel my:MyImageButton ui:field=imageButton/my:MyImageButton /g:FlowPanel At run time I am getting following error 15:59:00.437 [ERROR] [toolbar] my:MyImageButton ui:field='imageButton' missing required attribute(s): upImage Can anyone help me how i cann set the attribute's value as a object of Image class in UI Binder. You can only do so if your Image comes from a class imported with an ui:with *or* if you provide a @UiFactory method or @UiField(provided=true) the imageButton field. This would result in, either: ui:with field='res' type='com.company.myapp.client.SomeClass' ... my:MyImageButton upImage='${res.myImage}' / or my:MyImageButton / ... �...@uifactory MyImageButton createMyImageButton() { return new MyImageButton(myImage); } or my:MyImageButton field='imageButton' / ... �...@uifield(provided=true) MyImageButton imageButton; ... imageButton = new MyImageButton(myImage); ... binder.createAndBindUi(this); You could also replace the Image with an ImageResource so you can call the image's resource from the ui.xml with an ui:image/: ui:image field='myImage' resource='path/to/myImage.png' / ... my:MyImageButton upImage='${myImage}' / -- 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.
Best (faster) place to include gwt script in html ?
Which is the best place to put the gwt script in the HTML page from a performance point of view (page speed) ? I mean to minimize the load time of a page that contains some HTML code in addition to the GWT module. Is it better to put it at the end of the head section (immediately before the /head tag, or immediately before the analytics code) ? Or would it be faster to put it at the end of the html (immediately before the /html tag) ? Thanks! Oscar -- 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: -port keeps disappearing
So why doesn't the embedded server do it that way? Still seems like a bug to me. Ian http://examples.roughian.com On 13 April 2010 10:24, Thomas Broyer t.bro...@gmail.com wrote: On Apr 13, 7:19 am, Abdullah Shaikh abdullah.shaik...@gmail.com wrote: OK, but is it not required to specify the port no. of my external server ? I am using port 8080. Not at all. You can specify a -startupUrl so the DevMode appends the ?gwt.codesrv= and you just have to copy/paste it to your browser; e.g. -startupUrl http://myserver:8080/myapp.php -- 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.comgoogle-web-toolkit%2bunsubscr...@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: Change the default date
solved... using 'gwt-Label' class manually on the html page On Apr 11, 2:32 pm, Vik_Sintus miskintapisomb...@yahoo.com wrote: in the StockWatcher example ... how can I change the last update date, it currently stated Last update : Jan 1, 1970 11:00:00 AM see yourself @http://pasar-saham.appspot.com thank you for your help Vik -- 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: Serialization whitelist
re. Is it documented anywhere? See GWT Presentations page - http://code.google.com/webtoolkit/media_gallery.html. The Story of Your Compile presentation explains this, and a lot of other optimizations. Other than that, I am not aware of any other documentation. --Sri On 13 April 2010 15:38, Jon Vaughan jsvaug...@gmail.com wrote: aha, that is helpful. I didn't know about the existence of the {App}.rpc.log file (is that documented anywhere?) for anyone reading this who isn't aware, this log file is presumably created as the compiler works out what types are reachable and whether they are serializable and goes something like: com.foo.bar.MyClass Serialization status Instantiable Path 'com.foo.bar.MyClass' is reachable as a subtype of type 'interface com.bar.whatever.ICommandT' Started from 'com.itf.shared.actions.ICommandT' and so on. On Apr 12, 3:05 pm, kozura koz...@gmail.com wrote: Yes, T must extend a serializable type, as you said otherwise GWT can't tell what it might be. Yes serialization discovery issues are a pain...right now you just have to stare through the RPC log and try to divine what happened. On Apr 12, 4:46 am, Jon Vaughan jsvaug...@gmail.com wrote: I think the problem is that on this example the type of the payload can be anything (it is not required to be serializable); given that this is possible, GWT must say, OK, then this type itself cannot be serialized (I would like this to fail the compile though somehow) On Apr 12, 10:27 am, Jon Vaughan jsvaug...@gmail.com wrote: Hi, I have a serialization issue to solve, where a class that is passed to the client, and is marked as IsSerializable, with a default no arg constructor, does not end up in the whitelist. There are no messages during the gwt compile (at debug level) 1. Does anyone have any thoughts about how I could automatically test for, or fail a build, if this is the case? 2. Does anyone know how I can get detailed information from GWT about this type of issue? 3. Anybody got any ideas what the problem itself is? :) (Are there issues with generic types and serialization? Do I have to explicitly whitelist the variations I want to use somehow?) Thanks if anyone has the time to look Jon My specific problem is as follows: Type 'com.itf.shared.actions.ResponseWithPayload' was not included in the set of types which can be serialized by this SerializationPolicy With the following command pattern style interface (where SingleQuestion is itself in the whitelist) 1. The service public interface ApplicationService extends RemoteService { T extends IResponse T execute(ICommandT action); } 2. The command public class SingleQuestionRequest implements ICommandResponseWithPayloadSingleQuestion, IsSerializable { public SingleQuestionRequest() { } } 3. The response class that doesn't end up in the whitelist public class ResponseWithPayloadT implements IResponse, IsSerializable { private T payload; @SuppressWarnings(unused) private ResponseWithPayload() { } public ResponseWithPayload(T payload) { super(); this.payload = payload; } public T getPayload() { return payload; } } -- 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.comgoogle-web-toolkit%2bunsubscr...@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: Loading please wait + Animated GIF
Javascript is single threaded, and I presume the entire page as well. If you are running a javascript loop, the animation will appear sluggish or will stop, there isn't much you can do about it. If you want to run heavy javascript, use the IncrementalCommand or DeferredCommand patterns. This would allow the browser to do other activities, including animating the gif. --Sri On 13 April 2010 16:00, Yogesh yogeshrn...@gmail.com wrote: Hi, I am showing a Loading, please wait.. message along with an animated gif. For this I have added following in my host page. div id=loadingimg src=loading.gif/ Loading Please wait../div I have used http://www.ajaxload.info/ to generate a simple loading GIF image. And onModuleLoad() I am am removing this div before adding actual components into Rool Panel. This is working fine. The issue is that the animation of the GIF is not displayed. I found out that when javascript code in mymodule.nocache.js starts running in browser, the animation of GIF stops. I even wrote following HTML page to test this. When I click on Click me button, I just run some big for loop in javascript. When the javascript is running, the animation of GIF is stopped. script function bigJS() { for (var i=1; i=1000; i++); alert('done'); } /script BODY div id=loadingimg src=loading.gif/ Loading Please wait../div input id=btnClick name=btnClick type=button value=Click me! onclick=bigJS() / /BODY Anyone know how to display the animated GIF properly? -- 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.comgoogle-web-toolkit%2bunsubscr...@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: Project Stopped Working (wasn't me, I never touched it!)
Just a hunch .. do you have a HTML element (div/span/table etc) whose id is the same as your module name? GWT uses a hidden iframe whose id is the rename-to attribute in your module.xml.. and if you have another element with the same id.. well, things break unceremoniously. --Sri On 13 April 2010 16:03, Ian Bambury ianbamb...@gmail.com wrote: Hi, Thanks for the response. It's nothing like that - like I say, I can rename the project and it works OK. Rename it back and it stops working. Something somewhere has a setting that stops it working is my guess. Ian http://examples.roughian.com On 12 April 2010 14:15, Katharina Probst kpro...@google.com wrote: Write permissions in the war directory? Files being read (do you have the app running from this directory?) so it can't override them...? kathrin On Mon, Apr 12, 2010 at 7:18 AM, Ian Bambury ianbamb...@gmail.comwrote: I have a bit of a weird problem. A project stopped working. When I run it, it fails to create the directory in the /war/ directory for the project (as in rename-to). I wasn't doing anything to the project structure, just coding when it happened. The odd thing is that if I just rename the project, it works fine, name it back again and it stops working. Any suggestions? Ian http://examples.roughian.com -- 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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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: Project Stopped Working (wasn't me, I never touched it!)
No, I've found the problem. Me! Somehow the -war argument got an extra character in it - not deliberately, just a late night thing when I was putting the -port argument back, I suppose. Thanks to both of you for you help Ian http://examples.roughian.com On 13 April 2010 12:47, Sripathi Krishnan sripathikrish...@gmail.comwrote: Just a hunch .. do you have a HTML element (div/span/table etc) whose id is the same as your module name? GWT uses a hidden iframe whose id is the rename-to attribute in your module.xml.. and if you have another element with the same id.. well, things break unceremoniously. --Sri On 13 April 2010 16:03, Ian Bambury ianbamb...@gmail.com wrote: Hi, Thanks for the response. It's nothing like that - like I say, I can rename the project and it works OK. Rename it back and it stops working. Something somewhere has a setting that stops it working is my guess. Ian http://examples.roughian.com On 12 April 2010 14:15, Katharina Probst kpro...@google.com wrote: Write permissions in the war directory? Files being read (do you have the app running from this directory?) so it can't override them...? kathrin On Mon, Apr 12, 2010 at 7:18 AM, Ian Bambury ianbamb...@gmail.comwrote: I have a bit of a weird problem. A project stopped working. When I run it, it fails to create the directory in the /war/ directory for the project (as in rename-to). I wasn't doing anything to the project structure, just coding when it happened. The odd thing is that if I just rename the project, it works fine, name it back again and it stops working. Any suggestions? Ian http://examples.roughian.com -- 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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@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.
Serialization of lists
Hi, I posted this already at the AppEngine forum but I think this is an interface problem so I post here as well. I’m building an application with GWT and GAE and have a problem saving data in the datastore. In my application I generate a list which consists of lists of strings, looks this way: ListListString trackList; It compiles but gives me a warning: [WARN] Warnings in generated://D271BF8A9063BFFBB6E2618C9E23EF15/eventManagement/shared/HandleEventService_TypeSerializer.java' [WARN] Line 31: Referencing deprecated class 'com.google.gwt.user.client.ui.ChangeListenerCollection' And 3 other deprecated classes When I run the application and call the method for saving data I get the following error: javax.jdo.JDOException: Error creating the MetaDataManager for API JDO : NestedThrowables: java.lang.reflect.InvocationTargetException I think the problem is that the compiler uses old GWT classes for serialization and not the classes of the GAE. Right? Any idea how I could fix this problem? Thanks a lot. Greetings -- 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.
UIBinder with code in earlier versions of GWT
Hi all, Can I use some of the widgets those are written in earlier versions of GWT2.0 directly in UIBinder classes. e.g.can I do something like suppose I am having MyWidget as a old class and I develop a new class as WidgetContainer with UIBinder and try to add MyWidget directly to WidgetContainer's ui.xml file without having ui.xml file for MyWidget? -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.
Re: Best (faster) place to include gwt script in html ?
It makes no difference. The html-code generate the page almost instantly. GWT metod RootPanel.get(id) also work very quickly. Almost all time of page generation will take the loading of gwt- module. So place your gwt-application where it is more convenient to you. On 13 апр, 13:51, Óscar Frías ofr...@gmail.com wrote: Which is the best place to put the gwt script in the HTML page from a performance point of view (page speed) ? I mean to minimize the load time of a page that contains some HTML code in addition to the GWT module. Is it better to put it at the end of the head section (immediately before the /head tag, or immediately before the analytics code) ? Or would it be faster to put it at the end of the html (immediately before the /html tag) ? Thanks! Oscar -- 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: How to scroll page to element
This is exactly what I was looking for. Thanks much, Jason! I'll try it tomorrow and write here the result. On 13 апр, 11:41, Jason Morris lem...@gmail.com wrote: I assume you're using GWT 2.0. If so dom.client.Element has a method: scrollIntoView which may be what you are looking for. To scroll to a Button for example: Button button = new Button(); //... button.getElement().scrollIntoView(); This will scroll any required elements (including ScrollPanels and the document itself) to make sure that the Button is visible to the user. Hope that helps. //Jason On Tuesday, 13 April 2010 10:35:21 mram wrote: I don't understand well your question, but why don't you use div to separate parts from the page, and then call the div class that you need?? On 13 abr, 08:55, redlaber vyalov.e...@gmail.com wrote: The next problem: I have finished big gwt-application and I cant add a ScrollPanel in it. But i know position of browser scrollbar, where I want to jump (scroll). Is there no way to simply scroll through the document to a given position? On 12 апр, 19:12, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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: Serialization of lists
Check out these threads, it's a bug in the RPC serializer, there's a workaround on the second link. http://groups.google.com/group/google-web-toolkit/browse_thread/thread/cbf566637f03496a http://code.google.com/p/google-web-toolkit/issues/detail?id=4438 On Apr 13, 7:27 am, Jochen Schnaidt j.schna...@t-online.de wrote: Hi, I posted this already at the AppEngine forum but I think this is an interface problem so I post here as well. I’m building an application with GWT and GAE and have a problem saving data in the datastore. In my application I generate a list which consists of lists of strings, looks this way: ListListString trackList; It compiles but gives me a warning: [WARN] Warnings in generated://D271BF8A9063BFFBB6E2618C9E23EF15/eventManagement/shared/HandleEventService_TypeSerializer.java' [WARN] Line 31: Referencing deprecated class 'com.google.gwt.user.client.ui.ChangeListenerCollection' And 3 other deprecated classes When I run the application and call the method for saving data I get the following error: javax.jdo.JDOException: Error creating the MetaDataManager for API JDO : NestedThrowables: java.lang.reflect.InvocationTargetException I think the problem is that the compiler uses old GWT classes for serialization and not the classes of the GAE. Right? Any idea how I could fix this problem? Thanks a lot. Greetings -- 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: MouseMoveEvent problem when i move my mouse very fast
You can't get every single mouse position, as browsers (indeed the OS) don't generate an event for every single pixel the mouse passes over. In fact this is not expected behavior in any application, including Paint; if you move fast you'll see it has to extrapolate, as you will as well. On Apr 13, 2:35 am, fonghuangyee fonghuang...@gmail.com wrote: http://www.farbtube.com this is the demo, or should i use a canvas? Anyone know how to implement it? On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
Re: File Download in GWT
I'm not sure what you mean. I think mean you want to send information with the link (no the iframe, because it is used to receive the response), so you have to add the parameters to the URL of the link (query-string). -Manolo On Sun, Apr 11, 2010 at 3:40 PM, daaSdemahoM m.s...@tu-bs.de wrote: Thanks! it works great! But i need to send a string to the servlet over this iframe. it s possible to pass a string in any attribute from this iframe? please, how can i read the sended value?? -- 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: Serialization of lists
Thank you very much. First problem solved. The javax.jdo.JDOException still occurs :-( On Apr 13, 4:06 pm, kozura koz...@gmail.com wrote: Check out these threads, it's a bug in the RPC serializer, there's a workaround on the second link. http://groups.google.com/group/google-web-toolkit/browse_thread/threa...http://code.google.com/p/google-web-toolkit/issues/detail?id=4438 On Apr 13, 7:27 am, Jochen Schnaidt j.schna...@t-online.de wrote: Hi, I posted this already at the AppEngine forum but I think this is an interface problem so I post here as well. I’m building an application with GWT and GAE and have a problem saving data in the datastore. In my application I generate a list which consists of lists of strings, looks this way: ListListString trackList; It compiles but gives me a warning: [WARN] Warnings in generated://D271BF8A9063BFFBB6E2618C9E23EF15/eventManagement/shared/HandleEventService_TypeSerializer.java' [WARN] Line 31: Referencing deprecated class 'com.google.gwt.user.client.ui.ChangeListenerCollection' And 3 other deprecated classes When I run the application and call the method for saving data I get the following error: javax.jdo.JDOException: Error creating the MetaDataManager for API JDO : NestedThrowables: java.lang.reflect.InvocationTargetException I think the problem is that the compiler uses old GWT classes for serialization and not the classes of the GAE. Right? Any idea how I could fix this problem? Thanks a lot. Greetings -- 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: firebug aborted *.cache.html
From time to time, i have the same problem here... right now with the hosted.html and i think only in dev mode, but not sure... Michael On Apr 12, 7:26 pm, Simon Botting simon.bott...@enbuenosaires.com wrote: Hi, In firefox firebug a red message is showing in the net tab that the request for the *.cache.html file is being aborted then re-requested and reloaded - fresh from the server. Here is a screen shot of firebug: http://www.enbuenosaires.com/images/firebug-aborted-cache-html.png my apache (v 2.2.9) config as it relates to GWT (as far as I'm aware) is as follows : # cache and compression Files *.cache.* SetOutputFilter DEFLATE ExpiresActive On ExpiresDefault modification plus 2 years /Files Files *.nocache.* SetOutputFilter DEFLATE ExpiresActive On ExpiresActive Off /Files Does anyone know why I'm getting these aborted messages, I imagine it must to be something to do with my apache.conf Any help greatly appreciated, Cheers Simon -- 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: Non-Anonymous UIBinding without @UIField(provided=true), How?
On Apr 12, 2:35 pm, Brian Reilly brian.irei...@gmail.com wrote: There is one convenience that this appears to leave out, though: @UiHandler. These are things that MVP tells us should be in the presenter, yet the annotation has to live in the view class instead. I haven't fully worked out my thoughts on this yet, but having already done MVP without UiBinder, I don't feel burdened by not using @UiHandler. Some have talked about having the presenter register callbacks with the view that the view can then call from @UiHandler annotated methods, which seems cumbersome to me. Others have talked about letting the view hold a reference to the presenter to call specific methods (maybe defined in a presenter interface) from @UiHandler methods. This may not be a bad approach, but I haven't tried it myself yet. I have a form that includes two date widgets and a Save button. One date represents a start date and the other represents an end date. I therefore have a business requirement that the end date not precede the start date. I would have been willing to use two @UiHandler annotations in the view class to disable 'illegal' dates on each DatePicker because that's a matter purely internal to the panel. It turned out that I could not use @UiHandler for that because there are two methods in DatePicker that take a single ShowRangeEvent argument. At least, I couldn't do that. On the other hand, the save button has its event handler attached within the presenter class. The view should not know how it is used. Respectfully, Eric Jablow -- 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: Best (faster) place to include gwt script in html ?
But this document suggests putting scripts at the bottom of the HTML to improve page download speed: http://developer.yahoo.com/performance/rules.html#js_bottom Is this true also for GWT script ? Thanks, Oscar On Apr 13, 3:34 pm, redlaber vyalov.e...@gmail.com wrote: It makes no difference. The html-code generate the page almost instantly. GWT metod RootPanel.get(id) also work very quickly. Almost all time of page generation will take the loading of gwt- module. So place your gwt-application where it is more convenient to you. On 13 апр, 13:51, Óscar Frías ofr...@gmail.com wrote: Which is the best place to put the gwt script in the HTML page from a performance point of view (page speed) ? I mean to minimize the load time of a page that contains some HTML code in addition to the GWT module. Is it better to put it at the end of the head section (immediately before the /head tag, or immediately before the analytics code) ? Or would it be faster to put it at the end of the html (immediately before the /html tag) ? Thanks! Oscar -- 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: MouseMoveEvent problem when i move my mouse very fast
i had the same problem and i dont think it has a solution since the events are sent from the browser and if they are wrong then theirs nothing to do about it On 13 אפריל, 09:35, fonghuangyee fonghuang...@gmail.com wrote: http://www.farbtube.com this is the demo, or should i use a canvas? Anyone know how to implement it? On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
Re: Best (faster) place to include gwt script in html ?
If you have just a simple html page that just loads the GWT app and maybe a spinning Loading gif, then it makes no difference. That page is more about when you have a regular html page that happens to also load a script, that you want the script at the bottom so all the other content - images etc - will load first and be visible to the user, before loading the script. On Apr 13, 8:59 am, Óscar Frías ofr...@gmail.com wrote: But this document suggests putting scripts at the bottom of the HTML to improve page download speed:http://developer.yahoo.com/performance/rules.html#js_bottom Is this true also for GWT script ? Thanks, Oscar On Apr 13, 3:34 pm, redlaber vyalov.e...@gmail.com wrote: It makes no difference. The html-code generate the page almost instantly. GWT metod RootPanel.get(id) also work very quickly. Almost all time of page generation will take the loading of gwt- module. So place your gwt-application where it is more convenient to you. On 13 апр, 13:51, Óscar Frías ofr...@gmail.com wrote: Which is the best place to put the gwt script in the HTML page from a performance point of view (page speed) ? I mean to minimize the load time of a page that contains some HTML code in addition to the GWT module. Is it better to put it at the end of the head section (immediately before the /head tag, or immediately before the analytics code) ? Or would it be faster to put it at the end of the html (immediately before the /html tag) ? Thanks! Oscar -- 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: Extending the 'Contact: MVP' example
The problem is that only one presenter can be active at a given time. If a presenter is controlling the left, right and center column, even handing the center column container to another presenter will not result in the original presenter giving up control or you get the effect of one view being drawn followed by the second view quickly replacing it. I ended up implementing the left and right columns as pure HTML+CSS and used JSNI or the History mechanism to trigger the appropriate View +Presenter to affect the center column. This way no presenter is controlling the left and right columns. Sean C. On Apr 12, 2:13 pm, Brian Reilly brian.irei...@gmail.com wrote: I think you should be able to do this pretty easily by putting something that implements HasWidgets (such as SimplePanel, FlowPanel, etc.) in your center column. You can then pass that container into your presenter as the place where its content should live. That should leave the other things that you've added to the RootPanel in place when you switch presenters for the center column. -Brian On Apr 10, 3:24 pm, Sean C. sean.cra...@gmail.com wrote: Having a similar problem with creating Composite Views backed by their respective Presenters. The bug in DockPanelLayoutPanel for Java 5 does not help and I don't have the option to switch to Java 6 but that is a separate discussion:http://code.google.com/p/google-web-toolkit/issues/detail?id=4254 Back to the problem: the Home Page is composed of three columns with the East and West columns being static HTML + CSS as well as some dynamic content (Vertical Panels), that affects the content of the Center column. Yes, JSNI is being used here. E.g: clicking the Login button in the West column presents a Login form in the Center column. The Home Page is one View + Presenter but the Login form is a separate View + Presenter. They do not play together and the Home View + Presenter always override the other Views + Presenters. Even tried placing separate DIV hooks in the HTML page to get the different views to attach to different nodes in the DOM but to no avail. Several options that are being tried and tested: 1. Play directly with the DOM (class) to swap widgets but then you just end up having one View + Presenter and a lot of widgets. 2. Creating a parent class for all Views and Presenters that contains the logic and content for the East and West Panels and then attach the new Views directly to the RootPanel. This is defeating the purpose of AJAX as it is equivalent to redrawing the page with the exception of the static parts. 3. Go back to the drawing board by looking at the options available:http://martinfowler.com/eaaDev/uiArchs.html Derek Greer has something that might inspire:http://www.aspiringcraftsman.com/2007/08/interactive-application-arch... A .NET centric post about this:http://bradwilson.typepad.com/blog/2008/06/composite-views.html Dolphin SmallTalk based discussion on Composite MVP:http://www.mimuw.edu.pl/~sl/teaching/00_01/Delfin_EC/Patterns/Composi Sean C. On Mar 18, 1:29 pm, Fabio Kaminski fabiokamin...@gmail.com wrote: As far as i understand you have windows that contain widgets... like: MainWidgetContainer (which owns) LoginWidget, HeaderWidget and so on.. LogoutWidgetContainer (owns) LogoutWidget, ComeBackSoonMessageWidget, etc.. if is that the case, you would only call the go() which means RootPanel.get().add() when you wanna change from one widget container to another... MainWidgetContainer - LogoutWidgetContainer not LoginWidget HeaderWidget or LogoutWidget... as soon you establish this rule (you can even restrict go() method to allowing only widget containers) if you dont do it yet.. the only thing you need ins to assemble the Containers.. like: public class MainView extends Composite implements Display { final LoginView loginView; final HeaderView headerView; (add those to this widget) (...) } Fabio Kaminski On Thu, Mar 18, 2010 at 2:06 PM, Brian Reilly brian.irei...@gmail.comwrote: It seems to me like you need a supervising presenter to coordinate interactions among each of the panes of the application, in a DockPanel as you suggest. The AppController would then bootstrap this instead of managing what is shown in the root panel. Finally, the logic that is in the AppController of the Contacts example would need to be pushed down into this presenter or something that sits between that and the contacts widget. Doing this, though, removes a lot of responsibility from the AppController. I don't know that the AppController is a bad idea. It may be useful for a simple example. However, I think it would be more useful to have a more self-contained contacts widget that could be reused without having to worry about the AppController. I haven't tried any
HTML5 Video in Mobile Safari
'm trying to code a site in GWT that plays videos with HTML5. Everything works great on the desktop, but mobile Safari on both the iPhone and iPad do not play the video. I can play a video using Video for Everybody. I've even copied the code to my own plain HTML page, and it works flawlessly. If I serve that same code via a GWT widget, mobile safari will not play the video. On the iPhone I see a gray box with a prohibitory sign around the play button, and on the iPad it shows up as a black box. I've made sure my doctype is !DOCTYPE html, but I don't know where else to start debugging. Perhaps it it because the code is injected via javascript? Any pointers on where to start looking would be greatly appreciated. Here is the exact code I am using for the video: !-- Video For Everybody by Kroc Camen. see camendesign.com/code/ video_for_everybody for documented code === -- video width=640 height=360 poster=poster.jpg controls autoplay source src=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4; type=video/mp4/source source src=http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv; type=video/ogg/source !--[if gt IE 6] object width=640 height=375 classid=clsid:02BF25D5-8C17-4B23- BC80-D3488ABDDC6B! [endif]--!--[if !IE]!-- object width=640 height=375 type=video/quicktime data=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4; !--![endif]-- param name=src value=http://clips.vorwaerts-gmbh.de/ big_buck_bunny.mp4 / param name=autoplay value=true / param name=showlogo value=false / object width=640 height=384 type=application/x-shockwave- flash data=player.swf? autostart=trueamp;image=poster.jpgamp;file=http://clips.vorwaerts- gmbh.de/big_buck_bunny.mp4 param name=movie value=player.swf? autostart=trueamp;image=poster.jpgamp;file=http://clips.vorwaerts- gmbh.de/big_buck_bunny.mp4 / !-- fallback image -- img src=poster.jpg width=640 height=360 alt=Big Buck Bunny title=No video playback capabilities, please download the video below / /object!--[if gt IE 6]!-- /object!--![endif]-- /video -- 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: Multi-tenancy in GWT
Kyle, I built a similar architecture, but with only one instance of the app serving all users. When a user authenticates, I look them up in a global store to figure out which tenant they belong to, and then use their tenant-specific database for all data persistence for the session. So all visitors use one instance of the app but each tenant has their own isolated database...multi-tenancy. The problem is, true multi-tenancy isn't supported by GAE...they've been talking about it for almost 2 years now, but it doesn't seem to be a priority for them. They want you to use a different domain for every tenant, which means multiple app instances (multiple versions of your app to deploy maintain). It also means your customer/tenant has to be in the loop for all domain administration tasks, which to me kind of defeats the purpose of customer-focused cloud computing. I set my multi-tenant app up on Amazon EC2, using 1 tomcat server and 6 mysql databases (6 tenants...each tenant has on average 10 users). The beauty is if I need to scale or load balance the app, add more tenants/database instances or just backup one tenant's data, this is pretty much just a mouse-click or 6 in the EC2 developer console. Murray On Mar 25, 8:15 am, Kyle Baley kyle.ba...@gmail.com wrote: Is that possible with GAE? In any case, I found something that works. I created a JSP page and dumped the contents of the MyApp.html into it. Then added the following to my web.xml: servlet servlet-nametest/servlet-name jsp-file/MyApp.jsp/jsp-file /servlet servlet-mapping servlet-nametest/servlet-name url-pattern/myApp/clients/*/url-pattern /servlet-mapping I added /clients in there for now because we're using gwt-dispatch and I haven't overridden its default of submitting things to /myApp/ dispatch. Still some kinks to work out (like resource references) but early results are encouraging. On Mar 24, 10:54 am, Uros Trebec uros.tre...@gmail.com wrote: I think the best way to do this is to deploy new instance of client application for every customer and have one instance of server application that all client applications work with to get their data, non-client-side business logic, etc. We're doing it this way when we have different versions of client application, which tends to change more often than server one. Also works when you have a development version of client that you need to test with the same server backend. Regards, Uros On Mar 24, 2:24 am, Kyle Baley kyle.ba...@gmail.com wrote: Not sure I understand. I plan to filter data on the server side of things. But I don't know how to configure GWT to allow me to navigate to specific client for the entire app. For example, Acme Hair Salon would navigate to mysite.com/ acmeHairSalon/myapp.html and Generic Dog Collars would navigate to mysite.com/genericDogCollars/myapp.html. Both URLs should map to the same instance of the application but in it, I'd check the URL to see which company was being used and filter all the data in it accordingly. I know how to do the filtering and can probably figure out how to check the URL for a company token. But I don't know how to configure GWT and/or GAE to use a single instance of the application for multiple (generic) URLs that aren't pre-defined. It sounds to me like something that should be done in web.xml but again, I don't know how. On Mar 23, 1:01 pm, dolcra...@gmail.com dolcra...@gmail.com wrote: So you can just built the ui once and always include it in the login page for which ever client as the server should be where you filter/ prevent access to data that's not for the current client. On Mar 22, 10:41 am, Kyle Baley kyle.ba...@gmail.com wrote: I'm new to GWT and the Java world having been in the .NET space for about 10 years. Our application will be a multi-tenant one (at least, to the degree that I understand the definition). We'd like customers to be able to navigate towww.mysite.com/customerName, then log in from there. I think I have a handle on how to manage this from the GAE datastore side but am wondering how to manage this URL mapping in web.xml for GWT. Also, would like to get some opinions on how to manage the authentication once it's set up. Here's how I see it working: - User navigates towww.mysite.com/customerName - System retrieves company data and stores in session and displays login page - User logs in. System authenticates user - For all RPC calls, system verifies user is logged in *and* checks that the URL matches the company info in the session Basically, I want to guard against a user logging into one client site, then navigating to another. Thanks Kyle -- You received this message because you are subscribed to the Google
An implementation of Selection/Cursor for RichTextArea
So I've written a complete selection/range implementation, which allows much more sophisticated Rich Text Editor operations. You can obtain and manipulate the cursor or current selected range - with this, I was able to trivially create a proper Link functionality to deal with existing links in the editor. Inspired from the partial solution in gwt-rocket, it uses a structural selection model like the W3C spec, with emulation to make it work the same in cursed IE*. And except for wrappers around js calls, everything is written in Java to allow full GWT optimization. I really think this functionality should be part of the GWT library, as I think it's the main missing core feature needed to implement full RTE capabilities without having to go import external JS RTE libraries. I could always post it as a separate library like gwt- rocket, but it's already fairly annoying the number of these little libraries with random bits of functionality, which quickly become unsupported or bloated. Additionally, due to an IE bug it would be best to have a getSelection/getRange method directly as part of the RichTextArea widget. But that's just me, do others think this is a really need-to-have for GWT? If others feel it'd be a good addition to GWT, I'd be willing to spend the time to try to get it in, maybe starting with getting it in the incubator. And through that would love to see any critiques or better ways to do any of it. Here's the API, purely structural and doesn't include any of the position-based methods that IE has: // Current selection is based on a document/window, so there is a browser // global selection, and a selection for any iframe windows. class Selection { // Get the browser global selection static Selection getSelection(); // Get selection associated with a particular window, ie an RTE iframe static Selection getSelection(JavaScriptObject window); // Get a range containing current selection. Changes to the range do not // affect the selection, and vice versa Range getRange(); // Set the selection to what is contained in the range. Subsequent // changes to this range object will not affect the selection void setRange(Range range); void clear(); Document getDocument() } // Represents a range in an html document, as a start and end text node, // and the offset in to them, ie between the two | marks here: // // bA r|ange athat spans/a/bi some elem|ents./i class Range { // Constructors Range(Document doc); Range(Element element); Range(RangeEndPoint cursorPoint); Range(RangeEndPoint startPoint, RangeEndPoint endPoint); // Get the start/end points of this range, or the cursor if no selection RangeEndPoint getCursor(); RangeEndPoint getStart(); RangeEndPoint getEnd(); // Get the document this range is contained within Document getDocument(); // Set the range to be a cursor, ie start == end void setCursor(RangeEndPoint cursorPoint); // Set the range to surround the given element void setRange(Element element); // Set the endpoints of the range void setRange(RangeEndPoint startPoint, RangeEndPoint endPoint); // Set the start or end point of the range void setStartPoint(RangeEndPoint startPoint); void setEndPoint(RangeEndPoint endPoint); // Returns true if start == end boolean isCursor(); // Collapses the range to a cursor, either to the start or end point void collapse(boolean start); // Compare the start or end point of this range with the start or end point // of another. how determines which endpoints, ie Range.START_TO_END int compareBoundaryPoint(Range compare, short how); // Get just the text selected, ie ange that spans some elem String getText(); // Get the html selected, including any tags needed to make it complete, ie: // bange athat spans/a/bi some elemi String getHtmlText(); // Returns the lowest level element that completely contains this range Element getCommonAncestor(); // Returns an ordered list of all the text nodes in this range ListText getSelectedTextNodes(); // Copy the contents of this range into the given element, leaving the // document undisturbed void copyContents(Element copyInto); // Delete the contents of this range from the document void deleteContents(); // Extracts the contents of this range into the given element, removing them // from the document void extractContents(Element copyInto); Element extractContents(); // same but creates a span element for you // Surrounds the contents of this range with the given element, putting it // in their place in the document and setting the range to contain it. void surroundContents(Element copyInto); Element surroundContents(); // same but creates a span element for you // A static utility function that should be part of Text or Node class //
I'm getting error The web.xml file does not exist
Obviously because I moved it from war folder and deleted it. But how to tell Google Web App that web.xml is in different folder? I use Eclipse 3.5 GWT 2.0.2 App Engine 1.3.1 Deploying Under Tomcat 6 JDK 1.5 -- 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: MouseMoveEvent problem when i move my mouse very fast
but when i refer the http://www.farbtube.com and http://canvaspaint.org, event i move very fast, they browser still can capture every single pixel, so i believe that this is GWT MouseEvent behavior or limitation. On Apr 13, 11:02 pm, ben fenster fenster@gmail.com wrote: i had the same problem and i dont think it has a solution since the events are sent from the browser and if they are wrong then theirs nothing to do about it On 13 אפריל, 09:35, fonghuangyee fonghuang...@gmail.com wrote: http://www.farbtube.com this is the demo, or should i use a canvas? Anyone know how to implement it? On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
Re: MouseMoveEvent problem when i move my mouse very fast
I can guarantee you they don't, the OS doesn't even provide that. If you move fast in a curve, you'll notice there's straight segments creating the curve. Thus they extrapolate. Smarter paint programs actually create a spline of the points to make it look better, but they still have to work with non-contiguous mouse points. On Apr 13, 10:40 am, fonghuangyee fonghuang...@gmail.com wrote: but when i refer thehttp://www.farbtube.comandhttp://canvaspaint.org, event i move very fast, they browser still can capture every single pixel, so i believe that this is GWT MouseEvent behavior or limitation. On Apr 13, 11:02 pm, ben fenster fenster@gmail.com wrote: i had the same problem and i dont think it has a solution since the events are sent from the browser and if they are wrong then theirs nothing to do about it On 13 אפריל, 09:35, fonghuangyee fonghuang...@gmail.com wrote: http://www.farbtube.com this is the demo, or should i use a canvas? Anyone know how to implement it? On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { System.out.println(X : + event.getX()); }); My problem is, if i move my mouse very fast, i cant receive every MouseMoveEvent. As the code above, i aspect: 0,1,2,3,4,5,6 But when i move very fast, i will get 0, 5, 15, 20, 50. I am doing a simple app as Window Paint. I need to detect every MouseMoveEvent so that i can do drawing on the page. 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.
Re: Multi-tenancy in GWT
In any case, I found something that works. I created a JSP page and dumped the contents of the MyApp.html into it. Then added the following to my web.xml: servlet servlet-nametest/servlet-name jsp-file/MyApp.jsp/jsp-file /servlet servlet-mapping servlet-nametest/servlet-name url-pattern/myApp/clients/*/url-pattern /servlet-mapping I added /clients in there for now because we're using gwt-dispatch and I haven't overridden its default of submitting things to /myApp/ dispatch. That is the best way to move forward. Since its unlikely that one client will access the website for another, you don't want the /#customer-name kind of urls. Also, in future, if you want to support a separate domain for each client, it would be easily doable. -Sri http://blog.530geeks.com On 13 April 2010 21:23, Muz murray.bo...@gmail.com wrote: Kyle, I built a similar architecture, but with only one instance of the app serving all users. When a user authenticates, I look them up in a global store to figure out which tenant they belong to, and then use their tenant-specific database for all data persistence for the session. So all visitors use one instance of the app but each tenant has their own isolated database...multi-tenancy. The problem is, true multi-tenancy isn't supported by GAE...they've been talking about it for almost 2 years now, but it doesn't seem to be a priority for them. They want you to use a different domain for every tenant, which means multiple app instances (multiple versions of your app to deploy maintain). It also means your customer/tenant has to be in the loop for all domain administration tasks, which to me kind of defeats the purpose of customer-focused cloud computing. I set my multi-tenant app up on Amazon EC2, using 1 tomcat server and 6 mysql databases (6 tenants...each tenant has on average 10 users). The beauty is if I need to scale or load balance the app, add more tenants/database instances or just backup one tenant's data, this is pretty much just a mouse-click or 6 in the EC2 developer console. Murray On Mar 25, 8:15 am, Kyle Baley kyle.ba...@gmail.com wrote: Is that possible with GAE? In any case, I found something that works. I created a JSP page and dumped the contents of the MyApp.html into it. Then added the following to my web.xml: servlet servlet-nametest/servlet-name jsp-file/MyApp.jsp/jsp-file /servlet servlet-mapping servlet-nametest/servlet-name url-pattern/myApp/clients/*/url-pattern /servlet-mapping I added /clients in there for now because we're using gwt-dispatch and I haven't overridden its default of submitting things to /myApp/ dispatch. Still some kinks to work out (like resource references) but early results are encouraging. On Mar 24, 10:54 am, Uros Trebec uros.tre...@gmail.com wrote: I think the best way to do this is to deploy new instance of client application for every customer and have one instance of server application that all client applications work with to get their data, non-client-side business logic, etc. We're doing it this way when we have different versions of client application, which tends to change more often than server one. Also works when you have a development version of client that you need to test with the same server backend. Regards, Uros On Mar 24, 2:24 am, Kyle Baley kyle.ba...@gmail.com wrote: Not sure I understand. I plan to filter data on the server side of things. But I don't know how to configure GWT to allow me to navigate to specific client for the entire app. For example, Acme Hair Salon would navigate to mysite.com/ acmeHairSalon/myapp.html and Generic Dog Collars would navigate to mysite.com/genericDogCollars/myapp.html. Both URLs should map to the same instance of the application but in it, I'd check the URL to see which company was being used and filter all the data in it accordingly. I know how to do the filtering and can probably figure out how to check the URL for a company token. But I don't know how to configure GWT and/or GAE to use a single instance of the application for multiple (generic) URLs that aren't pre-defined. It sounds to me like something that should be done in web.xml but again, I don't know how. On Mar 23, 1:01 pm, dolcra...@gmail.com dolcra...@gmail.com wrote: So you can just built the ui once and always include it in the login page for which ever client as the server should be where you filter/ prevent access to data that's not for the current client. On Mar 22, 10:41 am, Kyle Baley kyle.ba...@gmail.com wrote: I'm new to GWT and the Java world having been in the .NET space for about 10
Re: Need to explicitly remove event handlers manually?
I'd say that cleaning up no longer needed handlers is just as important as closing open files when you're done or freeing memory that you've allocated. You won't notice the effects at first, but eventually you will. How soon depends on the cases under which your application creates handlers). Eventually, you'll see event delivery taking longer and longer because your event bus is busy notifying handlers that you don't care about anymore. There's a reason why the handler manager goes to the trouble of returning a handler registration. There's no way for it to know that you're done with the handler. This is one of those cases where garbage collection wouldn't even help you because the handler manager has to hold a reference to the handler (unless you use weak references, but I'm pretty sure we don't have those in the JDK emulation layer). It's not too difficult to keep track of handler registrations. I often make a collection to hold them. Just add them all to the collection in your bind method and unregister everything (and clear the collection) in your unbind method. -Brian On Apr 12, 8:14 pm, rjcarr rjc...@gmail.com wrote: If you no longer need the handler then yeah, you should remove it, because you don't want to execute code blocks (onClick()) that are no longer needed or used. But it certainly isn't required. On Apr 12, 2:32 pm, macagain rgk...@gmail.com wrote: Is it required or even good practice to manually remove event handlers (say, on detach or unload)? I.e. keep the handlerRegistration around when returned from addHandler, then later call handlerManager.removeHandler(). Of course in the old world of manually managing listener collections, one had to do it, but in the new world of HandlerManagers? -- 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: GWT calendar
Take a look to an article I wrote time ago about this subject: http://code.google.com/p/gwtchismes/wiki/Tutorial_ExportingGwtLibrariesToJavascript_en Cheers -Manolo On Tue, Apr 13, 2010 at 9:59 AM, Naveen r.naveens...@gmail.com wrote: I am still waiting for some reply on this... Any one who has integrated GWT component with a normal project can share what you did.. Thanks On Apr 8, 8:15 pm, Naveen r.naveens...@gmail.com wrote: Hi I need to implementcalendarfunctionality to an already existing nonGWTproject. I would like to know if it is possible to integrate theGWTcalendarto my nonGWTproject. I am aware that we need to convert the java code into java script, so my question is can i run this as an separateGWTproject and then implement that java script in my project.. Plz let me know if this will work also any other info will be of great 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-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.
Deploy GWT 2.0 in a jetty
Hi im trying to deploy my GWT app in a jetty servlet container, im developing with eclipse with the google plugin. and when i run with the plugin http://127.0.0.1:/index.html?gwt.codesvr=127.0.0.1:9997, works fine. but when I copy the war directory and configure to jetty server the application doesnt work. Is a javascript error: Error: $doc.getElementById(Hsc) is null Archivo de origen: http://127.0.0.1:/planviajegwt/4A217B0203D1C3793F30E5DE0A69D1CC.cache.html Línea: 3601 function XY(){var a;!!$stats$stats({moduleName:$moduleName,sessionId: $sessionId,subSystem:Dsc,evtGroup:Esc,millis:(new Date).getTime(),type:Fsc,className:Gsc});parseInt($doc.getElementById(Hsc) [zrc])||0;a=UTb(new STb);yyb(PNb(Isc),a)} Some idea? 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.
Static and dynamic loading of images
Hello, my application has some standard icons like save, new, edit, etc... but the user can customize the icons and specify the images he wants the application to display at runtime. How can I accomplish this using ClientBundle interface (the standard images would be specified in the extended interface) and in runtime the system gets the custom image instead of the standard one by loading from an URL? I don't mind getting all the standard icons even if they won't be used at all. Today my system loads all images by the URL, so the startup of the application is too slow and most of the images are standard. I would like to do something like this: Image w = new Image(ResourceLoader.INSTANCE.background()); ResourceLoader looks if there is a customized image for background, and if there is... loads from an URL, if not... calls the Resources interface loading the standard one. interface Resources extends ClientBundle { Resources INSTANCE = GWT.create(Resources.class); @Source(images/background.png) ImageResource background(); } Thanks! Juan José Quito -- 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: __listener tags getting added in IE8 using GWT 2.0
Usually the attribute is so long (from my brief inspection it looked like the elements innerHtml) that the IE8 developer tool is just bugged out from it. At least that is what I always assumed. -Brandon On Mon, Apr 12, 2010 at 4:55 PM, myapplicationquestions parag.bhag...@cgi.com wrote: Hi All, I am having a very hard time understanding why each of my div when viewed in IE8 ( using its crappy developer tools) show me __listener tag which is incomplete.. div class=portlet-column style=height: 100%; __listener= DIV style=HEIGHT: 100% class=portlet-columnDIV class=mss- DockableWidget DIV class=mss-PortletContainer __eventBits=1 Has anyone faced this issue with IE8 and GWT 2.0? 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.comgoogle-web-toolkit%2bunsubscr...@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.
TabLayoutPanel at 100% height
Hi there, I'm trying to use the newly (version 2.0) introduced TabLayoutPanel. What I also want is that the embedded widget in each panel's tab has a height of 100% (take the whole vertical place). In order to do so I just made a very simple example (no CSS, no customisation, no noting) that look like that: public void onModuleLoad() { TabLayoutPanel p = new TabLayoutPanel(30, Unit.PX); // do not work // p.setHeight(100%); // work p.setHeight(700px); p.add(new HTML(this), [this]); p.add(new HTML(that), [that]); p.add(new HTML(the other), [the other]); // Add the nameField and sendButton to the RootPanel // Use RootPanel.get() to get the entire body element RootPanel.get().add(p); } The html is trivial and only contains a div id=main/div. As you can guess I have a problem. When I say that the height should be 100% I see nothing. I can click on the various tabs no panel appears / changes. But when I say that the height should be XXXpx (any height will do the trick) then it works like a charm. Of course what I really want is the max height available in the browser window that is a 100%. Did any one already succeed in doing such a thing? What am I missing? Thanks for helping. CU Jerome -- 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.
UIBinder and CSS resources obfuscation
Hi, I'm currently searching around the web to found out how to tell UIBinder not to perform obfuscation (at-all) on css class. I've read codes samples in which it is tell to put inside the .gwt.xml the property CssResource.obfuscationPrefix to empty. But the css class name doesn't have any links with original name. I've tried to combined with the CssResource.style to pretty but the css class are still prefixed with the package name in which the css resources are located. Prefixing each class with @external in css is some kind of solution, but doing it for all class in all css I want to test is not a real solution. So, my question is : Is there any options for telling UIBinder not to obfuscate css class ? (like a global @external) 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-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: How to scroll page to element
You can get away without a ScrollPanel if you want to as well. Something like: verticalPanel.getElement().setScrollTop(secondFlexTable.getElement().getAbsoluteTop()); -Brandon On Mon, Apr 12, 2010 at 12:12 PM, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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.comgoogle-web-toolkit%2bunsubscr...@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: Gwt 2 dev mode, refresh time very slow, any hints ?
I'm seeing this as well. When I switch from embedded jetty to noserver, everything is MUCH slower, despite being all local on the same machine with PLENTY of RAM and CPU to spare. It's bad enough that development time is severely impacted. On Apr 1, 6:11 am, Skal pasvinc...@gmail.com wrote: Hi all, We are developping an application with many panels and remote services (about an hundred) and we are facing a very annoying issue with the oophm dev mode, the browser refresh time takes up 30 000 to 90 000 ms. The -Dgwt.perflog jvm option shows that most of the time is spent in the Oophm.SessionHandler.loadModule call (all the app is in a single module). Also, we don't use the embedded jetty server (-noServer, we use an another jetty server). I notice that in dev mode, *.gwt.rpc and *.cache.png files are still generated in the war directory after each refresh, even if the code modification doesn't have an impact on this ressources (for example just a label change), why that ? I've heard about a rpc.blacklist property config extension, does it make sense to use this property to block some remote service compilation thus accelerating the refresh time ? Thanks a lot for any clue. -- 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.
Can we Integrate reCaptcha with GWT FormPanel
Hello Guys, First of i want to say thanks to all you for help me a lot. THANKS ONES AGAIN. Now i have got stuck in an another problem, I want to reCaptcha into my GWT FormPanel, I don't know how to do this. I have done lot of efforts but i fail to do this. I succeed to run reCaptcha in GWT Project by configure the HTML file, but this reCaptcha not integrate with the GWT FormPanel. Please Help me ones again your friend Ankit -- 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: An implementation of Selection/Cursor for RichTextArea
This is a nice functionality which I think should be present in gwt-core. FYI: Some weeks ago I sent a patch to enable/disable the RichTextArea, and now it is in the core (http://gwt-code-reviews.appspot.com/131802) The steps you have to follow are: 1.- Subscribe to gwt-contributors mailing list 2.- Open a ticket with the issue. 3.- Add a patch to the cod-review application (don't forget to add enough code to test the new feature, and follow the style conventions) 4.- Wait for feedback. 5.- Finally if the patch is accept you must sign a CLA Take a look to this page: http://code.google.com/webtoolkit/makinggwtbetter.html#submittingpatches Cheers Manolo On Tue, Apr 13, 2010 at 5:54 PM, kozura koz...@gmail.com wrote: So I've written a complete selection/range implementation, which allows much more sophisticated Rich Text Editor operations. You can obtain and manipulate the cursor or current selected range - with this, I was able to trivially create a proper Link functionality to deal with existing links in the editor. Inspired from the partial solution in gwt-rocket, it uses a structural selection model like the W3C spec, with emulation to make it work the same in cursed IE*. And except for wrappers around js calls, everything is written in Java to allow full GWT optimization. I really think this functionality should be part of the GWT library, as I think it's the main missing core feature needed to implement full RTE capabilities without having to go import external JS RTE libraries. I could always post it as a separate library like gwt- rocket, but it's already fairly annoying the number of these little libraries with random bits of functionality, which quickly become unsupported or bloated. Additionally, due to an IE bug it would be best to have a getSelection/getRange method directly as part of the RichTextArea widget. But that's just me, do others think this is a really need-to-have for GWT? If others feel it'd be a good addition to GWT, I'd be willing to spend the time to try to get it in, maybe starting with getting it in the incubator. And through that would love to see any critiques or better ways to do any of it. Here's the API, purely structural and doesn't include any of the position-based methods that IE has: // Current selection is based on a document/window, so there is a browser // global selection, and a selection for any iframe windows. class Selection { // Get the browser global selection static Selection getSelection(); // Get selection associated with a particular window, ie an RTE iframe static Selection getSelection(JavaScriptObject window); // Get a range containing current selection. Changes to the range do not // affect the selection, and vice versa Range getRange(); // Set the selection to what is contained in the range. Subsequent // changes to this range object will not affect the selection void setRange(Range range); void clear(); Document getDocument() } // Represents a range in an html document, as a start and end text node, // and the offset in to them, ie between the two | marks here: // // bA r|ange athat spans/a/bi some elem|ents./i class Range { // Constructors Range(Document doc); Range(Element element); Range(RangeEndPoint cursorPoint); Range(RangeEndPoint startPoint, RangeEndPoint endPoint); // Get the start/end points of this range, or the cursor if no selection RangeEndPoint getCursor(); RangeEndPoint getStart(); RangeEndPoint getEnd(); // Get the document this range is contained within Document getDocument(); // Set the range to be a cursor, ie start == end void setCursor(RangeEndPoint cursorPoint); // Set the range to surround the given element void setRange(Element element); // Set the endpoints of the range void setRange(RangeEndPoint startPoint, RangeEndPoint endPoint); // Set the start or end point of the range void setStartPoint(RangeEndPoint startPoint); void setEndPoint(RangeEndPoint endPoint); // Returns true if start == end boolean isCursor(); // Collapses the range to a cursor, either to the start or end point void collapse(boolean start); // Compare the start or end point of this range with the start or end point // of another. how determines which endpoints, ie Range.START_TO_END int compareBoundaryPoint(Range compare, short how); // Get just the text selected, ie ange that spans some elem String getText(); // Get the html selected, including any tags needed to make it complete, ie: // bange athat spans/a/bi some elemi String getHtmlText(); // Returns the lowest level element that completely contains this range Element getCommonAncestor(); // Returns an ordered list of all the text nodes in this range ListText getSelectedTextNodes(); // Copy the contents of this range
Re: TabLayoutPanel at 100% height
You need to add it to the RootLayoutPanel vs the RootPanel, as specified here: http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels You may also want to put it inside one of the other *LayoutPanels like a DockLayoutPanel. On Apr 13, 8:09 am, Jérôme jerome.pasch...@gmail.com wrote: Hi there, I'm trying to use the newly (version 2.0) introduced TabLayoutPanel. What I also want is that the embedded widget in each panel's tab has a height of 100% (take the whole vertical place). In order to do so I just made a very simple example (no CSS, no customisation, no noting) that look like that: public void onModuleLoad() { TabLayoutPanel p = new TabLayoutPanel(30, Unit.PX); // do not work // p.setHeight(100%); // work p.setHeight(700px); p.add(new HTML(this), [this]); p.add(new HTML(that), [that]); p.add(new HTML(the other), [the other]); // Add the nameField and sendButton to the RootPanel // Use RootPanel.get() to get the entire body element RootPanel.get().add(p); } The html is trivial and only contains a div id=main/div. As you can guess I have a problem. When I say that the height should be 100% I see nothing. I can click on the various tabs no panel appears / changes. But when I say that the height should be XXXpx (any height will do the trick) then it works like a charm. Of course what I really want is the max height available in the browser window that is a 100%. Did any one already succeed in doing such a thing? What am I missing? Thanks for helping. CU Jerome -- 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: Unresponsive Script Warning - Need help on Incremental Command
To clarify, are you getting to your 'onSuccess()' of your callback? It could be the case that GWT can't deserialize the objects and there isn't much you can do about it except grab your data in smaller chunks. The deRpc may help but it has it's own issues, large payloads in FireFox throw an exception saying it couldn't evaluate the payload. If you are successfully getting your data and causing that error in your code, such as looping over that large collection creating a table, you will want to investigate IncrementalCommand as you suspect. On Apr 12, 4:39 am, Anand Mohan Singh andy.bi...@gmail.com wrote: Hi, I am using GWT 2.0.3 along with Gilead 1.3 and Hibernate 3.2 for developing an application. Some of the bean classes have 20+ entities because of which when I am trying to bring list of such beans to client side the browser is throwing 'Warning: Unresponsive Script'. This hold true even when instead of Gilead, DTO is used. So problem is basically large chunk of data. However, because of requirement I will have to use such big beans. I browsed through various forums and after quite a work came along 'Incremental Command'. However, there is no comprehensive documentation/tutorial for it and I don't know how to proceed further with it.Hence, if possible can someone help me by explaining how 'Incremental Command' works and how to use it (If possible any comprehensive tutorials). I have already tried to implement on the line of the example given in the link below but it was not of much use. So request you to please help me through this. http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsDela... -- 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.
ext-gwt
Hi, I would like to know about any commercial implementation with ext-gwt - how buggy is it etc. Also does it have support for UIBinder 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.
Re: Need to explicitly remove event handlers manually?
This really is one more useful point which would make closures nice but we should wait for JDK 7 or later for this. I already ran into some of issues according handlers I missed to unbind. Therefore it would be nice to find a way to avoid this destructor-like (java uncommon) coding pattern. I think there should be an easy way, but actually I haven't had enough time to figure it out yet and provide an idea for a soultion. -- 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: How to scroll page to element
I've learned some things reading this thread. nice. :) looks like there are some easier ways of doing things than how i'm doing my scrolling, and this would probably be not the easiest, but i'll mention it for completeness. it's also possible to do the browser window scrolling in javascript, and make a JSNI call to the javascript function to do it. i'm currently using this method to simulate a page refresh: function scrollToTop() { window.scroll( 0, 0 ); } and the corresponding GWT JSNI method: public native void jsScrollWindowToTop() /*-{ $wnd.scrollToTop(); }-*/; just one more option. On Apr 12, 11:19 am, Brandon Turner boringbran...@gmail.com wrote: You can get away without a ScrollPanel if you want to as well. Something like: verticalPanel.getElement().setScrollTop(secondFlexTable.getElement().getAbsoluteTop()); -Brandon On Mon, Apr 12, 2010 at 12:12 PM, t.dave da...@lorgeousdays.com wrote: use ScrollPanel.setScrollPosition(). that sets the vertical scroll position of the scrollpanel, which you will need to calculate. try something like this: new ClickHandler() { public void onClick( ClickEvent event ) { int tableTop = secondFlexTable.getAbsoluteTop(); scrollPanel.setScrollPosition( tableTop ); } } i suppose in your case it wouldn't be a click handler if you're basing it off the history token, but hopefully this will point you in the right direction. On Apr 12, 7:34 am, redlaber vyalov.e...@gmail.com wrote: I want to scroll page, generated with gwt, to some element. Its should be simple, but i cannt find the solution. For example: I have a vertical panel with two flexables. When i get the history token goto2 I want to scroll my page to the second table. (Sorry for the terrible english). -- 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.comgoogle-web-toolkit%2bunsubscr...@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: UIBinder and CSS resources obfuscation
See the file Resources.gwt.xml .. It has a bunch of properties that you can specify to control how CSS is generated.. I haven't tried it, but putting this in your module.gwt.xml should do the trick. set-configuration-property name=CssResource.style value=pretty / --Sri On 13 April 2010 13:32, david.herv...@gmail.com david.herv...@gmail.comwrote: Hi, I'm currently searching around the web to found out how to tell UIBinder not to perform obfuscation (at-all) on css class. I've read codes samples in which it is tell to put inside the .gwt.xml the property CssResource.obfuscationPrefix to empty. But the css class name doesn't have any links with original name. I've tried to combined with the CssResource.style to pretty but the css class are still prefixed with the package name in which the css resources are located. Prefixing each class with @external in css is some kind of solution, but doing it for all class in all css I want to test is not a real solution. So, my question is : Is there any options for telling UIBinder not to obfuscate css class ? (like a global @external) 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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: Client side error
It happened again on IE8. Is that where you had it happen Michael? GWT team - does this error even make sense - the global event array should never be null should it? On Mar 24, 4:01 am, Michael W mwang_2...@yahoo.com wrote: I got similar error. Any solution of it? On Mar 10, 5:01 am, Joe Cole profilercorporat...@gmail.com wrote: I saw an error today which has me puzzled: com.google.gwt.core.client.JavaScriptException: (TypeError): '$wnd.__gwt_globalEventArray.length' is null or not an object number: -2146823281 description: '$wnd.__gwt_globalEventArray.length' is null or not an object This doesn't really make sense to me that it could be null - does anyone have any idea how this could happen? The application is fully initialised and has been in use for quite a time, but idle. Perhaps garbage collection? The browser config is: Browser Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/ 4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30729; .NET CLR 3.5.30729) -- 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: Need to explicitly remove event handlers manually?
I've stepped through the code and there is no requirement to unregister handlers explicitly. Each widget has a handler manager (as member variable) that manages its handlers. If a widget is removed from its parent or its parent explicitly clears it then the registered handlers will get cleaned up by normal garbage collection. This is not the case if you are using a global handler manager for say an event bus. If handlers are added that are specific to a particular presenter then the presenter needs to remove the handlers when it is destroyed. I implemented a Place Manager that takes care of all of this automatically along with history support. -- 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-contrib] Re: Comment on TroubleshootingOOPHM in google-web-toolkit
Comment by vrinda.pujare: Currently I am using GWT 2.0.3 with tomcat5.5 as a server, IE6 and WindowsXP 64bit. I am trying to debug my application in client debug mode. Also I have followed all the steps to set up debug mode. And started tomcat and application using DevMode in debug mode. Debug mode launches the browser launcher in client debug mode. But when I start debugging application, breakpoints does not get invoked when I run application in debug mode. Could any one help me out to figure our what cud be problem wid GWT 2.0.3 debugging? Thanks in advance. For more information: http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Have JsInliner refuse to interpose a new expression (issue344801)
Reviewers: scottb, Description: Have JsInliner refuse to interpose a new expression before a substituted argument. Please review this at http://gwt-code-reviews.appspot.com/344801/show Affected files: M dev/core/src/com/google/gwt/dev/js/JsInliner.java M dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java Index: dev/core/src/com/google/gwt/dev/js/JsInliner.java === --- dev/core/src/com/google/gwt/dev/js/JsInliner.java (revision 7879) +++ dev/core/src/com/google/gwt/dev/js/JsInliner.java (working copy) @@ -673,6 +673,12 @@ maintainsOrder = false; } } + +public void endVisit(JsNew x, JsContextJsExpression ctx) { + if (unevaluated.size() 0) { +maintainsOrder = false; + } +} @Override public void endVisit(JsNameRef x, JsContextJsExpression ctx) { Index: dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java === --- dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java (revision 7879) +++ dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java (working copy) @@ -80,6 +80,29 @@ compare(expected, input); } + /** + * Test that a new expression breaks argument ordering. + */ + public void testOrderingNew() throws Exception { +StringBuffer code = new StringBuffer(); +// A static variable x +code.append(var x;); + +// foo() uses x +code.append(function foo() { alert('x = ' + x); }); + +// callee does new foo before evaluating its argument +code.append(function callee(arg) { new foo(); return arg; }); + +// caller invokes callee with a multi that initializes x +code.append(function caller() { callee((x=1,2)); }); + +// bootstrap the program +code.append(caller();); + +compare(code.toString(), code.toString()); + } + public void testSelfRecursion() throws Exception { String input = function a1() { return blah b1() } + function b1() { return bar a1()} + function c() { a1() } c(); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Re: Have JsInliner refuse to interpose a new expression (issue344801)
Can anyone familiar with GWT's optimization review this? http://gwt-code-reviews.appspot.com/344801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Re: Have JsInliner refuse to interpose a new expression (issue344801)
LGTM, nits. http://gwt-code-reviews.appspot.com/344801/diff/1/2 File dev/core/src/com/google/gwt/dev/js/JsInliner.java (right): http://gwt-code-reviews.appspot.com/344801/diff/1/2#newcode677 dev/core/src/com/google/gwt/dev/js/JsInliner.java:677: public void endVisit(JsNew x, JsContextJsExpression ctx) { I assume the logic is essentially the same as for endVisit(JsInvocation)? Tiny bit of javadoc noting that would be good. Also, I think this wants to sort down below endVisit(JsNameRef). http://gwt-code-reviews.appspot.com/344801/diff/1/3 File dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java (right): http://gwt-code-reviews.appspot.com/344801/diff/1/3#newcode120 dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java:120: System.err.println(Input vs ); Unrelated to your patch, but maybe yank this line while you're here? http://gwt-code-reviews.appspot.com/344801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Re: Have JsInliner refuse to interpose a new expression (issue344801)
Oh, I had one final thought on this, that might be worth a note for the future, if my logic is sound: You might imagine having special-cased JsInvocations to an empty target method to not break evaluation order (since they do nothing). As a practical matter, however, we didn't bother doing so because such constructs would have already been inlined by the time we get here. This is NOT true for a JsNew op, which can never be inlined. We might want to add a TODO that a JsNew op with an empty target method could be special-cased to not break EvalutationOrder. http://gwt-code-reviews.appspot.com/344801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Re: Have JsInliner refuse to interpose a new expression (issue344801)
Thanks, Scott. I added the TODO at the place indicated. It applies more broadly, though: any place the inliner looks at a function call, it would be nice to know what if any side effects that function call has and would be affected by. http://gwt-code-reviews.appspot.com/344801/diff/1/2 File dev/core/src/com/google/gwt/dev/js/JsInliner.java (right): http://gwt-code-reviews.appspot.com/344801/diff/1/2#newcode677 dev/core/src/com/google/gwt/dev/js/JsInliner.java:677: public void endVisit(JsNew x, JsContextJsExpression ctx) { Done and done. http://gwt-code-reviews.appspot.com/344801/diff/1/3 File dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java (right): http://gwt-code-reviews.appspot.com/344801/diff/1/3#newcode120 dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java:120: System.err.println(Input vs ); On 2010/04/13 15:07:30, scottb wrote: Unrelated to your patch, but maybe yank this line while you're here? Done. http://gwt-code-reviews.appspot.com/344801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes ICE in JsInliner (issue284802)
LGTM http://gwt-code-reviews.appspot.com/284802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] [google-web-toolkit] r7912 committed - Added method to change the size of a MutableArray. Added factory metho...
Revision: 7912 Author: rchan...@google.com Date: Tue Apr 13 05:32:59 2010 Log: Added method to change the size of a MutableArray. Added factory method to construct MeutableArray of specific size. These provide a O(n) way to initialize a MutableArray as shown by com.google.gwt.collections.MutableArrayBenchmarkTest Review at http://gwt-code-reviews.appspot.com/319801 http://code.google.com/p/google-web-toolkit/source/detail?r=7912 Added: /trunk/bikeshed/test/com/google/gwt/collections/ClientMutableArrayTest.java /trunk/bikeshed/test/com/google/gwt/collections/GwtImmutableArrayTest.java /trunk/bikeshed/test/com/google/gwt/collections/MutableArrayBenchmarkTest.java Modified: /trunk/bikeshed/src/com/google/gwt/collections/CollectionFactory.java /trunk/bikeshed/src/com/google/gwt/collections/MutableArray.java /trunk/bikeshed/test/com/google/gwt/collections/ObjectArrayTest.java === --- /dev/null +++ /trunk/bikeshed/test/com/google/gwt/collections/ClientMutableArrayTest.java Tue Apr 13 05:32:59 2010 @@ -0,0 +1,27 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.collections; + +/** + * Re-run {...@link ObjectArrayTest} tests under GWT. + */ +public class ClientMutableArrayTest extends ObjectArrayTest { + @Override + public String getModuleName() { +return com.google.gwt.collections.Collections; + } + +} === --- /dev/null +++ /trunk/bikeshed/test/com/google/gwt/collections/GwtImmutableArrayTest.java Tue Apr 13 05:32:59 2010 @@ -0,0 +1,27 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.collections; + +/** + * Re-run {...@link ImmutableArrayTest} tests under GWT. + */ +public class GwtImmutableArrayTest extends ImmutableArrayTest { + @Override + public String getModuleName() { +return com.google.gwt.collections.Collections; + } + +} === --- /dev/null +++ /trunk/bikeshed/test/com/google/gwt/collections/MutableArrayBenchmarkTest.java Tue Apr 13 05:32:59 2010 @@ -0,0 +1,58 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.collections; + +import com.google.gwt.benchmarks.client.Benchmark; +import com.google.gwt.benchmarks.client.IntRange; +import com.google.gwt.benchmarks.client.Operator; +import com.google.gwt.benchmarks.client.RangeField; + +/** + * Benchmarks the performance of various MutableArray methods. + */ +public class MutableArrayBenchmarkTest extends Benchmark { + + final IntRange elemRange = new IntRange(0, 5000, Operator.ADD, 100); + + @Override + public String getModuleName() { +return com.google.gwt.collections.Collections; + } + + public void testAddGrowth() { + } + + public void testAddGrowth(@RangeField(elemRange) Integer numElements) { +MutableArrayInteger ma = CollectionFactory.createMutableArray(); + +for (int i = 0; i numElements; i++) { + ma.add(i); +} + } + + public void testSetSizeGrowth() { + } + + public void testSetSizeGrowth(@RangeField(elemRange) Integer numElements) { +MutableArrayInteger ma = CollectionFactory.createMutableArray(); + +ma.setSize(numElements, null); +for (int i = 0; i numElements; i++) { + ma.set(i, i); +} + } + +}
[gwt-contrib] [google-web-toolkit] r7913 committed - Have JsInliner refuse to interpose a new expression...
Revision: 7913 Author: sp...@google.com Date: Tue Apr 13 06:08:53 2010 Log: Have JsInliner refuse to interpose a new expression before a substituted argument. Review at http://gwt-code-reviews.appspot.com/344801 Review by: sco...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=7913 Modified: /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java /trunk/dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java === --- /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Tue Mar 23 14:56:21 2010 +++ /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Tue Apr 13 06:08:53 2010 @@ -673,11 +673,28 @@ maintainsOrder = false; } } - + @Override public void endVisit(JsNameRef x, JsContextJsExpression ctx) { checkName(x.getName()); } + +@Override +public void endVisit(JsNew x, JsContextJsExpression ctx) { + /* + * Unless all arguments have already been evaluated, assume + * that invoking the new expression might interfere with + * the evaluation of the argument. + * + * It would be possible to allow this if the invoked function + * either does nothing or does nothing that affects the + * remaining arguments. However, currently there is no + * analysis of the invoked function. + */ + if (unevaluated.size() 0) { +maintainsOrder = false; + } +} @Override public void endVisit(JsThisRef x, JsContextJsExpression ctx) { === --- /trunk/dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java Wed Oct 28 09:10:53 2009 +++ /trunk/dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java Tue Apr 13 06:08:53 2010 @@ -79,6 +79,29 @@ + function c1() { return ex2 ? a1() :c1(); } c1(); compare(expected, input); } + + /** + * Test that a new expression breaks argument ordering. + */ + public void testOrderingNew() throws Exception { +StringBuffer code = new StringBuffer(); +// A static variable x +code.append(var x;); + +// foo() uses x +code.append(function foo() { alert('x = ' + x); }); + +// callee does new foo before evaluating its argument +code.append(function callee(arg) { new foo(); return arg; }); + +// caller invokes callee with a multi that initializes x +code.append(function caller() { callee((x=1,2)); }); + +// bootstrap the program +code.append(caller();); + +compare(code.toString(), code.toString()); + } public void testSelfRecursion() throws Exception { String input = function a1() { return blah b1() } @@ -94,7 +117,6 @@ input = optimize(input, JsSymbolResolver.class, FixStaticRefsVisitor.class, JsInliner.class, JsUnusedFunctionRemover.class); expected = optimize(expected); -System.err.println(Input vs ); assertEquals(expected, input); } } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] [google-web-toolkit] r7914 committed - Fixes ICE in JsInliner....
Revision: 7914 Author: sco...@google.com Date: Tue Apr 13 07:20:13 2010 Log: Fixes ICE in JsInliner. We are getting a compiler crash if you try to inline a static JSNI method that references 'this' (weird case). This change disables inlining such methods. http://gwt-code-reviews.appspot.com/284802/show Found by: spoon Review by: spoon http://code.google.com/p/google-web-toolkit/source/detail?r=7914 Modified: /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java === --- /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Tue Apr 13 06:08:53 2010 +++ /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Tue Apr 13 07:20:13 2010 @@ -1368,25 +1368,36 @@ /** * Detects uses of parameters that would produce incorrect results if inlined. - * Generally speaking, we disallow the use of parameters as lvalues. + * Generally speaking, we disallow the use of parameters as lvalues. Also + * detects trying to inline a method which references 'this' where the call + * site has no qualifier. */ private static class ParameterUsageVisitor extends JsVisitor { -private boolean lvalue = false; +private final boolean hasThisExpr; private final SetJsName parameterNames; - -public ParameterUsageVisitor(SetJsName parameterNames) { +private boolean violation = false; + +public ParameterUsageVisitor(boolean hasThisExpr, SetJsName parameterNames) { + this.hasThisExpr = hasThisExpr; this.parameterNames = parameterNames; } @Override public void endVisit(JsNameRef x, JsContextJsExpression ctx) { if (ctx.isLvalue() isParameter(x)) { -lvalue = true; +violation = true; } } -public boolean parameterAsLValue() { - return lvalue; +@Override +public void endVisit(JsThisRef x, JsContextJsExpression ctx) { + if (!hasThisExpr) { +violation = true; + } +} + +public boolean hasViolation() { + return violation; } /** @@ -1911,9 +1922,10 @@ } // Check that parameters aren't used in such a way as to prohibit inlining -ParameterUsageVisitor v = new ParameterUsageVisitor(parameterNames); +ParameterUsageVisitor v = new ParameterUsageVisitor(thisExpr != null, +parameterNames); v.accept(toInline); -if (v.parameterAsLValue()) { +if (v.hasViolation()) { return false; } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7915 committed - Rolling back in r7776, which improves JsInliner, along with r7913 and ...
Revision: 7915 Author: sp...@google.com Date: Tue Apr 13 10:38:07 2010 Log: Rolling back in r7776, which improves JsInliner, along with r7913 and r7914, which fix bugs in it. The merge commands were: svn merge --ignore-ancestry -r 7775:7776 https://google-web-toolkit.googlecode.com/svn/trunk svn merge --ignore-ancestry -r 7912:7914 https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7915 Modified: /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsHoister.java /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsInliner.java /branches/snapshot-2010.03.29-r7809/dev/core/test/com/google/gwt/dev/js/JsInlinerTest.java === --- /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsHoister.java Mon Apr 5 14:44:40 2010 +++ /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsHoister.java Tue Apr 13 10:38:07 2010 @@ -221,16 +221,9 @@ stack.push(x); } -/** - * A this reference can only effectively be hoisted if the call site is - * qualified by a JsNameRef, so we'll ignore this for now. - */ @Override public void endVisit(JsThisRef x, JsContextJsExpression ctx) { - // Set a flag to indicate that we cannot continue, and push a null so - // we don't run out of elements on the stack. - successful = false; - stack.push(null); + stack.push(new JsThisRef(x.getSourceInfo())); } public JsExpression getExpression() { === --- /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsInliner.java Mon Apr 5 14:44:40 2010 +++ /branches/snapshot-2010.03.29-r7809/dev/core/src/com/google/gwt/dev/js/JsInliner.java Tue Apr 13 10:38:07 2010 @@ -136,7 +136,7 @@ */ affectedBySideEffects = true; } - + @Override public void endVisit(JsObjectLiteral x, JsContextJsExpression ctx) { affectedBySideEffects = true; @@ -600,6 +600,9 @@ * invocations occur. */ private static class EvaluationOrderVisitor extends JsVisitor { +public static final JsName THIS_NAME = (new JsScope(fake scope) { +}).declareName(this); + private boolean maintainsOrder = true; private final ListJsName toEvaluate; private final ListJsName unevaluated; @@ -670,11 +673,39 @@ maintainsOrder = false; } } - + @Override public void endVisit(JsNameRef x, JsContextJsExpression ctx) { - JsName name = x.getName(); - + checkName(x.getName()); +} + +@Override +public void endVisit(JsNew x, JsContextJsExpression ctx) { + /* + * Unless all arguments have already been evaluated, assume + * that invoking the new expression might interfere with + * the evaluation of the argument. + * + * It would be possible to allow this if the invoked function + * either does nothing or does nothing that affects the + * remaining arguments. However, currently there is no + * analysis of the invoked function. + */ + if (unevaluated.size() 0) { +maintainsOrder = false; + } +} + +@Override +public void endVisit(JsThisRef x, JsContextJsExpression ctx) { + checkName(THIS_NAME); +} + +public boolean maintainsOrder() { + return maintainsOrder unevaluated.size() == 0; +} + +private void checkName(JsName name) { if (!toEvaluate.contains(name)) { return; } @@ -683,10 +714,6 @@ maintainsOrder = false; } } - -public boolean maintainsOrder() { - return maintainsOrder unevaluated.size() == 0; -} /** * Determine if an expression contains a reference to a strict parameter. @@ -913,6 +940,7 @@ } inlining.push(invokedFunction); + x = tryToUnravelExplicitCall(x); JsExpression op = process(x, callerFunction, invokedFunction); if (x != op) { @@ -1030,6 +1058,7 @@ ListJsExpression hoisted = new ArrayListJsExpression( statements.size()); + JsExpression thisExpr = ((JsNameRef) x.getQualifier()).getQualifier(); ListJsName localVariableNames = new ArrayListJsName(); boolean sawReturnStatement = false; @@ -1102,13 +1131,14 @@ } // Confirm that the expression conforms to the desired heuristics - if (!isInlinable(program, callerFunction, invokedFunction, + if (!isInlinable(program, callerFunction, invokedFunction, thisExpr, x.getArguments(), op)) { return x; } // Perform the name replacement - NameRefReplacerVisitor v = new NameRefReplacerVisitor(x, invokedFunction); + NameRefReplacerVisitor v = new NameRefReplacerVisitor(thisExpr, + x.getArguments(), invokedFunction.getParameters()); for (ListIteratorJsName
[gwt-contrib] [google-web-toolkit] r7916 committed - Implement selection on trees...
Revision: 7916 Author: r...@google.com Date: Tue Apr 13 08:09:30 2010 Log: Implement selection on trees Rename 'onDataChange' - 'setData', etc. Minor stylistic fixes Review at http://gwt-code-reviews.appspot.com/333802 Review by: j...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=7916 Added: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/DataChanged.java Deleted: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/ListEvent.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/SizeChangeEvent.java Modified: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/HasCell.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/ListView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/PagingTableListView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/SimpleCellList.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/AbstractListViewAdapter.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/DefaultSelectionModel.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/SelectionModel.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/SideBySideTreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/SideBySideTreeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/StandardTreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/BasicTreeRecipe.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/Cookbook.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MailRecipe.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MultiSelectionModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MyTreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/TransactionTreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuote.java === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/DataChanged.java Tue Apr 13 08:09:30 2010 @@ -0,0 +1,70 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.bikeshed.list.shared; + +import java.util.List; + +/** + * Represents a list event. + * + * @param T the type of data in the list + */ +public class DataChangedT { + + private final int length; + private final int start; + private final ListT values; + + /** + * Creates a {...@link DataChanged} instance. + * + * @param start the start index of the data + * @param length the length of the data + * @param values the new values + */ + public DataChanged(int start, int length, ListT values) { +this.start = start; +this.length = length; +this.values = values; + } + + /** + * Get the length of the changed data set. + * + * @return the length of the data set + */ + public int getLength() { +return length; + } + + /** + * Get the start index of the changed data. + * + * @return the start index + */ + public int getStart() { +return start; + } + + /** + * Gets the value. + * + * @return the value + */ + public ListT getValues() { +return values; + } +} === --- /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/ListEvent.java Fri Apr 9 11:12:18 2010 +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the License); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and
[gwt-contrib] Re: Added method to change the size of a MutableArray. Added factory method to construct a nonempty ... (issue319801)
http://gwt-code-reviews.appspot.com/319801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] Re: Added method to change the size of a MutableArray. Added factory method to construct a nonempty ... (issue319801)
Dan, Freeland: Please disregard this last patch. I will not submit it. Actually I do not know why it got appended to this issue instead of becoming a new issue. Do I need to do something else to clean up? On 2010/04/13 18:36:44, rchandia wrote: http://gwt-code-reviews.appspot.com/319801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Have JsInliner refuse to interpose a new expression (issue344801)
I *think* it's the latter. On Tue, Apr 13, 2010 at 3:51 PM, Ray Cromwell cromwell...@gmail.com wrote: What's the motivation for this change? Did some code actually trip this up, or was this more a result of the new way constructor functions do work, whereas in the past, the majority of JsNew operations didn't do anything interesting? -Ray -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7917 committed - Fix for delegate-of-the-delegate NPE after ListView.Delegate refactor
Revision: 7917 Author: rj...@google.com Date: Tue Apr 13 12:46:18 2010 Log: Fix for delegate-of-the-delegate NPE after ListView.Delegate refactor http://code.google.com/p/google-web-toolkit/source/detail?r=7917 Modified: /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesListViewTable.java === --- /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesListViewTable.java Fri Apr 9 11:12:18 2010 +++ /trunk/bikeshed/src/com/google/gwt/valuestore/client/ValuesListViewTable.java Tue Apr 13 12:46:18 2010 @@ -92,6 +92,9 @@ */ public void setDelegate(ValuesListView.Delegate delegate) { this.delegate = delegate; +if (delegate != null) { + delegate.onRangeChanged(0, table.getNumDisplayedItems()); +} } public void setValueList(ListValuesK newValues) { @@ -103,7 +106,10 @@ @Override protected void onRangeChanged(ListViewValuesK view) { Range range = view.getRange(); -getDelegate().onRangeChanged(range.getStart(), range.getLength()); +Delegate delegate = getDelegate(); +if (delegate != null) { + delegate.onRangeChanged(range.getStart(), range.getLength()); +} } }; } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors To unsubscribe, reply using remove me as the subject.
[gwt-contrib] [google-web-toolkit] r7918 committed - Reverts r7916 (Implement selection on trees), which causes...
Revision: 7918 Author: gwt.mirror...@gmail.com Date: Tue Apr 13 18:19:04 2010 Log: Reverts r7916 (Implement selection on trees), which causes ExpensesScaffold to render every table cell with display:none. http://code.google.com/p/google-web-toolkit/source/detail?r=7918 Added: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/ListEvent.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/SizeChangeEvent.java Deleted: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/DataChanged.java Modified: /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/HasCell.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/ListView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/PagingTableListView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/SimpleCellList.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/AbstractListViewAdapter.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/DefaultSelectionModel.java /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/SelectionModel.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/SideBySideTreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/SideBySideTreeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/StandardTreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeNodeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeView.java /trunk/bikeshed/src/com/google/gwt/bikeshed/tree/client/TreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/BasicTreeRecipe.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/Cookbook.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MailRecipe.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MultiSelectionModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MyTreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/TransactionTreeViewModel.java /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuote.java === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/ListEvent.java Tue Apr 13 18:19:04 2010 @@ -0,0 +1,70 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.bikeshed.list.shared; + +import java.util.List; + +/** + * Represents a list event. + * + * @param T the type of data in the list + */ +public class ListEventT { + + private final int length; + private final int start; + private final ListT values; + + /** + * Creates a {...@link ListEvent}. + * + * @param start the start index of the data + * @param length the length of the data + * @param values the new values + */ + public ListEvent(int start, int length, ListT values) { +this.start = start; +this.length = length; +this.values = values; + } + + /** + * Get the length of the changed data set. + * + * @return the length of the data set + */ + public int getLength() { +return length; + } + + /** + * Get the start index of the changed data. + * + * @return the start index + */ + public int getStart() { +return start; + } + + /** + * Gets the value. + * + * @return the value + */ + public ListT getValues() { +return values; + } +} === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/bikeshed/list/shared/SizeChangeEvent.java Tue Apr 13 18:19:04 2010 @@ -0,0 +1,54 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package