cast JavaScriptObject to gwt widget
may i know how to cast JavascriptObject get from JSNI into gwt as gwt CUstomWidget CustomWiget widget = (CustomWidget) javascriptObjectFromJSNI; //doesnt work -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
This is what I do @UiField Hyperlink imageLink; ... String imgStr=img src='+url+'/; imageLink.setHTML(imgStr); Andrey On Jan 15, 4:25 pm, zixzigma zixzi...@gmail.com wrote: g:InlineHyperLink, g:HyperLink and g:Anchor cannot contain an element if I'm correct. do you know how we can then wrap an image inside a hyperlink, other than the approach below? g:HTMLPanel a href=#mail/starred Home g:Image resource={res.homeIcon} / /a /g:HTMLPanel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Exception falling through catch() in JSNI
I've been toying with Maps Api v3 and markerclusterer and run into a strange constellation with the following setup: IE 8 (64 bit) both hosted and production mode, GWT 2.1.1 Markercluster apparently does something to the Map, so that the map cannot be operated upon immediately when running IE8, i.e.: 1. setup map 2. setup markerclustere 3. zoom map - this throws an exception about a maptype being not defined I also get this with Firefox btw. I try{} catch{}'ed this in JSNI which works in Firefox as expected. But with IE, the exception simply falls through as if there were no catch statement. Has anybody seen something similar? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Exception falling through catch() in JSNI
It is probably triggering window.onerror in IE. See gwt-log's setErrorHandler method in the class below if you'd like to register a handler for it in GWT. http://code.google.com/p/gwt-log/source/browse/trunk/Log/src/com/allen_sauer/gwt/log/client/impl/LogImplBase.java On Sun, Jan 16, 2011 at 10:25 AM, George Georgovassilis g.georgovassi...@gmail.com wrote: I've been toying with Maps Api v3 and markerclusterer and run into a strange constellation with the following setup: IE 8 (64 bit) both hosted and production mode, GWT 2.1.1 Markercluster apparently does something to the Map, so that the map cannot be operated upon immediately when running IE8, i.e.: 1. setup map 2. setup markerclustere 3. zoom map - this throws an exception about a maptype being not defined I also get this with Firefox btw. I try{} catch{}'ed this in JSNI which works in Firefox as expected. But with IE, the exception simply falls through as if there were no catch statement. Has anybody seen something similar? -- 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-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Celltree Refresh question
did you find any solution to this problem? On Dec 7 2010, 12:50 pm, metalhammer29a metalhammer...@gmail.com wrote: I have the same problem : ( -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Session Handling - user HTTP Session or own solution?
Hello, im thinking about how to handle user-sessions. As i can remember there is the possibility to use HTTPSession (Servlet). Is this recommendable? Or is it a better idea to use an own solution? Im thinking about storing the session-id in a NoSQL database named redis. The session id will be generated on the server-side and holded at the client side. For each request the session will be send to the server (rpc-call). Thats my auth-process. What do you think? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem trying to use JSNI to eval() a JSON string
Not sure if Message can be an abstract class and can implement Serializable. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Celltree Refresh question
How do you add nodes in the first place? If you use TreeModel's AbstractNodeInfo, then you pass AbstractDataProvider to the AbstractNodeInfo's constructor. You can call updateRowCount() and updateRowData() on the data provider to add more nodes. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem trying to use JSNI to eval() a JSON string
Yeah, that makes sense. And this is only client side anyway. But I have tried with and without the Serializable implementation and get the same result. Do I somehow need to convert the string to a JSON object before passing it to eval()? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT documentation for UiBinder typo ? Spriter or Sprite ?
See http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#What_options_can_be_passed_to_development_mode (hint: -gen), and same for the compiler. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Security in GWT 2.1
On Sunday, January 16, 2011 8:47:12 AM UTC+1, agi wrote: @Thomas I was thinking about using all those new 2.1 classes like UserInformation etc... but I have read that in gwt 2.1.1 some classes used to support some simple authentication will be deleted ( or already are), as mentioned here: http://code.google.com/p/google-web-toolkit/issues/detail?id=5564. So should we try to follow example which is still using: UserInformation, UserInformationProxy, UserInformationRequest, UserInformationSimpleImp, LoginWidget ..? and if yes, which parts you could recommend to investigate?:) They're no longer in 2.1.1; you should try to follow the Expenses sample that ships with 2.1.1 (which oviously no longer uses UserInformation). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT + DB Connection -- Failure when deployed!
as far as I know jdbc connection is not allowed when deployed to the cloud/appengine.google.com. all you could do if you want to use your own database server would be to implement a service on your DB Server to provide the data in json or XML. and in your application to parse that data. i hope my info is still correct, i hadn't used GAE in the last 4-5 months. On Jan 15, 11:57 pm, zixzigma zixzi...@gmail.com wrote: Google App Engine's primary DB is BigTable DataStore, which is NOT a Relational Database. they are introducing a new hosted SQL DB for business. I don't think SQL is available at the moment. DataStore:http://code.google.com/appengine/docs/java/datastore/overview.html AppEngine for Business (SQL):http://code.google.com/appengine/business/#features AppEngine Roadmap:http://code.google.com/appengine/business/roadmap.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem trying to use JSNI to eval() a JSON string
IIRC, eval()-ing a literal object will throw because the braces are seen as opening a block of code, and not an object literal; that's why most uses of eval() for JSON parsing enclose the string within parens. But really, you should use com.google.gwt.core.client.JsonUtils instead, which takes of this for you, and also provides safe parsing using (IIRC) either native JSON.parse or a RegExp check before calling eval(). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: what cleanup is necessary if a widget creates multiple child elements
Thank you Thomas. You are, as always, extremely helpful! Regards, Joe -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
Thank You, do you know if its possible to use GWT Image type with your approach ? in other words, the image itself is not coming from a URL, it is a GWT Image object. http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html On Jan 16, 6:03 am, ailinykh ailin...@gmail.com wrote: This is what I do @UiField Hyperlink imageLink; ... String imgStr=img src='+url+'/; imageLink.setHTML(imgStr); Andrey On Jan 15, 4:25 pm, zixzigma zixzi...@gmail.com wrote: g:InlineHyperLink, g:HyperLink and g:Anchor cannot contain an element if I'm correct. do you know how we can then wrap an image inside a hyperlink, other than the approach below? g:HTMLPanel a href=#mail/starred Home g:Image resource={res.homeIcon} / /a /g:HTMLPanel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
to clarify, the Image is coming from ImageSource in ClientBundle. public interface Resources extends ClientBundle { @Source(icon.png) ImageResource icon(); } then in Java code backing UiBinder Resources res; Image image = new Image(res.icon()); On Jan 16, 11:30 am, zixzigma zixzi...@gmail.com wrote: Thank You, do you know if its possible to use GWT Image type with your approach ? in other words, the image itself is not coming from a URL, it is a GWT Image object.http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g... On Jan 16, 6:03 am, ailinykh ailin...@gmail.com wrote: This is what I do @UiField Hyperlink imageLink; ... String imgStr=img src='+url+'/; imageLink.setHTML(imgStr); Andrey On Jan 15, 4:25 pm, zixzigma zixzi...@gmail.com wrote: g:InlineHyperLink, g:HyperLink and g:Anchor cannot contain an element if I'm correct. do you know how we can then wrap an image inside a hyperlink, other than the approach below? g:HTMLPanel a href=#mail/starred Home g:Image resource={res.homeIcon} / /a /g:HTMLPanel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
Use AbstractImagePrototype.create(res.icon()).getHTML() instead of an Image widget. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Security in GWT 2.1
wow this is good, thanks for the link, I should check teh repository more often On Jan 15, 12:27 am, Thomas Broyer t.bro...@gmail.com wrote: Have a look at how the Expenses sample uses Google AppEngine's UserService to authenticate users with RequestFactory:http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
I used Image#getUrl() and it just worked !!! Thank You very much, I had seen many solutions, and yours by far was the cleanest, simplest decent one. Thank You ! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
On Sunday, January 16, 2011 8:59:28 PM UTC+1, zixzigma wrote: I used Image#getUrl() and it just worked !!! Make sure to test in IE6/7 ! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem trying to use JSNI to eval() a JSON string
Thomas is absolutely right about JsonUtils. In addition you may consider JsonpRequestBuilder if you are planing to use JSON services Regarding this particular example, I have some old code that uses plain eval(): it works, but I don't use quotes around field names (*type* and * timeleft*). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to wrap an image inside a Hyperlink ?
Thank You Thomas : ) I was so excited I forgot. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How can I move position of tab headers ?
Hello, I would like to display the tab header more on the right. Currently they are fixed on the left side with a css attribute left that is set to 0. The code that is generated by GWT is the following : div class=gwt-TabLayoutPanelTabs style=left: 0px; right: 0px; bottom: 0px; inside this, there is the code for tabs. /div I thought I could just get the element using code like this : Element element = (Element)nodeToUpdate; and then work on the style or remove it : element.removeAttribute(style); element.addClassName(CssResources.INSTANCE.commonCss().tabsHeader()); or element.getStyle().setLeft(150, Unix.PX) but unfortunately the style is not changed. I could changed some style that was not already set (for instance the color) but the one that are already set, I could not change them. I don't see other path currently. Does someone have an idea on how to do that ? Thank you ! Boris -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How can I move position of tab headers ?
This recent discussion may help https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/c1zlxMRD4gM -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: What does this message means - Error in Generated.....FieldSerializer.java
I had that error once after renaming one of my modules. I found out both the old and new module where still in my war directory. Try deleting the modules (and other compiled files) and re-compiling GWT. You'll then see which modules are generated and thus which modules are configured correctly. Good luck! Alex Nederlof On Wed, Jan 5, 2011 at 5:05 PM, Rodrigo Romano duelp...@gmail.com wrote: I dont think the problem is in my gwt.xml file. As I said in the topic its compiles after all. Look my Database.gwt.xml file located in the mypackage directoy. module inherits name=com.googlecode.objectify.Objectify/ inhheits name=com.google.gwt.user.User/ source path=database/source /moduel And My module located in mypackage/gwt/modules/client directory. module entry-point class=mypackage.gwt.modules.client.Etapa1 / inherits name=com.google.gwt.user.theme.starndard.Standard / inherits name-mypackage.Database inherirts name=com.google.gwt.user.User / /module I dont know what this fieldSerializer has about with my module. It is not my programing part. Look like is something in the gwt configuration... Help please. Thank you in advance, Rodrigo. On 4 jan, 13:39, Paul Robinson ukcue...@gmail.com wrote: For every that GWT translates to javascript for use in the client, you must tell GWT where the source code is so that it knows how to translate it. The error message is telling you that mypackage.database.MyClass is in a directory (mypackage/database) that is not amongst the directories that you have told GWT contain translatable source code. However, MyClass is being used from client code, and so GWT wants to translate it. If you want MyClass to be used in the client, then your gwt.xml file needs to specify that its directory (or a parent directory) contains source code. HTH Paul On 04/01/11 03:19, Rodrigo Romano wrote: Hi, I am trying to gwt compile my modules that are 100% POJO using objectify. And I getting this error message, but it compiles after that. What it means?? [ERROR] Errors in 'generated://C34ED3C084298C31F07B52ABE9478A9C/ mypackage/database/MyClass_FieldSerializer.java' [ERROR] Line 20: No source code is available for type mypackage.database.MyClass; did you forget to inherit a required module? See snapshot: C:\Users\ISAC_N~1\AppData\Local\Temp \mypackage.database.MyClass_FieldSerializer7886760315816490954.java [ERROR] Errors in 'generated:// D53192D233C2B1A6E8A82A245F961E08/mypackage/gwt/modules/client/ ISessionSuportService_Proxy.java' [ERROR] Line 463: No source code is available for type mypackage.database.MyClass; did you forget to inherit a required module? See snapshot: C:\Users\ISAC_N~1\AppData\Local\Temp \mypackage.gwt.modules.client.ISessionSuportService_Proxy5224909169187970547.java Compiling 6 permutations Compiling permutation 0... Compiling permutation 1... Compiling permutation 2... Compiling permutation 3... Compiling permutation 4... Compiling permutation 5... Compile of permutations succeeded Help Please [], Thanks in advance.- Ocultar texto das mensagens anteriores - - Mostrar texto das mensagens anteriores - -- 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-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: 2.1.1 Documentation Please
Hi David, Any update on the documentation? ServiceLayerDecorators are a hook to support advanced customization of RequestFactory like hooking in Spring as a Locator locator, but are not required to use RequestFactory. Thanks for your questions--I'll make sure they're answered in the forthcoming docs. hoping for something this week thanks On Jan 10, 5:48 pm, Lisa D lisadunne2...@gmail.com wrote: Thomas thanks you You do an amazing job contributing to this community, and I really appreciate everyone of your posts. Thank you very much I'll re-read your latest blog at least a dozen times and it will be invaluable to me and other while trying to figure this stuff out, and a great aid while reading the 2.1.1 API doc's One request Thomas, have you a small sample app (could be anything) that uses this and also Gin? thanks again for the latest blog post LD On Jan 10, 4:59 pm, Thomas Broyer t.bro...@gmail.com wrote: On Monday, January 10, 2011 11:07:48 PM UTC+1, Lisa D wrote: Sorry if it seems like I'm attacking anyone, I'm not... Currently I'm trying to start a ERP style project. Initially generating most of the scaffolding from Spring Roo (once 1.1.1 is released). This will give me my entities, and scaffolding for my activities and places. I'll be using MySQL as my DB And thanks to you and others on this group there's already lots of documentation available to me,(Activity / Places) so I can understand and manipulate the scaffolding to suit my needs. But what I cannot figure out is how I'm going to implement the Service Layer GWT 2.1.1 stuff to put some business logic into my App so that I can add some business functionality to the App. So ideally I'd like some documentation that could explain how I can implement business logic in my service layer while keep my entities very POJO like. Even something as simple as a bank account app. Adding and deleting money form a checking and saving a/c's etc. OK, so you don't need to know about ServiceLayerDecorator. What you askfor was already possible in GWT 2.1.0, but your business methods had to be static (but not necessarily on your entity classes!). With GWT 2.1.1 you'll give a ServiceLocator so RequestFactory will be able to create an instance of your object implementing your business logic (as either static or instance methods). And similarly, you'll provide a Locator for your entities so RequestFactory can find them without resorting to a findXxx static method on the entity class. I've finally spent a couple hours writing a log post about RequestFactory:http://tbroyer.posterous.com/gwt-211-requestfactory @David: could you please update the online JavaDoc? I currently have broken links, and some others might provide misleading information (e.g. InstanceRequest and RequestContext#create had EntityProxy bounds in 2.1.0 when they now have BaseProxy bounds) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Styling rows in CellTable
Thanks, I´ll try both methods Frank -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
is there a UiBinder equivalent for ImageResource ?
is there a UiBinder equivalent for ImageResource ? we have this g:Image resource= / but this is of type Image, not ImageResource. is it possible to get use ImageResource in UiBinder ? for example use a variablel in place of resource attribute ? in ui.xml g:Image resource=varX/ in .java @UiField ImageResource varX; -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: what cleanup is necessary if a widget creates multiple child elements
If your widgets are adding event handlers to the event bus (SimpleEventBus, for example) then they would 'probably' need to clean themselves up at some point by removing the handlers. When they should do this is really specific to the life-cycle of your widgets. If they are singletons with an application scope life cycle, for instance (why I used 'probably'), a reference to the widget will never go out of scope so there is no need to remove the handlers. If you are attaching, unattaching, and reattaching them then it would depend on whether the handlers were going to receive events while they are unattached and what they would do with them. If they update the dom then that wouldn't work so you would want to clean up the handlers in this case. But if they were only saving a reference to a list of records returned from the server for instance then that would be ok and there would be no need to remove the handler when the widget is detached. I hope you see where this is going - it all depends on your use case. Jeff On Wed, Jan 12, 2011 at 9:20 PM, Joe Hudson joe...@gmail.com wrote: Hi, I'm wondering what, if anything I need to do from a cleanup perspective when using a Widget that creates child elements. For example: public class MyWidget extends Widget { public MyWidget() { Element el = DOM.createDiv(); setElement(el); Element anotherEl = DOM.createDiv(); el.appendchild(anotherEl); } } With the code above, should I do anything with anotherEl on detatch? Thanks for the advice. -- 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. -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: is there a UiBinder equivalent for ImageResource ?
ui:image ? (and there's ui:data for DataResource-s) http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Hello_Stylish_World -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: is there a UiBinder equivalent for ImageResource ?
Yes, there is: ui:with field='res' type='com.me.client.MyResources' / The above's type points to your resource budle. Then: g:Image resource={res.myimage} / The above, res is the field name defined in with. myimage is some image resource defined in you resource bundle. It is now typesafe and checked at compiler time. Jeff On Sun, Jan 16, 2011 at 6:48 PM, zixzigma zixzi...@gmail.com wrote: is there a UiBinder equivalent for ImageResource ? we have this g:Image resource= / but this is of type Image, not ImageResource. is it possible to get use ImageResource in UiBinder ? for example use a variablel in place of resource attribute ? in ui.xml g:Image resource=varX/ in .java @UiField ImageResource varX; -- 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. -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: is there a UiBinder equivalent for ImageResource ?
I meant to say ClientBundle, not ResourceBundle. On Sun, Jan 16, 2011 at 7:27 PM, Jeff Schwartz jefftschwa...@gmail.comwrote: Yes, there is: ui:with field='res' type='com.me.client.MyResources' / The above's type points to your resource budle. Then: g:Image resource={res.myimage} / The above, res is the field name defined in with. myimage is some image resource defined in you resource bundle. It is now typesafe and checked at compiler time. Jeff On Sun, Jan 16, 2011 at 6:48 PM, zixzigma zixzi...@gmail.com wrote: is there a UiBinder equivalent for ImageResource ? we have this g:Image resource= / but this is of type Image, not ImageResource. is it possible to get use ImageResource in UiBinder ? for example use a variablel in place of resource attribute ? in ui.xml g:Image resource=varX/ in .java @UiField ImageResource varX; -- 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. -- *Jeff Schwartz* -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: what cleanup is necessary if a widget creates multiple child elements
BTW handlers can also ignore events while unattached. Lot of choices here. On Sun, Jan 16, 2011 at 7:18 PM, Jeff Schwartz jefftschwa...@gmail.comwrote: If your widgets are adding event handlers to the event bus (SimpleEventBus, for example) then they would 'probably' need to clean themselves up at some point by removing the handlers. When they should do this is really specific to the life-cycle of your widgets. If they are singletons with an application scope life cycle, for instance (why I used 'probably'), a reference to the widget will never go out of scope so there is no need to remove the handlers. If you are attaching, unattaching, and reattaching them then it would depend on whether the handlers were going to receive events while they are unattached and what they would do with them. If they update the dom then that wouldn't work so you would want to clean up the handlers in this case. But if they were only saving a reference to a list of records returned from the server for instance then that would be ok and there would be no need to remove the handler when the widget is detached. I hope you see where this is going - it all depends on your use case. Jeff On Wed, Jan 12, 2011 at 9:20 PM, Joe Hudson joe...@gmail.com wrote: Hi, I'm wondering what, if anything I need to do from a cleanup perspective when using a Widget that creates child elements. For example: public class MyWidget extends Widget { public MyWidget() { Element el = DOM.createDiv(); setElement(el); Element anotherEl = DOM.createDiv(); el.appendchild(anotherEl); } } With the code above, should I do anything with anotherEl on detatch? Thanks for the advice. -- 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. -- *Jeff Schwartz* -- *Jeff Schwartz* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
is it possible to create a custom widget in UiBinder that can contain unknown number of child elements
is it possible to create a custom widget in UiBinder that can contain unknown number of child elements ? similar to FlowPanel and HTMLPanel. for example, how to create a MyContainer, that can contain One or More Hyperlinks ? my:MyContainer g;HyperLink ui:field=a / g;HyperLink ui:field=b / g;HyperLink ui:field=c / g;HyperLink ui:field=n / /my:MyContainer reading the documentation, I noticed there are @UiFactory and @UiConstructor, but I believe they are useful when we have number of attributes. for example my:MyContainer attr1=a attr2=b .. attrN=n/ how can we do similar with child elements ? how can my:MyContainer gain access to its child elements ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: is it possible to create a custom widget in UiBinder that can contain unknown number of child elements
public class MyContainer extends Composite { } MyContainer.ui.xml g:FlowPanel /g:FlowPanel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: is it possible to create a custom widget in UiBinder that can contain unknown number of child elements
public class MyContainer extends Composite { } MyContainer.ui.xml g:FlowPanel g:FlowPanel ui:field=list/ /g:FlowPanel I want to use this MyContainer as I described in previous post. I want to get hold of all those child links, and add them to the inner FlowPanel (ui:fiel=list) is it possible ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Code Splitting Code Bloat
Has anyone experienced an issue where code splitting has actually increased the size of their application by a significant amount? Before I introduced code splitting my application weighed in at around 109KB. While that' not gigantic considering there is logic for over 10 screens I thought that maybe I could get it down to around 40KB once I introduced code splitting. Once I introduced code splitting the project grew to 429KB! The initial file download is now 181KB. How can this be possible?!! I've looked at the compile report and everything seems to be where it should. Does anyone have any ideas as to why the compiler is inflating the code size by 400%? I know that certain classes may be repeated for each split but the initial shell of the application is now weighing in at 181KB(without incubator grid or any screens) where the entire application (with incubator grid and 10 screens) used to weigh in at only 109KB. BTW, I'm using GWT 2.1.1 and the trunk snapshot of Gin. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Is GWT2.1 + Roo 1.1.1 production ready?
hi Joao, You might want to take a look at the questions posts in the Roo forum (http://forum.springsource.org/forumdisplay.php?f=67) to decide for yourself. But form my limited experience with it so far on my testing project, I would not want to plan on using Roo+GWT on real projects yet. Joseph -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: locale translation
I spent some time on the locale translations.. there are 2 ways which I have seen being adopted. 1. Create a constants class which has its associated property files. The property files can be for each locale 2. If you are using UIBinder you can read up on the Internationalization for UIBinder which differs a bit. This method however has drawn some criticism due to the fact that it is a bit complicated and you can not create a property file for the 'default' locale. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google's CellTree documentation - CellTreeExample2.java won't compile !
thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] Re: Optimizations for server-side invocations of CustomFieldSerializers. (issue1273801)
http://gwt-code-reviews.appspot.com/1273801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Optimizations for server-side invocations of CustomFieldSerializers. (issue1273801)
http://gwt-code-reviews.appspot.com/1273801/diff/1/2 File user/src/com/google/gwt/user/client/rpc/CustomFieldSerializer.java (right): http://gwt-code-reviews.appspot.com/1273801/diff/1/2#newcode19 user/src/com/google/gwt/user/client/rpc/CustomFieldSerializer.java:19: * An interface that may be implemented by class-based custom field serializers which will reduce On 2011/01/10 20:12:52, jat wrote: 80 chars, throughout the change Done. http://gwt-code-reviews.appspot.com/1273801/diff/1/2#newcode37 user/src/com/google/gwt/user/client/rpc/CustomFieldSerializer.java:37: } On 2011/01/10 20:12:52, jat wrote: Why only serialize? Shouldn't there be instantiateInstance and deserializeInstance methods as well? This change was focused on improving serialization as that was the hot spot. For consistency, I have now added instantiateInstance and deserializeInstance. http://gwt-code-reviews.appspot.com/1273801/diff/1/3 File user/src/com/google/gwt/user/client/rpc/core/java/lang/Boolean_CustomFieldSerializer.java (right): http://gwt-code-reviews.appspot.com/1273801/diff/1/3#newcode44 user/src/com/google/gwt/user/client/rpc/core/java/lang/Boolean_CustomFieldSerializer.java:44: public void serializeInstance(final SerializationStreamWriter streamWriter, On 2011/01/10 20:12:52, jat wrote: GWT style is to only use final on locals/parameters when it is required, such as for reference in an anonymous inner class. Done. http://gwt-code-reviews.appspot.com/1273801/diff/1/6 File user/src/com/google/gwt/user/client/rpc/core/java/lang/Double_CustomFieldSerializer.java (right): http://gwt-code-reviews.appspot.com/1273801/diff/1/6#newcode45 user/src/com/google/gwt/user/client/rpc/core/java/lang/Double_CustomFieldSerializer.java:45: throws SerializationException { On 2011/01/10 20:12:52, jat wrote: Continuation lines should be indented +4 columns. You might want to look in eclipse/README.txt to setup eclipse so formatting/etc matches our style guide. I will do my best, but I use IntelliJ rather than eclipse. Is there a way of me testing the formatting by a command-line that understands the eclipse formatting? http://gwt-code-reviews.appspot.com/1273801/diff/1/33 File user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamWriter.java (right): http://gwt-code-reviews.appspot.com/1273801/diff/1/33#newcode288 user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamWriter.java:288: private static class CustomFieldSerializerHandle { On 2011/01/10 20:12:52, jat wrote: What is the benefit of having this class over just storing a CustomFieldSerializer?, since it only holds a CFS instance and it must be initialized at creation? This allows a single map lookup to determine if a class extends the CustomFieldSerializer class. If the map just had null values, there would have to be a following .contains() call. http://gwt-code-reviews.appspot.com/1273801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move the TCK report task to user/build.xml and (issue1288801)
http://gwt-code-reviews.appspot.com/1288801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors