Re: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars
Hey! Just looked into the source a bit and i found some interesting ideas in your code that i have to try out for myself! Will help me alot with my own stuff. I'll have a deeper look into the things your doing with the History. Regards and good work, as far as i can say that : )) On Apr 30, 10:11 pm, Tristan tristan.slomin...@gmail.com wrote: Hey all, I've built this framework for some of the projects I've been involved with (this is just the client-side, working on open sourcing the App Engine side soon). I thought it would be useful to open source something that works in real projects, especially for those of you getting started. It uses place service to dictate the state of the application. Incorporates event bus, adds some dto and multiple dto fetching stuff already baked in, relies on dependency injection from GIN, etc. There's a lot to take in, but here it is: http://code.google.com/p/handlebars/ Feel free to provide feedback or comment. All the best, Tristan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT - Visualization of graph/tree containing nodes and edges, moving and adding nodes...
sure ... just read README.txt (http://code.google.com/p/raphaelgwt/ source/browse/trunk/samples/MyCircle/README.txt) without eclipse it is just one command: ant devmode which runs the sample in development mode (ou, the zero step is to set up correctly GWTPATH environment variable to your GWT libraries). You can inspire from the sample project in order to create new one. Peter On 29. Apr, 21:35 h., leyg gaaf...@googlemail.com wrote: the raphaelgwt wrapper is perfect!!! but how can i configure it working (with ecplise or without eclipse) just with GWT... i have problems in how to add the library... the steps in the wiki of raphaelgwt does't help... did anybody configure it? On 19 Apr., 21:41, Peter Simun si...@seges.sk wrote: and what about usingGWTraphaelwrapper ?http://code.google.com/p/raphaelgwt/ You can find getting started wiki there (http://code.google.com/p/ raphaelgwt/wiki/GettingStarted) and also the sample projecthttp://code.google.com/p/raphaelgwt/source/browse/#svn/trunk/samples. -p- On 15. Apr, 22:12 h., David Kendall thirdnor...@gmail.com wrote: gafgaf gaaf...@googlemail.com wrote: ok its done, i tried but it is not very compatible with current versions of Firefox, IE, ... and GWT2.0 and that project is not progressed and improved anymore... nevertheless, thanks a lot! best regards On 15 Apr., 18:22, gafgaf gaaf...@googlemail.com wrote: Hi, thanks for the link, it looks good... i like try it but i have problems configuring it withgwt, is there a manual for dummies using eclipse or without eclipse? best regards On 15 Apr., 16:48, kozura koz...@gmail.com wrote: maybehttp://code.google.com/p/gwt-diagrams/ On Apr 14, 12:26 pm, gafgaf gaaf...@googlemail.com wrote: Hi I'm student from Germany an looking for any good library that i can use with Google Web Toolkit to create trees/graphs, where you can move nodes and connect these nodes with edges...but not like PieChart, MotionChart.. but like e.g.:http://raphaeljs.com/graffle.html. So finally it has to do with JavaScript... i don't like make just a desktop-application. My problem is i'm beginner and i dont know which libraries would be appropriate for my idea with the tree/graph... I'am looking a while for some appropriate libraries in the internet, but so far i didn't found something usefull that works withGWT(gwt-jsviz is already a dead project as i see)...do you have any suggestion for me, how i can realize my idea withGWT, maybe without any external librariy... i would be very pleased and happy... Thanks and best regards Gafur -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
SplitLayoutPanel, Resizing
Hi All. Relatively new to GWT, but have given it about a 20,000 line test drive and oh, yeah I like. I like :-)) Just got all working on a hosting service a couple nights ago and am impressed with performance as well. A couple of questions (will update the post if I find the answer before response) 1) In my application I am implementing a splitlayoutpanel with two rich text editors - one in the NORTH panel and one in the CENTER panel (top and bottom). When the vertical adjustment slides up, I would like to anchor the bottom of the rich text editor to the bottom and of the CENTER split layout panel, and vice versa for the rich text editor that is in the NORTH panel. In other languages, there is usually a 'bind' or 'anchor' command on such sliders. I looked high and low for examples of resize, but found very little. If there is explanatory code, please send a link. 2) Is there a way with Java servlets to gauge the amount of sessions being served on a JVM - trying to setup a poor man's load balancer. 3) I cannot get any of my list boxes to refresh. I call projectListBox.clear(); and that seems to work, but the data that comes back up on the list boxes are the same. Is there a way to do this efficiently? Thank you. Kirt Cathey sysrisk.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Why is GWT so slow?
Running the default program creted when create a new project on Eclipse IDE, the text field take almost a minute to show. I tried in IE, Firefox and Chrome. I'd put a break point on first line of onModuleLoad, and it take about a minute to enter the debug mode.. Another good seconds were wasted on line: RootPanel.get(nameFieldContainer).add(nameField);` What could be wrong? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Ext gwt and HSQLDB
I create a form using ext gwt sucessfully. Then i have to connect to HSQLDB using hibernate gilead and i want to use Ant. I dont have any idea on thatplz help mewhere should to start and end. Plz provide ant example .thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars
Tristan, Wow! This is great... I have been looking for an elegant way to integrate MVP / UIBinder patterns thanks for sharing this with us Enrique Perez Austin, Texas On Apr 30, 3:11 pm, Tristan tristan.slomin...@gmail.com wrote: Hey all, I've built this framework for some of the projects I've been involved with (this is just the client-side, working on open sourcing the App Engine side soon). I thought it would be useful to open source something that works in real projects, especially for those of you getting started. It uses place service to dictate the state of the application. Incorporates event bus, adds some dto and multiple dto fetching stuff already baked in, relies on dependency injection from GIN, etc. There's a lot to take in, but here it is: http://code.google.com/p/handlebars/ Feel free to provide feedback or comment. All the best, Tristan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Custom component with DIV markup?
take a look at http://code.google.com/intl/en/webtoolkit/doc/latest/DevGuideUiBinder.html 2010/4/30 jocke eriksson jock...@gmail.com Use the ui binder and create an HTMLPanel. Thats what it's for. 2010/4/29 d95sld95 steen.laur...@gmail.com How do I create a custom component or composite that creates HTML markup like this? div class=footer_topimg src=images/pixel.gif alt= //div div class=footer_content div id=footer_cont div class=float_left Copyright copy; 2009 Company Name, Inc. /div div class=float_right a href=index.html title=Home/anbsp;nbsp;|nbsp;nbsp; a href=about_us.html title=About Us/anbsp;nbsp;| nbsp;nbsp; a href=portfolio.html title=Portfolio/anbsp;nbsp;| nbsp;nbsp; a href=services.html title=Our Services/anbsp;nbsp;| nbsp;nbsp; a href=# title=Terms amp; Condition/anbsp;nbsp;| nbsp;nbsp; a href=# title=Privacy Policy/anbsp;nbsp;|nbsp;nbsp; a href=# title=Sitemap/a /div div style=clear:both;/div /div /div div class=footer_bottom /div /div Do I use DOM.createDiv() or how can I do this? I could use HTMLPanel - but how do I maintain browser compatibility then? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Indifference will be the downfall of mankind, but who cares?... http://blog.opsiland.info/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Any svn users? Which folders / files can we ignore?
Hi, Anyone else here using svn with gwt? If so, wondering if you ignore all the generated folders somehow? I'm ignoring .class files, but wonder what other stuff we can ignore from the project? I know when the compiler runs it generates a lot of additional files we can ignore. Are you just ignoring the entire output folder? 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT compiler on GAE
Is there a way to using Google Web Toolkit compiler directly in deployed Google AppEngine application at run-time on GAE server? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWTTestCase error
Hi, I'm trying to run a GWTTestCase but I'm getting the error below: [ERROR] Exception in thread htmlUnit client thread com.gargoylesoftware.htmlunit.ObjectInstantiationException: unable to create HTML parser [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java: 515) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java: 440) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java: 328) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java: 304) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java: 134) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java: 101) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java: 414) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 297) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 354) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 339) [ERROR] at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java: 100) [ERROR] Enclosed exception: org.xml.sax.SAXNotRecognizedException: Feature 'http://cyberneko.org/html/features/parse-noscript-content' is not recognized. [ERROR] at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java: 509) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java: 440) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java: 328) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java: 304) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java: 134) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java: 101) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java: 414) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 297) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 354) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java: 339) [ERROR] at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java: 100) [ERROR] Exception in thread htmlUnit client thread com.gargoylesoftware.htmlunit.ObjectInstantiationException: unable to create HTML parser [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java:515) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java:440) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java: 328) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java: 304) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java: 134) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java: 101) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java: 414) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:297) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:339) [ERROR] at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java:100) [ERROR] Enclosed exception: org.xml.sax.SAXNotRecognizedException: Feature 'http://cyberneko.org/html/features/parse-noscript-content' is not recognized. [ERROR] at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java:509) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser $HtmlUnitDOMBuilder.init(HTMLParser.java:440) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java: 328) [ERROR] at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java: 304) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java: 134) [ERROR] at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java: 101) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java: 414) [ERROR] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:297) [ERROR] at
d[c][2] is not a function
I'm getting a Javascript error when trying to call a service. Many other services are working but a handful are throwing is not a function errors. Details below. Greg GWT 2.0.3 Javascript ERROR: 2010-04-29 12:49:33,503 [ERROR] Database:service.updateMPG com.google.gwt.core.client.JavaScriptException: (TypeError): d[c][2] is not a function MLServiceAsync.java void updateMPG(MidwarePropertyGroupDTO entity, AsyncCallbackMidwarePropertyGroupDTO callback); MLService.java public MidwarePropertyGroupDTO updateMPG(MidwarePropertyGroupDTO entity); Database.java final AsyncCallbackMidwarePropertyGroupDTO callback = new AsyncCallbackMidwarePropertyGroupDTO() { public void onFailure(Throwable caught) {} public void onSuccess(MidwarePropertyGroupDTO result) {} }; MLServiceAsync service = (MLServiceAsync) GWT.create(MLService.class); try { service.updateMPG(entityDTO, callback); } catch (Throwable t) { log.error(service.updateMPG, t); } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars
http://code.google.com/p/handlebars/ Spiffy. The page mentions using Eclipse code generation--I like that. What sort of files are you generating? - Stephen -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Why is GWT so slow?
try to increase the java heap space by editing your eclipse.ini file On Sat, May 1, 2010 at 2:20 AM, tombrito brito@gmail.com wrote: Running the default program creted when create a new project on Eclipse IDE, the text field take almost a minute to show. I tried in IE, Firefox and Chrome. I'd put a break point on first line of onModuleLoad, and it take about a minute to enter the debug mode.. Another good seconds were wasted on line: RootPanel.get(nameFieldContainer).add(nameField);` What could be wrong? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Ray Ryan, best practices and embracing asynchronicity
Doing this well depends on some form of centralized data retrieve dispatch/caching. You make calls to this centralized service to get the objects by id that you are interested in. It either finds them in cache and can return them immediately, or adds them to a queue of objects to retrieve. After all requests have been made (ie on DeferredCommand), a single request is sent to retrieve all objects of all types needed. As for updating on return, there's lots of ways. You could use an event bus to indicate all the objects where data is now available. This could even be a single event instead of one for each object, and the event handlers can ask if their objects of interest are now available, avoiding multiple updates. Alternatively, you can use the current async callback mechanism, but with a way to consolidate - all requests by Person X get resolved to a single callback. Either of these require a bit of work to set up a robust centralized service, but once done all the code around using it for well cached fast object retrieval becomes pretty easy and automatic, nicely async, and retrieves the minimum of data. I've found it's well worth the effort. And likely some of these libraries out there have these mechanisms built in. jk On Apr 29, 10:56 am, brendan brendan.law...@gmail.com wrote: Another question beginning with the sentence I watched Ray Ryan's talk: Firstly, great talk. Full of really useful ideas. But I have a dilemma. 1) On one hand, I want to follow the advice that says go with the asynch flow. I'm happy to do that. 2) On the other hand, I also want to follow the advice that object graphs should be avoided and domain objects should really just contain ids of their related objects. In the case of lists, this is to avoid sending too much useless info over the wire. And for AppEngine users working with JDO, this is unavoidable in any case, for objects in an 'unowned' relationship with the top level object. The combination of these two pieces of advice leads me to a situation where I could really do with some advice on what is considered best practice. Imagine I have a domain object - call it Person - which has multiple related 'unowned' objects, e.g. Group, Company etc. I want to list a bunch of Persons on my GWT front end, but the display for each row requires data from the related objects (e.g. group name, company name). Following advice 2 above (or perhaps constrained by JDO), my User object has only the ids of the related Group and Company objects, and so after retrieving the list of Users from the server side, the User List Presenter must make a separate RPC call for each Group and Company object for each User. Let's pretend that because of smart caching this wasn't particularly expensive (arguable). I'm still left with the problem that following advice 1 about each call is asynch. I can't display a User row until I hear back from the two Group and Company calls. To achieve this delayed display, I have to 'recombine' the two asynch calls using some kind of local flags, and only when both callbacks have been triggered is it safe to display the row. Besides the ugliness and complexity of code like that, there is also the possibility that the order of my list will be changed due to the unpredictability of the callback sequence. There are a number of workarounds I can think of, but I'd really like some advice based on experience, if somebody is willing to share. The solution I would tend towards would be to build a graph on the serverside and to hell with advice 2. Any takers? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: SplitLayoutPanel, Resizing
As much as it tries to abstract, GWT is still bound underneath to html elements and thus you must tinker with styling/CSS to get layout right. And unlike most layout systems out there, there is no great child-type independent layout containers that work perfectly. LayoutPanels try, but still not perfect. Myself not coming into GWT as a CSS expert, I recommend using Firebug and a willingness to dicker with the different elements styling with height:100% or whatnot to figure out exactly what's needed to get the correct layout and repositioning/resizing action. Also, be sure you are following everything here: http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels, standard html mode, rootlayoutpanel to hold the SplitLayoutPanel or explicit sizing of it, etc. For #2, this is more the responsibility of your tomcat/jetty engine, which have the tools for dealing with this. Dunno what you're trying to do in #3, if you clear a listbox and repopulate it with new data, the new data should show up just fine? On Apr 30, 2:59 am, kirtcathey kirtcat...@gmail.com wrote: Hi All. Relatively new to GWT, but have given it about a 20,000 line test drive and oh, yeah I like. I like :-)) Just got all working on a hosting service a couple nights ago and am impressed with performance as well. A couple of questions (will update the post if I find the answer before response) 1) In my application I am implementing a splitlayoutpanel with two rich text editors - one in the NORTH panel and one in the CENTER panel (top and bottom). When the vertical adjustment slides up, I would like to anchor the bottom of the rich text editor to the bottom and of the CENTER split layout panel, and vice versa for the rich text editor that is in the NORTH panel. In other languages, there is usually a 'bind' or 'anchor' command on such sliders. I looked high and low for examples of resize, but found very little. If there is explanatory code, please send a link. 2) Is there a way with Java servlets to gauge the amount of sessions being served on a JVM - trying to setup a poor man's load balancer. 3) I cannot get any of my list boxes to refresh. I call projectListBox.clear(); and that seems to work, but the data that comes back up on the list boxes are the same. Is there a way to do this efficiently? Thank you. Kirt Cathey sysrisk.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT - Visualization of graph/tree containing nodes and edges, moving and adding nodes...
Thanks Peter, but this doesn't help, because it covers not my Problem. i have problem in configuring the raphaelgwt-library into my Project, i created a new discussion once... http://groups.google.de/group/raphaeljs/browse_frm/thread/6dc40b5120bfc14a/7d1f4fa5bf879e98#7d1f4fa5bf879e98 it is getting me * this problem :( Normally you really just has to to that 2 steps as described in the wiki of raphaelGWT, but i cant see which step i did wrong... . On 1 Mai, 14:21, Peter Simun si...@seges.sk wrote: sure ... just read README.txt (http://code.google.com/p/raphaelgwt/ source/browse/trunk/samples/MyCircle/README.txt) without eclipse it is just one command: ant devmode which runs the sample in development mode (ou, the zero step is to set up correctly GWTPATH environment variable to your GWT libraries). You can inspire from the sample project in order to create new one. Peter On 29. Apr, 21:35 h., leyg gaaf...@googlemail.com wrote: the raphaelgwt wrapper is perfect!!! but how can i configure it working (with ecplise or without eclipse) just with GWT... i have problems in how to add the library... the steps in the wiki of raphaelgwt does't help... did anybody configure it? On 19 Apr., 21:41, Peter Simun si...@seges.sk wrote: and what about usingGWTraphaelwrapper ?http://code.google.com/p/raphaelgwt/ You can find getting started wiki there (http://code.google.com/p/ raphaelgwt/wiki/GettingStarted) and also the sample projecthttp://code.google.com/p/raphaelgwt/source/browse/#svn/trunk/samples. -p- On 15. Apr, 22:12 h., David Kendall thirdnor...@gmail.com wrote: gafgaf gaaf...@googlemail.com wrote: ok its done, i tried but it is not very compatible with current versions of Firefox, IE, ... and GWT2.0 and that project is not progressed and improved anymore... nevertheless, thanks a lot! best regards On 15 Apr., 18:22, gafgaf gaaf...@googlemail.com wrote: Hi, thanks for the link, it looks good... i like try it but i have problems configuring it withgwt, is there a manual for dummies using eclipse or without eclipse? best regards On 15 Apr., 16:48, kozura koz...@gmail.com wrote: maybehttp://code.google.com/p/gwt-diagrams/ On Apr 14, 12:26 pm, gafgaf gaaf...@googlemail.com wrote: Hi I'm student from Germany an looking for any good library that i can use with Google Web Toolkit to create trees/graphs, where you can move nodes and connect these nodes with edges...but not like PieChart, MotionChart.. but like e.g.:http://raphaeljs.com/graffle.html. So finally it has to do with JavaScript... i don't like make just a desktop-application. My problem is i'm beginner and i dont know which libraries would be appropriate for my idea with the tree/graph... I'am looking a while for some appropriate libraries in the internet, but so far i didn't found something usefull that works withGWT(gwt-jsviz is already a dead project as i see)...do you have any suggestion for me, how i can realize my idea withGWT, maybe without any external librariy... i would be very pleased and happy... Thanks and best regards Gafur -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google
Re: Ray Ryan, best practices and embracing asynchronicity
When you show a list of Persons on the browser, do you also show the last traded price of the Company that the Person works for? Obviously not. Then why would you want to send the entire Company object with the Person object? The browser just needs a few simple properties of a Person - personal details, company name, group name - and that's it. It doesn't care about the Group object or the Company object; it just needs certain values from them. But in your back-end java code, you need to be normalized. You really want to think of Companies and Groups as separate entities. And you really want to store the last traded price for every Company to perform some calculation. Point I am trying to make is that there is a clear distinction between *what the browser needs* (DTO) and *what the business needs* (domain objects). When you send JDO objects across the wire, you are sending your domain model. Its not what the browser wants, and that is a problem. Soon, you will have a presentational information in your domain model, and you will have restricted information being sent to the browser, and it will be a big mess. So, take a step back, and separate Domain objects from Presentation objects (or DTOs). Make your RPCs revolve around a particular view, and send all necessary information for that view in one RPC call. Note that now your Person would include company name and company id, but not the entire company object. Now, when the user clicks the company in the view, you make a RPC call to get company information (because you have company id). That's it. Works nicely, without having to make multiple calls. --Sri On 1 May 2010 20:53, kozura koz...@gmail.com wrote: Doing this well depends on some form of centralized data retrieve dispatch/caching. You make calls to this centralized service to get the objects by id that you are interested in. It either finds them in cache and can return them immediately, or adds them to a queue of objects to retrieve. After all requests have been made (ie on DeferredCommand), a single request is sent to retrieve all objects of all types needed. As for updating on return, there's lots of ways. You could use an event bus to indicate all the objects where data is now available. This could even be a single event instead of one for each object, and the event handlers can ask if their objects of interest are now available, avoiding multiple updates. Alternatively, you can use the current async callback mechanism, but with a way to consolidate - all requests by Person X get resolved to a single callback. Either of these require a bit of work to set up a robust centralized service, but once done all the code around using it for well cached fast object retrieval becomes pretty easy and automatic, nicely async, and retrieves the minimum of data. I've found it's well worth the effort. And likely some of these libraries out there have these mechanisms built in. jk On Apr 29, 10:56 am, brendan brendan.law...@gmail.com wrote: Another question beginning with the sentence I watched Ray Ryan's talk: Firstly, great talk. Full of really useful ideas. But I have a dilemma. 1) On one hand, I want to follow the advice that says go with the asynch flow. I'm happy to do that. 2) On the other hand, I also want to follow the advice that object graphs should be avoided and domain objects should really just contain ids of their related objects. In the case of lists, this is to avoid sending too much useless info over the wire. And for AppEngine users working with JDO, this is unavoidable in any case, for objects in an 'unowned' relationship with the top level object. The combination of these two pieces of advice leads me to a situation where I could really do with some advice on what is considered best practice. Imagine I have a domain object - call it Person - which has multiple related 'unowned' objects, e.g. Group, Company etc. I want to list a bunch of Persons on my GWT front end, but the display for each row requires data from the related objects (e.g. group name, company name). Following advice 2 above (or perhaps constrained by JDO), my User object has only the ids of the related Group and Company objects, and so after retrieving the list of Users from the server side, the User List Presenter must make a separate RPC call for each Group and Company object for each User. Let's pretend that because of smart caching this wasn't particularly expensive (arguable). I'm still left with the problem that following advice 1 about each call is asynch. I can't display a User row until I hear back from the two Group and Company calls. To achieve this delayed display, I have to 'recombine' the two asynch calls using some kind of local flags, and only when both callbacks have been triggered is it safe to display the row. Besides the ugliness and complexity of code like that, there is also the possibility
GWT Localization - Constants class - properties?
I have a project with all my strings implemented in an extended Constants class using @DefaultStringValue I never did create a .properties file. Now in order to translate I will all the constants in a .properties file. Is there a tool that will take my constants java file and create a properties file that already exists? Probably easy enough to do. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Localization of UIBinder files ...
I have followed the example in http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinderI18n.html but am not seeing any .properties file created. they mention that they will be created in an aux folder - what is that? Any help would be appreciated. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT not using CssResources??
Hm. The disadvantage of Gmail is that don't even realize that your are mailing a person or group (if you don't pay good attention like I did)... Anyway, I received an email from Stefan about this a1decorator project and this was mine reaction: Hi Stefan, --- Looked at your project and played with it, but I don't think it's not solving my problem and it's not the way I like to work with styles. Why should I want to put my style value's in code like you do in your DecorInterface? I want them only in CSS files that come with a widget. That's the nice thing about this CssResource concept, you can have one widget with one or more Css files, resulting in clear checked compact css files. The idea is to be able to replace/inject another CSS file with the same widget (injecting/using another Client bundle). GWT also advices to put all your Style value's in CSS files. I expect that GWT will also make more use of the ClientBundle/CssResource concept for their widgets in the up comming releases, with the risk that your concept will lose his power. And when using your code, you might have to refactor a lot of code when upgrading to a newer gwt release.. Just my thoughts, but maybe I miss understand it.. Anyway, back to my problems: like my original question: can you point out how your code solves my problems listed above ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars
First, thanks. Glad to see there's some interest. I have limited resources, so I want to focus on the important things. Hence, if you have questions or suggestions, please let me know, that way I know what to spend time on first. @Stephen Unfortunately I'm not an Eclipse Plugin developer, so there's no code generation going on... yet. Having said that, the whole thing was put together with code generation in mind by being as declarative as possible. The specific code for some functionality goes into well defined areas like onAtPlace() method in presenter for example. So, in theory, you can declare your entire page, presenter, and view architecture and then just fill in the bits where they need to go and it will work. Been doing it by hand and have have a checklist I follow, but all the boiler plate can (and should) be code generated. The Eclipse Plugin is definitely on the roadmap (I'll post that on there soon), but for now it still provides a nice framework for the client side app. Handlebars Roadmap: - Setup a starter handlebars project - Open source the server side App Engine code Future Plans: - Eclipse Plugin Tristan On May 1, 8:35 am, Stephen Haberman stephen.haber...@gmail.com wrote: http://code.google.com/p/handlebars/ Spiffy. The page mentions using Eclipse code generation--I like that. What sort of files are you generating? - Stephen -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT not using CssResources??
Thanks Sefan, I agree with you on some of the issues you discuss, but not all of them. You are right that GWT's ClientBundle/CssResource concepts still have some issues, just like their widget design (some of my issues are in the issue tracker). But I don't think the UIBinder is a step back. Don't forget that many company's have to deliver fast and such work with GUI design tools like GWT Designer. UIBinder is the foundation for such tools. It's not for nothing that facelets became part of the JSF 2.0 spec and the Flex template mechanisme is the huge success behind Flex, all founded on the same concepts. Thet GWT dev team is just very careful and don't want to create a lock- in situation, so.. that is sometimes frustrating... but that's how it is and it probably takes a few releases .. Anyway, some of my answers are inlined, looking forward to your answers. Because you want to have a single point of control. What do you mean by this? Isn't that the whole idea of ClientBundle/ CssResource Even with his current problems/restrictions That is a fault. When you bind a widget to a certain css no change is possible. But you want to have a change to chance. Why isn't this possible ?... Suppose a widget has his own css files, the developer can copy this and use it to inject his own css file through his own client bundle... at least... that is the gwt way... And you can always fine tune with dependent style names. However, the technique you need for your reduced requirement is used in a1decor. You just do variants like a1decor-style do. You separate yourCssResourcein an own module. Each variant is just a duplicate of this module with modified values. You select theCssResourceyou need per class path, that is the trick. I can't really follow you here, can you give me a concrete example? I have dozens of reusable widgets, I hope I don't need to a style module for every one of them :(... I feel this jumps too short. In common you don't want to change the css of a single widget, you want to change the theme of a whole application. What do you mean by this? How do you define you Theme then ? To me this sounds a bit too course grained and a different kind of problem... I simple want to be able to change my style values of one reusable (composite) widget. Do you mean that you define a theme as the collection of style definitions of the resusable widgets that you use in your app ?... This comes down to the same problem I think, as I don't want to change the Theme, as I only want to change one reusable widget Why should I need to change my Theme for this ? ... From the values within a css there are at least two sorts: a) one related with a theme b) one related with functionality The general problem with css is, that is does not really is able to separate concerns. This is funny because css was advocated with this argument. But css failed to fulfill this. You could not separate concerns when they affect to the same css-style (e.g. because a functionality and a theming aspect want to change padding. But luck, either or, but no AND possible).. Sorry, you are losing me here. Can you give a concrete example? I did not expect this. GWT needs to run legacy app, too. So GWT will not automatically bindCssResourceto core widgets. Just wait a see. Yep, I am also afraid of that, which is also what Thomas mentions above... I guess we will see major changes in this area in version 3.0... I like your idea's btw, but I am not very sure if it's very practical in larger app's and if it's the best solution in my case. If I look at my GWT app's, which are complex and have a total code base of about 2MB (downloaded in pieces).. I am a afraid it will become very messy if setup my css files like you propose... For example: if I look at my date picker styles, they will get very large with all the @def at's, not even to speak about all the code behind is. Of course the compiler will optimize a lot, but stilll.. it als has to be manageable. So I gain a lot of freedom and can override then every style value of my datepicker, but the question is: is this flexible worth the bunch of extra more-difficult maintainable code ? I don't know to honest... Ed On May 1, 10:23 pm, Ed post2edb...@gmail.com wrote: And Stefan answered this back: Hi Stefan, Looked at your project and played with it, but I don't think it's not solving my problem and it's not the way I like to work with styles. Why should I want to put my style value's in code like you do in your DecorInterface? Because you want to have a single point of control. And the other benefits documented on the project page of a1decor I want them only in CSS files that come with a widget. That is a fault. When you bind a widget to a certain css no change is possible. But you want to have a change to chance. That's the nice thing about thisCssResourceconcept, you can have one widget with one or more Css files, resulting in clear
Using Typeface.js within a GWT app
I am looking for some sample Java code demonstrating how to get AJAX content displayed into a custom font using Typeface.js within a GWT app. I have tried a little bit by calling the following native function native void Typeface_renderDocument() /*-{ $wnd._typeface_js.renderDocument(); }-*/; * after having filled the relevant widget with the AJAX content, and * after calling the following function on the widget : void applyTypeface(Widget widget) { widget.addStyleName(typeface-js); widget.getElement().getStyle().setProperty(fontFamily, Helvetiker); Typeface_renderDocument(); } ...where Helvetiker is a custom font (actually available from Typeface.js fonts page (http://typeface.neocracy.org/fonts.html). But that didn't work. I am looking forward to any suggestions since I am bit stuck here. Alternatively I would be interested in an example using cufón within GWT, although I am not so keen about the replacement by images that cufón does (which is the main reason why I was trying to use Typeface.js.) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
HTMLPanel row sapcing??
i created some rows at comilationg time in .ui.xml file. Later on, at run time using TableRowElement.Delete(int) function i deleted the whole row. on doing so, now at the deleted section, the row spacing is quite larger than at other sections. How do i correct it? can it be done? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: error javax.mail
Someone could send me a sample code of an application for sending e- mail? I'm following the http://code.google.com/appengine/docs/java/mail/overview.html # Sending_Mail_with_the_JavaMail_API but is not working. On Apr 30, 2:53 pm, kozura koz...@gmail.com wrote: I think you're missing the gist of the above replies - you can't use this library on the client (browser) side of GWT. Only libraries that use the limited set of the JRE emulated by GWT, listed here:http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html, can be used in client side code. Any functionality like mail or db connections and such must all be done on the server side. The correct model is for the client/browser to send requests to the server, ie through RPC calls, and for it to do this sort of work, sending the results back to the client. On Apr 30, 11:43 am, Felipe Guarda felip...@gmail.com wrote: added the javax.mail.jar, but now is missing the source of javax.mail. already downloaded the javamail-1.4.3-src.zip and have attached it in the lib javamail. But when I depploy app happens the errors below. What is missing to do? errors: Compiling module com.ps.www.Plano_de_saude_online Validating newly compiled units [ERROR] Errors in 'file:/home/felipe/downloads/workspace/plano %20de%20saude%20online/src/com/ps/www/client/ Plano_de_saude_online.java' [ERROR] Line 82: No source code is available for type java.util.Properties; did you forget to inherit a required module? [ERROR] Line 83: No source code is available for type javax.mail.Session; did you forget to inherit a required module? [ERROR] Line 88: No source code is available for type javax.mail.Message; did you forget to inherit a required module? [ERROR] Line 88: No source code is available for type javax.mail.internet.MimeMessage; did you forget to inherit a required module? [ERROR] Line 89: No source code is available for type javax.mail.internet.InternetAddress; did you forget to inherit a required module? [ERROR] Line 90: No source code is available for type javax.mail.Message.RecipientType; did you forget to inherit a required module? [ERROR] Line 94: No source code is available for type javax.mail.Transport; did you forget to inherit a required module? [ERROR] Line 95: No source code is available for type javax.mail.MessagingException; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'com.ps.www.client.Plano_de_saude_online' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly On Apr 29, 2:29 pm, Jason Essington jas...@greenrivercomputing.com wrote: You can't really use javax.mail on the client side, it isn't supported by the emulation library. you'd have to send your data to the server and use javamail from there. -jason On Apr 29, 2010, at 11:20 AM, Felipe Guarda wrote: Yes, i`m using javax.mail in the clientside code. where is the correct place? Felipe On Apr 29, 1:34 pm, dolcra...@gmail.com dolcra...@gmail.com wrote: Are you using javax.mail in the clientside code? (If so, you can't do this). Otherwise you just need to add thecorrect classpath entriescorrect classpath entries to the run configuration. On Apr 29, 10:26 am, Felipe Guarda felip...@gmail.com wrote: I think i may have a problem with which JRE the appengine hosted browser is using to compile. In eclipse my code recognizes the various classes I'm importing for my JavaMail use (no precompile errors). However, when I Run As a web app, the GWT Hosted Mode console reports the following: [ERROR] Line 28: The import javax.mail cannot be resolved [ERROR] Line 29: The import javax.mail cannot be resolved [ERROR] Line 30: The import javax.mail cannot be resolved [ERROR] Line 31: The import javax.mail cannot be resolved [ERROR] Line 32: The import javax.mail cannot be resolved [ERROR] Line 33: The import javax.mail cannot be resolved [ERROR] Line 34: The import javax.mail cannot be resolved [ERROR] Line 81: Session cannot be resolved to a type [ERROR] Line 81: Session cannot be resolved [ERROR] Line 86: Message cannot be resolved to a type [ERROR] Line 86: MimeMessage cannot be resolved to a type [ERROR] Line 87: InternetAddress cannot be resolved to a type [ERROR] Line 88: Message cannot be resolved [ERROR] Line 89: InternetAddress cannot be resolved to a type [ERROR] Line 92: Transport cannot be
[gwt-contrib] Re: Comment on CssResource in google-web-toolkit
Comment by iabdullo: dsfasdfa For more information: http://code.google.com/p/google-web-toolkit/wiki/CssResource -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Use Long ids instead of String for server-side domain objects. Fixed the (issue439801)
Reviewers: Ray Ryan, Description: Use Long ids instead of String for server-side domain objects. Fixed the swizzling code so that Longs are represented as String on the client side. Patch by: amitmanjhi Review by: rjrjr (desk review) Please review this at http://gwt-code-reviews.appspot.com/439801/show Affected files: M /bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java M /bikeshed/src/com/google/gwt/sample/expenses/gwt/request/EmployeeRequest.java M /bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpenseRequest.java M /bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ReportRequest.java M /bikeshed/src/com/google/gwt/sample/expenses/server/ExpensesDataServlet.java M /bikeshed/src/com/google/gwt/sample/expenses/server/domain/Employee.java M /bikeshed/src/com/google/gwt/sample/expenses/server/domain/Expense.java M /bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8026 committed - Use Long ids instead of String for server-side domain objects. Fixed t...
Revision: 8026 Author: amitman...@google.com Date: Sat May 1 07:18:49 2010 Log: Use Long ids instead of String for server-side domain objects. Fixed the swizzling code so that Longs are represented as String on the client side. Patch by: amitmanjhi Review by: rjrjr (desk review) Review at http://gwt-code-reviews.appspot.com/439801 http://code.google.com/p/google-web-toolkit/source/detail?r=8026 Modified: /branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/EmployeeRequest.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpenseRequest.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ReportRequest.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/ExpensesDataServlet.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/domain/Employee.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/domain/Expense.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java === --- /branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Thu Apr 29 07:36:37 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Sat May 1 07:18:49 2010 @@ -198,11 +198,12 @@ Class? entity = tokenToEntityRecord.get(recordToken).entity; Class? extends Record record = tokenToEntityRecord.get(recordToken).record; MapString, Class? propertiesInRecord = getPropertiesFromRecord(record); -validateKeys(recordObject, propertiesInRecord); +validateKeys(recordObject, propertiesInRecord.keySet()); +updatePropertyTypes(propertiesInRecord, entity); // get entityInstance Object entityInstance = getEntityInstance(writeOperation, entity, -recordObject.getString(id), propertiesInRecord.get(id)); +recordObject.get(id), propertiesInRecord.get(id)); // persist if (writeOperation == WriteOperation.DELETE) { @@ -215,16 +216,18 @@ if (writeOperation == WriteOperation.CREATE (id.equals(key))) { // ignored. id is assigned by default. } else { + Object propertyValue = getPropertyValueFromRequest(recordObject, key, + propertyType); + propertyValue = getSwizzledObject(propertyValue, propertyType); entity.getMethod(getMethodNameFromPropertyName(key, set), - propertyType).invoke(entityInstance, - getPropertyValueFromRequest(recordObject, key, propertyType)); + propertyType).invoke(entityInstance, propertyValue); } } entity.getMethod(persist).invoke(entityInstance); } // return data back. -return getReturnRecord(writeOperation, entity, entityInstance, recordObject); +return getReturnRecord(writeOperation, entityInstance, recordObject); } private CollectionProperty? allProperties(Class? extends Record clazz) { @@ -316,17 +319,16 @@ } private Object getEntityInstance(WriteOperation writeOperation, - Class? entity, String idValue, Class? idType) + Class? entity, Object idValue, Class? idType) throws SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { if (writeOperation == WriteOperation.CREATE) { return entity.getConstructor().newInstance(); } - // TODO: check version validity. return entity.getMethod(find + entity.getSimpleName(), idType).invoke( -null, idValue); +null, getSwizzledObject(idValue, idType)); } /** @@ -474,19 +476,37 @@ } private JSONObject getReturnRecord(WriteOperation writeOperation, - Class? entity, Object entityInstance, JSONObject recordObject) - throws SecurityException, JSONException, IllegalAccessException, - InvocationTargetException, NoSuchMethodException { + Object entityInstance, JSONObject recordObject) throws SecurityException, + JSONException, IllegalAccessException, InvocationTargetException, + NoSuchMethodException { JSONObject returnObject = new JSONObject(); -returnObject.put(id, entity.getMethod(getId).invoke(entityInstance)); -returnObject.put(version, entity.getMethod(getVersion).invoke( -entityInstance)); +// currently sending back only two properties. +for (String propertyName : new String[] {id, version}) { + returnObject.put(propertyName, getPropertyValueFromDataStore( + entityInstance, propertyName)); +} if (writeOperation == WriteOperation.CREATE) { returnObject.put(futureId, recordObject.getString(id)); } return returnObject; } + + /** + * Swizzle an idValue received from the client to the type expected by the + * server.