Re: Best pattern for client/server communication?
I don't have a boilerplate pattern available as I'm still experimenting myself. There seems to be two schools of thought: 1/ Try and reuse classes on both server and client sides which means exporting server logic to clients and vice versa 2/ Separating client and server logic and evolving the two separately At first I tried to do the former but I didn't like it: it's just not clean IMHO. What I'm trying to do now is focus on the service interface offered by the server to the client. Using Google App Engine helps this discipline. I define the service interface in terms of actions: 'Create new user', 'Transfer X from account x to account y', 'Get Employee details'. I'm at the frustrating phase that there's a lot of similar objects on both sides of the fence. But, over time, I'm seeing these diverge and evolve differently solving their own use cases without the restraint of trying to maintain a one-size-fits-all approach. In many of my core server-side and persistent objects: Employee, Account, etc., I have/had a method: EmployeeVo Employee.toVo(): i.e. to value object (as opposed to toString()). But, as my use cases become more refined I find that things evolve to having a Person object with toUserVo(), toEmployee() and toCustomerVo() methods that create client side objects that are shipped out to log in, update employee details or have a customer select a shipping address. I love these types of problems - that's what makes programming so much fun. --~--~-~--~~~---~--~~ 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 + OpenID - experiences?
I haven't really read the whole thread, but maybe check out the following: http://code.google.com/p/dyuproject/ http://dyuproject.appspot.com/popup_login.html Looks like it should be useable with gwt. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
No source code is available for type java.util.Locale
Hi All, While using java.util.Localle package i am getting the following error.No source code is available for type java.util.Locale.Is it possible to add add java.util.Calendar in my module. Thnks and Regards, Subash --~--~-~--~~~---~--~~ 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: No source code is available for type java.util.Locale
Hi, You can't add java.util.Calendar to your project because GWT doesn't implement it : see JRE Emulation Reference to know which classes are implemented : http://code.google.com/intl/fr-FR/webtoolkit/doc/1.6/RefJreEmulation.html#Package_java_util Regards, 2009/7/3 subbu subashkaruval...@gmail.com Hi All, While using java.util.Localle package i am getting the following error.No source code is available for type java.util.Locale.Is it possible to add add java.util.Calendar in my module. Thnks and Regards, Subash -- Damien Picard Open Source BPM : http://code.google.com/p/osbpm --~--~-~--~~~---~--~~ 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: use java.sql.Blob with GWT
Hi, Actually I use Blob in server side...and use RPC to call and get back message. The problem is when i compile the whole project which includes client and server sides, it gives me this error: No source code is available for type *java.sql.Blob*; did you forget to inherit a required module? Actually, I dont know if i have to put some property of Blob in hibernate config xml file or not...or I need to add something in plus in GWT Module file. Please give me some advice. Thank you netty 2009/7/2 Lothar Kimmeringer j...@kimmeringer.de Vatcharaphun Rajsiri schrieb: I'd like to store a XML file in database. So, I use java.sql.Blob class. When I compile I get the following error: No source code is available for type *java.sql.Blob*; did you forget to inherit a required module? I have no idea what should I have to do, please help me. Write a servlet that gets called by the GWT client application (e.g. by using the GWT RPC mechanism). On the server-side you have full access to the whole world of Java and its frameworks, including java.sql.* Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: opacity filter in ie6
After wasting way too much time on this I finally found a solution ... The background is that I have a DIV with 66% opacity. This div is absolute positioned inside a div, which is inside a table cell: td div style='width:100%;height:1200px;' div style='filter:alpha(opacity=66);position:absolute;top . /div /td For this very specific layout scenario in IE6/7 the alpha filter only works if the table has the following style attribute: table- layout:fixed; I have absolutely no clue why this makes a difference, but it seems to resolve this very strange IE quirk. Maybe this tip will save someone from wasting about 12 hours of their life like I did :) On Jul 1, 3:31 pm, bradr brad.rydzew...@gmail.com wrote: thanks Joe for the tip, i tried adding zoom:1 to almost every element but still no luck. I have pinpointed that the page initially renders correctly in IE6 with opacity by inserting a break point. I can see that all the items get placed on the screen and have 66% opacity. So now I just need to figure out what is happening after the break point that is preventing opacity from working... maybe some code is executing and changes the items haslayout = false as you have suggested... As far as the library, thanks for the compliment. I would expect version 1.0 of the library to be released under LGPL as I have no intentions to sell it. At the moment it is GPL because it is a major feature in a commercial product i'm building and I would hate to see it in a competing product *before* I get to market... On Jul 1, 7:16 am, Joe Cole profilercorporat...@gmail.com wrote: Firstly, wow that looks amazing! Great work! I've run into this before and this solved it for me:http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-i... Are you planning on selling this as a component? Just wondering as I saw it was gpl. Joe On Jul 1, 6:21 pm, bradr brad.rydzew...@gmail.com wrote: I have a calendar component that I am building: souce @http://code.google.com/p/gwt-cal demo @http://google.latest.gwt-web-calendar.appspot.com/ I am having problems with opacity and ie6, using the filter:alpha (opacity=x). If you view the above demo in IE6 you will see that opacity is not working. I used the IE developer toolbar and I see the filter property is set but not being applied. I then exported the entire DOM + style to a new html file and opened the file in IE6 and the opacity worked... very strange. Just doesn't seem to want to work in my gwt example... Wondering if the community has any suggestions (other than just ignore IE6... trust me I would if I could) --~--~-~--~~~---~--~~ 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: use java.sql.Blob with GWT
Vatcharaphun Rajsiri schrieb: Actually I use Blob in server side...and use RPC to call and get back message. The problem is when i compile the whole project which includes client and server sides, it gives me this error: No source code is available for type *java.sql.Blob*; did you forget to inherit a required module? Actually, I dont know if i have to put some property of Blob in hibernate config xml file or not...or I need to add something in plus in GWT Module file. It seems that java.sql.Blob is used somewhere in the client-classes (the compiler should tell you which class is affected). Already an unused import is enough in that case. Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Searching for a plugin mechanism
eibaan wrote: Is there a way to load GWT compiled modules dynamically on runtime? We cannot recompile the editor for each extension. Can we provide meta data with the plugin so that the editor knows that it should add a tool button to the tool bar, then load and initialize the plugin and call a method if that button is pressed. On initialization, the plugin should register a new editor or viewer, then access the current selection and the editor's object model to get and create content objects. Take a look at this: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting and in particular, read the comments section. It seems that GWT may never do what you ask. You may be able to work around it by getting separately compiled apps to communicate. Paul --~--~-~--~~~---~--~~ 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 with sorting accentuated words
Hi ! Thanks for your help. However i have found another solution, make a new Comparator and applicate it on the store of the Grid. Something like : myGrid.setStoreSorter(new myComaprator()); Bye ! --~--~-~--~~~---~--~~ 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: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
Actually, libA.jar, libB.jar and dom4j-1.6.1.jar are already in the build path. For now, I go back to GWT 1.5... On 2 juil, 18:22, Fred Sauer fre...@gmail.com wrote: If you're in Eclipse, you might need to right-click on the jar files in WEB-INF/lib and select 'Build Path - Add ...' (I believe you need the Package Explorer rather than the Project Explorer view for the right-click to work though) Fred On Fri, Jun 26, 2009 at 2:27 AM, Miles T. dupont.nico...@gmail.com wrote: This is server side. I guess it has something to do with class loaders, but I don't know what to do. On 19 juin, 15:43, Paul Robinson ukcue...@gmail.com wrote: If this is server side, could this be something to do with DocumentFactory being loaded by two different class loaders? Miles T. wrote: Hi, I am trying to upgrade my GWT 1.5 webapp to 1.6. When I launch the webapp in hosted mode, I get the following error : org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory :-s My webapp depends on a library A which depends on a library B which depends on dom4j 1.6.1 In my war/WEB-INF/lib directory, I see only one dom4j jar (1.6.1). Any idea ? Cheers -- Fred Sauer f...@allen-sauer.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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: how to return a Date object from JSNI function?
On 3 juil, 01:16, rxin reyno...@gmail.com wrote: I have a JSNI function that returns a JavaScript Date object. I want to return as a Java Date class, but keeps getting ClassCastException. How exactly should I change my code? return the date's timestamp as a double and then create a Java Date from it. public Date getVisibleChartStartDate(JavaScriptObject jso) { return new Date((long) getVisibleChartStartDateImpl(jso)); } private native double getVisibleChartStartDate(JavaScriptObject jso) / *-{ return jso.getVisibleChartRange().start.getTime(); }-*/; --~--~-~--~~~---~--~~ 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: dom manipulation works in IE but not in FF
Hi, I've checked this and it seems to work fine (as expected) in web mode (IE7, Chrome, FF 3.0.11/3.5) but it breaks in hosted mode on linux/firefox with the following exception [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): this.removeChild is not a function fileName: jar:file:/home/wlodek/gwt/trunk/build/staging/gwt- linux-0.0.0/gwt-user.jar!/com/google/gwt/dom/client/Node.java lineNumber: 285 stack: ([object HTMLFormElement])@jar:file:/home/wlodek/gwt/trunk/build/staging/gwt- linux-0.0.0/gwt-user.jar!/com/google/gwt/dom/client/Node.java:285 static void com.google.gwt.user.client.DOM.dispatchEvent (com.google.gwt.user.client.Event,com.google.gwt.user.client.Element,com.google.gwt.user.client.EventListener) ([object Event],[object HTMLButtonElement],[object gwt_nativewrapper_class])@:0 ([object Event])@jar:file:/home/wlodek/gwt/trunk/build/staging/gwt- linux-0.0.0/gwt-user.jar!/com/google/gwt/user/client/impl/ DOMImplStandard.java:169 @:0 at com.google.gwt.dom.client.Node$.removeChild$(Native Method) at pl.waf.test.client.Form.removeForm(Form.java:59) at pl.waf.test.client.Form.access$0(Form.java:50) at pl.waf.test.client.Form$1.onClick(Form.java:44) at com.google.gwt.event.dom.client.ClickEvent.dispatch (ClickEvent.java:54) at com.google.gwt.event.dom.client.ClickEvent.dispatch (ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager $HandlerRegistry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager $HandlerRegistry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEvent (HandlerManager.java:178) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java: 52) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent (DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent (Widget.java:90) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java: 1320) at com.google.gwt.user.client.DOM.dispatchEventAndCatch (DOM.java:1299) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262) -- waf --~--~-~--~~~---~--~~ 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: Best practice to implement Command Pattern RPC on server?
Hey ClusterCougar, I think your implementation is over-complicated. On the client side, just stick to two basic interfaces (and concrete implementations there- of) - Action and Result (I'm using 'Result' rather than 'Response' because that is often used in HTTP-related APIs), or in your API, IProcedure and IReturn. The IAttributes, IRemoteProcedure and other interfaces are unnecessary. Then, on the server side, I've got 'ActionHandler' classes, which look something like this: public interface ActionHandlerA extends ActionR, R extends Result { public ClassA getActionType(); public R execute( A action ) throws Exception; } You then register your various ActionHandler instances with your 'RPCService' and it just matches up the action passed in with the appropriate action handler, calls execute and you're off to the races. Sorry about the incomplete example - the code itself is tied up in the app I'm using this in at the moment. I hope to make it a bit more general down the track. David On Jun 30, 8:05 pm, ClusterCougar nwwe...@gmail.com wrote: I thought I posted this last night, but I don't see it. Apologies if this is a dupe. I've tried to implement the command pattern using generics, but have some hangups. You can see my code at http://code.google.com/p/gwt-command-pattern/ Hangups: 1) Too many parameters. It's just not pretty 2) I have to parameterize the RPCServiceAsync at the class level, whereas I would like to parameterize at the method level. This is a constraint of the compiler. 3) All my server-side code actually resides on the client side, because of the aggressive nature of the GWT compiler. I would add my voice again asking for a simple annotation or annotations like on a class: @GWTIgnoreReference(ServerSideClass.class) and/or a method: @GWTIgnoreMethod I think there are many justifiable use cases for this type of thing, and I can't think of any way it would decrease user experience. Does anyone know if this is a planned feature? Any comments/suggestions on how to remediate the problems above that I don't know of? Ray Ryan, are you listening? Thanks, On Jun 25, 4:07 pm, Eric erjab...@gmail.com wrote: On Jun 25, 5:12 pm, Herme Garcia hgar...@peoplecall.com wrote: Hi, After listening carefully Google IO's session from Ray Ryan about Best PracticesFor Architecting Your GWT App : http://code.google.com/intl/es-ES/events/io/sessions/GoogleWebToolkit... He suggests acommandpatternimplementation for RPC calling (see slides 21-25) they are using in Wave. Ray, If you're reading this, can you tell us if the full code for your contact manager is available anywhere? Also, the second of the Contact DIsplay UI slides has the line currentContactId = currentContactId; --~--~-~--~~~---~--~~ 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 2 Theme
Hi, I think that currently a lot of people are looking at GWT to use it for business apps inside big corporations. Google and GWT is sometimes more focussing on getting GWT to drive websites and in those situations custom skinning is really important. It's nice that you can but I would really like to skip CSS and just use the widgets with a nice an shiny default look and feel. What would be even better is that they would put a site online that offers multiple skins (as they do for iGoogle for example). Who knows for fun we might get some animated skins as well :-) David On Thu, Jul 2, 2009 at 1:28 PM, Kango_Vdjb.b...@gmail.com wrote: Is it possible to use the Google Wave theme as the standard for GWT 2? I know it may need paring down slight, but that would still be cool. There are a lot of programmers that would like to suggest GWT to management, but do not like the default. I'm sure if this was done, far more developers would pick it up and use it out of the box without needing a designer. Thoughts anyone? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Include CSS in XML or HTML affects the output?
Hi I want to customize the color and font size of the StackPanel item, so I defined the following style: .mymenu .gwt-StackPanelItem { color: blue; font-size: small; } Then I add the above style and keep the rest of the standard CSS properties: StackPanel panel = new StackPanel(); panel.addStyleName(mymenu); The problem is this only works if I include the CSS in the module XML file. If I include the CSS in the HTML host page, the style is overridden by standard.css. Both methods above generate the same HTML shown below: table class=gwt-StackPanel mymenu cellspacing=0 cellpadding=0 style=width: 20%; height: 100%; tbody tr td class=gwt-StackPanelItem gwt-StackPanelItem-first gwt-StackPanelItem-selected height=1 divAdministration/div /td /tr ... /table Do you know why including the CSS in the module XML or HTML host page affects the output? -- Hez --~--~-~--~~~---~--~~ 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 + OpenID - experiences?
but seem to me the dyuproject community is still new compared to openid4j i know how to use the servlet already. i able to login using yahoo openid and myopenid.com , but cannot for google i enter url like below http://localhost:/openid?app-openid-auth=trueapp-openid-name=u...@gmail.com and get exception 0xa00: Authentication cannot continue: no discovery information provided. anyone else get this error? --~--~-~--~~~---~--~~ 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: dom manipulation works in IE but not in FF
it fails for both of the form nodes in this doc. will you mind try it out in FF like you did before? you get two #text nodes when you do formelement.getChildNodes(), where the right answer is one table element. TABLE border=0 cellpadding=0 cellspacing=0 height=100% width=100% TBODY TR TD align=left cellpadding=0 cellspacing=0 valign=top width=600 LINK href=stylesheet.css rel=stylesheet / !-- SCRIPT language=javascript src=checkjs.js/-- BR/ table tr td FORM id=TopSalesSearchForm TABLE align=center border=0 cellpadding=0 cellspacing=0 width=98% TBODY TR TD width=40 IMG height=35 src=images/searchprefix.gif width=36 / /TD TD background=images/searchbg.gif class=font3 width=100% sales number:INPUT class=unnamed1 name=searchName /INPUT class=button name=search onclick=submitMe('search');return false; type=submit value=Submit Query / /TD /TR /TBODY /TABLE /FORM / td /tr tr td FORM id=EditSalesForm TABLE align=center border=0 cellpadding=4 cellspacing=1 class=t2 width=98% TBODY TR class=t3 height=27 TD width=30 Seq Number /TD TD align=middle width=40 Serial Number /TD TD align=middle width=130 Created On /TD TD align=middle width=130 Client /TD TD align=middle width=200 Created By /TD TD align=middle width=50 Spec /TD TD align=middle width=50 Total Units /TD TD align=middle width=100 Apparent Total /TD TD align=middle width=100 Grand Total /TD /TR TR class=t4 height=27 TD align=middle width=30 1 /TD TD align=middle width=40 A href=SaleItemView.doNP98787/A /TD TD align=middle width=130 Nicole Kidman /TD TD align=middle width=130 04-09-2008 /TD TD width=200 Good /TD TD align=middle width=50 65 /TD TD align=right width=50 $89.00 /TD TD align=right width=100 $4,800.00 /TD TD align=right width=100 $9,000.00 /TD /TR TR class=t1 height=27 TD align=middle width=30 2 /TD TD align=middle width=40 A href=SaleItemView.doHY90s/A /TD TD align=middle width=130 Woody Allen /TD TD align=middle width=130 3-23-2009 /TD TD width=200 Great /TD TD align=middle width=50 87 /TD TD align=right width=50 $29.00 /TD TD align=right width=100 $1,300.00 /TD TD align=right width=100 $4,030.00 /TD /TR TR class=t4 height=27 TD align=middle width=30 3 /TD TD align=middle width=40 A href=SaleItemView.doLO98d/A /TD TD align=middle width=130 Russell Crow /TD TD align=middle width=130 1-21-2004 /TD TD width=200 Nice /TD TD align=middle width=50 76 /TD TD align=right width=50 $32.00 /TD TD align=right width=100 $3,100.00 /TD TD align=right width=100 $6,120.00 /TD /TR /TBODY /TABLE /FORM / td /tr /table /TD /TR /TBODY /TABLE --~--~-~--~~~---~--~~ 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: dom manipulation works in IE but not in FF
For me it looks like you are not creating this form using GWT, because if you did and because FormPanel is a SimplePanel you will end up with a single panel/table inside Form without any text nodes. That's the way it looks like in my example. But if you are creating this form some other way I would say it is normal that you will have extra text nodes, because any whitespace will result in a text node. As far as I know you shouldn't have those text nodes if form/table opening and closing tags are written like this form ...table ... ... /table/form -- waf --~--~-~--~~~---~--~~ 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: Include CSS in XML or HTML affects the output?
On 3 juil, 17:58, hezjing hezj...@gmail.com wrote: Hi I want to customize the color and font size of the StackPanel item, so I defined the following style: .mymenu .gwt-StackPanelItem { color: blue; font-size: small; } Then I add the above style and keep the rest of the standard CSS properties: StackPanel panel = new StackPanel(); panel.addStyleName(mymenu); The problem is this only works if I include the CSS in the module XML file. If I include the CSS in the HTML host page, the style is overridden by standard.css. [...] Do you know why including the CSS in the module XML or HTML host page affects the output? The stylesheets in the module.gwt.xml are injected at the end of the document's head once the document's body is fully loaded, so they always come *after* the stylesheets found in the HTML, and therefore override their declarations. --~--~-~--~~~---~--~~ 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: Best practice to implement Command Pattern RPC on server?
There are a couple of ways to go about it, and I'm not 100% happy with my current solution as a 'best practice'. It's a bit convoluted, really. Current I'm using Guice on the server-side, so I bind them to 'ActionHandler.class', and then a post-config step pulls all ActionHandler bindings and registers them to my ActionHandlerRegistry. Binding code: binder.bind( ActionHandler.class ).annotatedWith( Names.named ( type.getName() ) ).to( type ).in( Singleton.class ); Linking code: ListBindingActionHandler bindings = injector .findBindingsByType( TypeLiteral.get ( ActionHandler.class ) ); for ( BindingActionHandler binding : bindings ) { actionHandlerRegistry.addHandler( binding.getProvider().get() ); } A simpler way would be to have an eager singleton which is provided the actionHandlerRegistry via injection and just adds whatever handlers you want to it. David On Jul 4, 8:06 am, ClusterCougar nwwe...@gmail.com wrote: Thanks David. That looks like a much better solution. The only reason I did all those generics was because I was still trying to wrap my head around the problem. Based on this, I've come up with some ideas I'm going to try to implement. How do you register your ActionHandlers? On Jul 3, 8:55 am, David Peterson da...@randombits.org wrote: Hey ClusterCougar, I think your implementation is over-complicated. On the client side, just stick to two basic interfaces (and concrete implementations there- of) - Action and Result (I'm using 'Result' rather than 'Response' because that is often used in HTTP-related APIs), or in your API, IProcedure and IReturn. The IAttributes, IRemoteProcedure and other interfaces are unnecessary. Then, on the server side, I've got 'ActionHandler' classes, which look something like this: public interface ActionHandlerA extends ActionR, R extends Result { public ClassA getActionType(); public R execute( A action ) throws Exception; } You then register your various ActionHandler instances with your 'RPCService' and it just matches up the action passed in with the appropriate action handler, calls execute and you're off to the races. Sorry about the incomplete example - the code itself is tied up in the app I'm using this in at the moment. I hope to make it a bit more general down the track. David On Jun 30, 8:05 pm, ClusterCougar nwwe...@gmail.com wrote: I thought I posted this last night, but I don't see it. Apologies if this is a dupe. I've tried to implement thecommandpatternusing generics, but have some hangups. You can see my code at http://code.google.com/p/gwt-command-pattern/ Hangups: 1) Too many parameters. It's just not pretty 2) I have to parameterize the RPCServiceAsync at the class level, whereas I would like to parameterize at the method level. This is a constraint of the compiler. 3) All my server-side code actually resides on the client side, because of the aggressive nature of the GWT compiler. I would add my voice again asking for a simple annotation or annotations like on a class: @GWTIgnoreReference(ServerSideClass.class) and/or a method: @GWTIgnoreMethod I think there are many justifiable use cases for this type of thing, and I can't think of any way it would decrease user experience. Does anyone know if this is a planned feature? Any comments/suggestions on how to remediate the problems above that I don't know of? Ray Ryan, are you listening? Thanks, On Jun 25, 4:07 pm, Eric erjab...@gmail.com wrote: On Jun 25, 5:12 pm, Herme Garcia hgar...@peoplecall.com wrote: Hi, After listening carefully Google IO's session from Ray Ryan about Best PracticesFor Architecting Your GWT App : http://code.google.com/intl/es-ES/events/io/sessions/GoogleWebToolkit... He suggests acommandpatternimplementation for RPC calling (see slides 21-25) they are using in Wave. Ray, If you're reading this, can you tell us if the full code for your contact manager is available anywhere? Also, the second of the Contact DIsplay UI slides has the line currentContactId = currentContactId; --~--~-~--~~~---~--~~ 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: Best practice to implement Command Pattern RPC on server?
Just a couple of other comments on this general topic. 1. Yes, it's one-class-per RPC method. This is actually a good thing, since it lets you do item 2, which is: 2. You can add 'undo' to your actions. This is particularly handy if you build your Action classes using item 3: 3. You can have one action which executes multiple other items. This means you're using the command pattern on the server side too, not just from the client side. When you add them all together, most of your actual functionality is encapsulated in command/action classes. I use the same service implementation on the server side as the client side, so there is really just one shared service now (I call it 'Dispatch') rather than having various services for different application functions. But for me, the biggest win is 'undo' - it's essentially like having transactions for Java code, not just database code. Not quite as bullet-proof, since some actions can't actually be undone, but a big step in that direction. I will see if I can get the code abstracted enough from my app to post it publicly. David --~--~-~--~~~---~--~~ 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: Best pattern for client/server communication?
I typically share as much as possible. If it has to be different then subclass for the server-side only stuff and don't compile the subclass on the client. On Jul 3, 2:34 am, Kwhit kwhitting...@gmail.com wrote: I don't have a boilerplate pattern available as I'm still experimenting myself. There seems to be two schools of thought: 1/ Try and reuse classes on both server and client sides which means exporting server logic to clients and vice versa 2/ Separating client and server logic and evolving the two separately At first I tried to do the former but I didn't like it: it's just not clean IMHO. What I'm trying to do now is focus on the service interface offered by the server to the client. Using Google App Engine helps this discipline. I define the service interface in terms of actions: 'Create new user', 'Transfer X from account x to account y', 'Get Employee details'. I'm at the frustrating phase that there's a lot of similar objects on both sides of the fence. But, over time, I'm seeing these diverge and evolve differently solving their own use cases without the restraint of trying to maintain a one-size-fits-all approach. In many of my core server-side and persistent objects: Employee, Account, etc., I have/had a method: EmployeeVo Employee.toVo(): i.e. to value object (as opposed to toString()). But, as my use cases become more refined I find that things evolve to having a Person object with toUserVo(), toEmployee() and toCustomerVo() methods that create client side objects that are shipped out to log in, update employee details or have a customer select a shipping address. I love these types of problems - that's what makes programming so much fun. --~--~-~--~~~---~--~~ 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: New site created with GWT
Wow, the text boxes are ginormous in FF 3.5. On Jun 30, 4:34 pm, Michael W mwang_2...@yahoo.com wrote: I am happy to announce that we launched beta version of holidayinn website written with GWT this past weekend. The new sitehttp://www.holidayinn.com/hotels/us/en/reservationwill replace existing sitehttp://www.ichotelsgroup.com/h/d/hi/1/en/homein the future. The existing site has over 2 million hit a day. GWT is used in client side and Spring MVC is applied in server side Following lists some of the features including the package we used: --Multi-language (currently only support US English and Queen English) --Spring SL --JSON. --RPC.encodeResponseForSuccess --Suggest Box --Client side logging --Customized SEO --RPC timed out --Session backup, once refresh page, client side data is retrieved from server again by using RPC --Visual effect to display hotel images --Integrated dynamic content management --~--~-~--~~~---~--~~ 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: RootPanel.get(aaa) in Junit test throws NPE
I have the same problem. No solution/work around that I know of. On Jun 26, 12:45 pm, Владимир Петрухин mylonglongn...@gmail.com wrote: I generate a simple project with maven gwt plugin: mvn archetype:generate \ -DarchetypeGroupId=org.codehaus.mojo \ -DarchetypeArtifactId=gwt-maven-plugin \ -DarchetypeVersion=1.1 \ -DgroupId=myGroupId \ -DartifactId=myArtifactId In GwtTestSample I change: public void testSomething() { final Label label = new Label ( gwt-maven-plugin Archetype :: Project myGroupId.myArtifactId ); RootPanel.get(aaa).add( label ); } And in Application.html i add div id=aaa/div All works ok, but in JUnit test (mvn gwt:test) RootPanel.get(aaa) throws java.lang.NullPointerException [INFO] at myGroupId.client.GwtTestSample.testSomething (GwtTestSample.java:23) [INFO] at myGroupId.client.__GwtTestSample_unitTestImpl.doRunTest (transient source for myGroupId.client.__GwtTestSample_unitTestImpl:7) [INFO] at junit.framework.TestCase.runTest(TestCase.java:62) [INFO] at com.google.gwt.junit.client.GWTTestCase.runBare (GWTTestCase.java:206) [INFO] at com.google.gwt.junit.client.GWTTestCase.__doRunTest (GWTTestCase.java:137) [INFO] at com.google.gwt.junit.client.impl.GWTRunner.runTest (GWTRunner.java:188) [INFO] at com.google.gwt.junit.client.impl.GWTRunner.doRunTest (GWTRunner.java:163) [INFO] at com.google.gwt.junit.client.impl.GWTRunner.access$3 (GWTRunner.java:157) [INFO] at com.google.gwt.junit.client.impl.GWTRunner $JUnitHostListener.onSuccess(GWTRunner.java:61) [INFO] at com.google.gwt.junit.client.impl.GWTRunner $JUnitHostListener.onSuccess(GWTRunner.java:1) [INFO] at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived (RequestCallbackAdapter.java:215) [INFO] at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl (Request.java:264) [INFO] at com.google.gwt.http.client.Request.fireOnResponseReceived (Request.java:229) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) [INFO] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] at com.google.gwt.dev.shell.MethodAdaptor.invoke (MethodAdaptor.java:103) [INFO] at com.google.gwt.dev.shell.moz.MethodDispatch.invoke (MethodDispatch.java:80) [INFO] at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration (Native Method) [INFO] at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration (OS.java:1428) [INFO] at org.eclipse.swt.widgets.Display.readAndDispatch (Display.java:2840) [INFO] at com.google.gwt.dev.SwtHostedModeBase.processEvents (SwtHostedModeBase.java:235) [INFO] at com.google.gwt.dev.HostedModeBase.pumpEventLoop (HostedModeBase.java:558) [INFO] at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 652) [INFO] at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java: 346) [INFO] at com.google.gwt.junit.client.GWTTestCase.runTest (GWTTestCase.java:219) [INFO] at junit.framework.TestCase.runBare(TestCase.java:134) [INFO] at junit.framework.TestResult$1.protect(TestResult.java:110) [INFO] at junit.framework.TestResult.runProtected(TestResult.java: 128) [INFO] at junit.framework.TestResult.run(TestResult.java:113) [INFO] at junit.framework.TestCase.run(TestCase.java:124) [INFO] at com.google.gwt.junit.client.GWTTestCase.run (GWTTestCase.java:132) [INFO] at junit.framework.TestSuite.runTest(TestSuite.java:232) [INFO] at junit.framework.TestSuite.run(TestSuite.java:227) [INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun (MavenTestRunner.java:105) [INFO] at junit.textui.TestRunner.start(TestRunner.java:180) [INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.main (MavenTestRunner.java:63) Help. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
error calling date class in entrypoint class
Hi, In my application I added as a method in the EntryPoint class, say for example convertToDateFormat(String date) method. So I got the following error. 1.ParseException cannot be resolved to a type 2.import java.text.cannot be resolved a type. 3SimpleDateFormat cannot be resolved to a type . etc. thanks bhanu --~--~-~--~~~---~--~~ 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] Comment on CodeSplitting in google-web-toolkit
Comment by m.zdila: @br: We can compile together the client code for all the current modules, but it would not be very OSGi conforming. For example, imagine that some client bought our product including only some of the modules. It would not be very clean to include client code for all the existing modules as one monolithic build. Even if we gave him only the client code for the bundles he bought, then if he would buy additional bundle(s) and dynamically install it to the running system, there would be no chance to add the additional client side part to the existing monolithic build. Simply, each server-side user bundle should have its client module counterpart so they can be dynamically added/removed without recompiling (all) the client. Currently, as described in my first post, the shared workspace code gets duplicated. And exactly this is what makes traversing between modules slow - the JS code must be dowloaded every time (if not cached), parsed, and the workspace initialization code must be run. This way the monolithic build give us the opposite of the desired speed improvement. I admin that I don't know much about the optimization internals. Despite of that I dare to imagine that (in a near future) it would be possible the common workspace module to be separated from the view modules. The optimization can stay within the single module (build). The interface between workspace and view is governed by the Java interfaces (or maybe even the classes) and so the compiler can take it to the accound when optimizing. I personally would rather have this functionality even if the code would not be as much optimal as possible ;-). In any case, currently we can live just OK with our current solution. Good luck! For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on CodeSplitting in google-web-toolkit
Comment by cromwellian: The problem is, if you support separate compilation, the compiler can no longer make assumptions about which methods in your code base are 'live' (are going to be called) and which are 'dead' (are never called), it would be forced to include them on the chance that they might be called in the future by some third party module. This would massively bloat the size of the JS output as well as hamper other optimizations like inlining which depend on knowing things like that if an interface I is implemented by classes A and B, and B is never used, than I == A. This comes up frequently with say, List/ArrayList/LinkedList where LinkedList is rarely if ever used. In my opinion, what you really want is some kind of message bus or RPC mechanism, so that differently compiled packages can communicate over some interface. In this case, the amount of shared code that must be replicated can be kept to a minimum. For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on CodeSplitting in google-web-toolkit
Comment by m.zdila: cromwellian: I don't understand how could the RPC solve my problem. Maybe what I would like to have is currently very complicated in the GWT. I am accepting it and can live with that. Long time ago I was using DOJO and I was dynamically loading the views to the workspace. I know it has nothing to do with the GWT, I only want to tell you that some other frameworks can do it. (Un)fortunately I wouldn't use any JS-only framework even if it had such an feature :-). Anyway it would be great if GWT had some means to do the true dynamic code loading. It doesn't have to be necessairly transparent for the developer. I wouldn't mind to somehow explicitly mark some code interface points or something... For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on CodeSplitting in google-web-toolkit
Comment by hauke.kopf: We are also searching for solution to dynamically extend the GUI produced via GWT. Regarding Cromwellian's comment about the compiler optimizations and the static analysis of what code parts are live or dead, I would say that what we want is something like JARs for GWT. Have the base GWT application compiled as one or more JAR-like packages, develop you extensions/plugins against the main application's API and package them as JAR-like files. At runtime of course you as the application owner must make sure that all required JARs/bundles are present. But hey, that's exactly what people know from JAVA apps. If you miss a JAR file you will get a ClassNotFoundException. For more information: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Reduction of JavaScript class declarations.
Makes sense. I remember thinking along the same lines as Andrés, but getting rid of the empty ctor functions ( http://code.google.com/p/google-web-toolkit/wiki/ClassSetupAndInstantiationOptimization) will probably obviate it, as few if any classes have truly empty ctors. On Thu, Jul 2, 2009 at 7:09 PM, Scott Blum sco...@google.com wrote: Of course, if we go with the idea of hoisting Java constructors into the JavaScript constructor, that stops working. Speaking of which, we don't have to limit it to just classes with one live constructor... two different JS constructors can share the same prototype object. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5664 - Allows CSS @def declarations to be retrieved as a String in a CssResource
Author: zun...@google.com Date: Fri Jul 3 08:33:45 2009 New Revision: 5664 Modified: trunk/user/src/com/google/gwt/resources/client/CssResource.java trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java trunk/user/test/com/google/gwt/resources/client/deftest.css Log: Allows CSS @def declarations to be retrieved as a String in a CssResource implementation. Detection was added for colliding class names and @def names, but you can dis-ambiguate them with the @ClassName() annotation. Patch by: zundel Review by: bobv Modified: trunk/user/src/com/google/gwt/resources/client/CssResource.java == --- trunk/user/src/com/google/gwt/resources/client/CssResource.java (original) +++ trunk/user/src/com/google/gwt/resources/client/CssResource.java Fri Jul 3 08:33:45 2009 @@ -32,9 +32,10 @@ * li{...@code String someClassName();} will allow the css class * code.someClassName/code to be obfuscated at runtime. The function will * return the obfuscated class name./li - * li{...@code primitive numeric type someDefName();} will allow access to the - * values defined by {...@literal @def} rules within the CSS file. The defined - * value must be a raw number, a CSS length, or a percentage value. + * li{...@code primitive numeric type or String someDefName();} will allow + * access to the values defined by {...@literal @def} rules within the CSS file. + * The defined value must be a raw number, a CSS length, or a percentage value + * if it is to be returned as a numeric type. * /ul * * p Modified: trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java == --- trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java (original) +++ trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java Fri Jul 3 08:33:45 2009 @@ -115,6 +115,7 @@ */ private final MapString, MapJMethod, String classReplacementsWithPrefix; private final Pattern classSelectorPattern = Pattern.compile(\\.([^ :+#.]*)); +private final SetString cssDefs = new HashSetString(); private final SetString externalClasses; private final TreeLogger logger; private final SetJMethod missingClasses; @@ -137,6 +138,11 @@ } @Override +public void endVisit(CssDef x, Context ctx) { + cssDefs.add(x.getKey()); +} + +@Override public void endVisit(CssSelector x, Context ctx) { String sel = x.getSelector(); @@ -193,6 +199,19 @@ @Override public void endVisit(CssStylesheet x, Context ctx) { boolean stop = false; + + // Skip names corresponding to @def entries. They too can be declared as + // String accessors. + ListJMethod toRemove = new ArrayListJMethod(); + for (JMethod method : missingClasses) { +if (cssDefs.contains(method.getName())) { + toRemove.add(method); +} + } + for (JMethod method : toRemove) { +missingClasses.remove(method); + } + if (!missingClasses.isEmpty()) { stop = true; TreeLogger errorLogger = logger.branch(TreeLogger.INFO, @@ -231,6 +250,15 @@ } } + static class DefsCollector extends CssVisitor { +private final SetString defs = new HashSetString(); + +@Override +public void endVisit(CssDef x, Context ctx) { + defs.add(x.getKey()); +} + } + /** * Collects all {...@code @external} declarations in the stylesheet. */ @@ -1212,8 +1240,8 @@ private boolean prettyOutput; private MapJClassType, MapJMethod, String replacementsByClassAndMethod; private MapJMethod, String replacementsForSharedMethods; - private MapJMethod, CssStylesheet stylesheetMap; private JClassType stringType; + private MapJMethod, CssStylesheet stylesheetMap; @Override public String createAssignment(TreeLogger logger, ResourceContext context, @@ -1701,34 +1729,39 @@ NumberValue numberValue = def.getValues().get(0).isNumberValue(); -if (numberValue == null) { - logger.log(TreeLogger.ERROR, The define named + name - + does not define a numeric value); - throw new UnableToCompleteException(); +String returnExpr = ; +JClassType classReturnType = toImplement.getReturnType().isClass(); +if (classReturnType != null + java.lang.String.equals(classReturnType.getQualifiedSourceName())) { + returnExpr = \ + Generator.escape(def.getValues().get(0).toString()) + + \; +} else { + JPrimitiveType returnType = toImplement.getReturnType().isPrimitive(); + if (returnType == null) { +logger.log(TreeLogger.ERROR, toImplement.getName() ++ : Return type must be primitive type or String for
[gwt-contrib] [google-web-toolkit commit] r5665 - Edited wiki page through web user interface.
Author: galgwt.reviews Date: Fri Jul 3 08:45:52 2009 New Revision: 5665 Modified: wiki/CssResource.wiki Log: Edited wiki page through web user interface. Modified: wiki/CssResource.wiki == --- wiki/CssResource.wiki (original) +++ wiki/CssResource.wiki Fri Jul 3 08:45:52 2009 @@ -64,6 +64,31 @@ } }}} * Calling `small()` would return the value `1`. + * `...@def` rules can be accessed as a String as well. You can retrieve the two definitions above with: +{{{ +interface MyResources extends CssResource { + String small(); + String black(); +} +}}} +* Calling `small()` returns 1px +* Calling `black()` returns #000 + * The Generator will not allow you to declare an `...@def` rule with the same name as a class, unless you annotate method to retrieve the class with the `...@classname` annotation. +{{{ +...@def myIdent 10px; +.myIdent { + ... +} + +interface MyResources extends CssResource { + String myIdent(); + + @ClassName(myIdent) + String myIdentClass(); +} +}}} +* Calling `myIdent()` returns @def value 10px +* Calling `myIdentClass()` returns the obfuscated class name for .myIdent == Runtime substitution == (*Working*) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Add ArtificialRescue annotation to compiler
Ignore patch set 5; the change to JProgram.traverse() is necessary. http://gwt-code-reviews.appspot.com/46801/diff/5008/4010 File dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java (right): http://gwt-code-reviews.appspot.com/46801/diff/5008/4010#newcode1087 Line 1087: visitor.accept(new ArrayListJArrayType(allArrayTypes)); I remembered why this is necessary once I rebased derpc against these changes. It allows GenerateJavaScriptAst.endVisit(JArrayType) to correctly export symbol data for array types. http://gwt-code-reviews.appspot.com/46801 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on CssResource in google-web-toolkit
Comment by nick.bleibtrey: I cannot find this in the trunk? Where is it located? thanks nick For more information: http://code.google.com/p/google-web-toolkit/wiki/CssResource --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] deRPC review comments
- generally, there's several line-wrap changes; did you mean them? Some seem to be desirably shortening very long lines, but a few length lines (E.g. javadoc in JDeclaredType l104:106). Minor, though. - unqualified TODO at GenerateJavaAST:2980, what are you promising/offering to do here? But most of those changes seem to be subsumed in Scott's review comments, so I'll skip to that thread for others. Most of which he already covered. - Generically, I at least could use a lot more javadoc (or at least doc) in the compiler parts (dev/*/**.java). I'd like to see new code improve that, at least. - If we don't want to support ArtificialRescue, should we move it into an impl package? - bad indent in DynaTable.gwt.xml - CustomFieldSerializerValidator looks like checkstyle fixing; separate submit? - ProxyCreator:337, prexisting modulo your refactoring, but the logger message of seems sub-optimal to me. - the com.google.gwt.rpc.*Test2 family of tests seem poorly named. They may be adequately differentiated from the older suites by the package name, but I'm worried that e.g. searches for *Test.java will miss them unexpectedly... if you want a different name, can the suffix go before Test? E.g. maybe DeRpcTest? - IdentityValueCommand: the point to the methods here is just to finalize them? - CommandClientSerializationStreamWriter:73: am I reading that only arrays, default objects, and custom field serialized objects are put into identityMap? Should the check for presence in that map be deferred, if e.g. primitives aren't stored in it? - Pair: shouldn't there be a common place for this, outside the deRPC server context? - RPCServlet.java: Since we need matching e.g. X-GWT-Module-Base strings in multiple places, should we have a shared Constants class for them? - RPCServlet.java:182: I realize processCall() is small replicated code, but shouldn't we just have out be an OutputStream, and consult DUMP_PAYLOAD twice (before and after) so as to not replicate? - RPCServlet.java:270: javadoc doesn't match implementation; gzips for !local, regardless of size. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---