Re: GWT architecture MVP/EventBus (mentioned at Google I/O)
Hi, Everyone I start to work on my app which has requirement to have some kind of action buffer in the client side. All the actions will push to this buffer and make request to server every 2 or 3 seconds. Basically it is doing batching. So it should be a good use case to use command pattern to achieve this. My question is if I am not using RPC but RequestBuilder, what should I achieve this? And for batching, there are different ways: 1) I can communicate with the server every 5 actions, for example 2) or I can communicate with server every 2 seconds. Can I do both with the command pattern? Thanks! On Aug 14, 4:34 pm, plcoirier plcoir...@gmail.com wrote: One question though: The first line creates a Java class thanks to the configuration file and a Generator. For example, with the following configuration file: How is that class generated from the configuration file? (Sorry to ask if it's obvious.) Will the argument of the generated Command always be named form? Can it be changed? I answered these questions here (http://groups.google.com/group/mvp4g/ browse_thread/thread/d8ee207598bf02fa) event type=displayMessage calledMethod=onDisplayMessage handlers=rootPresenter eventObjectClass=java.lang.String / Isn't displayMessage and onDisplayMessage redundant? I, for one, wouldn't mind simply: event type=displayMessage handlers=rootPresenter eventObjectClass=java.lang.String / and expect onDisplayMessage to be called automatically (ie. event click fires onClick()) Good idea, I created an issue to make the calledMethod optional. Other than that, +1! It sure got my attention. 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 -~--~~~~--~~--~--~---
Re: oophm on a mac
I have run oophm on mac in eclipse. I think I just followed the guideline in GWT wiki page. I have not tried command line yet. -Ben On Jul 31, 11:56 am, Tom Malone tomjmal...@gmail.com wrote: running from command line with ant tried it on a linux vm image and seemed to work, just seems to be a mac thing. Tom On Fri, Jul 31, 2009 at 4:53 PM, Rajeev Dayalrda...@google.com wrote: Are you running from the command-line, or within Eclipse? Are you using the Google Plugin for Eclipse? On Fri, Jul 31, 2009 at 9:47 AM, Tom tomjmal...@gmail.com wrote: Built GWT from trunk and when I ran on my mac I get these error messages: oophm: [java] 2009-07-31 12:09:56.402 java[50133:80f] [Java CocoaComponent compatibility mode]: Enabled [java] 2009-07-31 12:09:56.404 java[50133:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.10 [java] 2009-07-31 12:09:58.325 java[50133:17303] *** - [NSConditionLock unlock]: lock (NSConditionLock: 0x1b7a60 '(null)') unlocked when not locked [java] 2009-07-31 12:09:58.326 java[50133:17303] *** Break on _NSLockError() to debug. [java] 2009-07-31 12:09:58.456 java[50133:17303] *** - [NSConditionLock unlock]: lock (NSConditionLock: 0x10c0f0 '(null)') unlocked when not locked what have I done wrong. Thanks in advance Tom --~--~-~--~~~---~--~~ 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 Incubator project
Joe, thanks for your experiences. From the demo in the incubator project now, it seems like the PagingScrollTable is really powerful. -Ben On Jul 30, 9:22 pm, Joe Cole profilercorporat...@gmail.com wrote: We have been using the ScrollTable in production for a over a year. Things we have had to implement on our own (not sure if this stuff is covered in the current drops): - sorting using comparators - tablemodel interface (supporting paging) - storing of current sorting indices to original row indices. - We built our own paging mechanism, but if doing it again would probably use the incubators - On window resize recalculate columns. It works really well though, no complaints here. On Jul 31, 12:09 pm, Ben benzhe...@gmail.com wrote: Is there anyone using GWT incubator project in production? The PagiongScrollTable looks pretty interesting to me. But not sure if this incubator project is fine for production as GWT itself. If anyone has experiences, could you share your experiences? --~--~-~--~~~---~--~~ 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: Composite - disabling click events
Check out GWT implementation of CustomButton. It seems that the goal can be achieved by overwrite onBrowserEvent (Event event) method without using the method proposed above. FYI -Ben On Jun 23, 4:07 am, romant roman.te...@gmail.com wrote: Ok, I used just basic approach, if anyone is interested in enabling/ disabling click events on your own composite here it is: public class MyButton extends Composite implements HasClickHandlers, ClickHandler { private final HashSetClickHandler clickHandlers; private boolean enabled; public MyButton() { clickHandlers = new HashSet(); addDomHandler(this, ClickEvent.getType()); ... initWidget(your_complex_widget); } public HandlerRegistration addClickHandler(ClickHandlerhandler) { clickHandlers.add(handler); // don't care about the return value, nobody should need it // if necessary return some convenient class extending HandlerRegistration // or create some special method for removing the clickhandlerfrom the clickHandlers list return null; } public void onClick(ClickEventevent) { if (enabled) { for (ClickHandlerhandler: clickHandlers) { handler.onClick(event); } } } public void setEnabled(boolean enabled) { this.enabled = enabled; } } Any suggestions for improvements are welcome. --~--~-~--~~~---~--~~ 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 architecture MVP/EventBus (mentioned at Google I/O)
So if for a TextBox I need to bind both FocusHandler and BlurHandler, I need to have two interfaces and combine them? How does that work? On Jun 30, 6:54 am, gscholt gsch...@gmail.com wrote: On Jun 29, 11:13 pm, Daniel Jue teamp...@gmail.com wrote: Does anyone have a working MVP/Eventbus sample of something simple like the PhoneEditor? I don't think I'm doing it right. The code from the IO presentation leaves out enough details so that I'm not sure what to do. For instance, in my Presenter.class, I have something like this: public class Presenter { ... private Display display; interface Display { HasClickHandlers getSaveButton(); HasClickHandlers getCancelButton(); HasClickHandlers getNumberField(); HasClickHandlers getLabelPicker(); } void editPhone(Phone phone) { this.phone = Phone.from(phone); display.getNumberField().setValue(phone.getNumber()); display.getLabelPicker().setValue(phone.getLabel()); } ...} Obviously, a HasClickHandlers object doesn't have a setValue method. It doesn't feel like I should be casting to the widget here, since we went through all the trouble of using the Display interface. I started looking at Mvp4g, but it seems to go off on a tangent with a code generation class to wire up presenters and views via xml.http://code.google.com/p/mvp4g/ It's also intertwined with some mvc4g classes. I just want something basic that works, so I can seed my project from there. A minimalist, working command style RPC example would be nice too. Anyone? If you're in the DC area, I'll buy you a drink! interface Display { HasClickHandlers getSaveButton(); HasClickHandlers getCancelButton(); HasValueString getNumberField(); HasValueString getLabelPicker(); } This will work for this example at least. If you want to bind events AND set a value to those fields you'd need to combine the two interfaces in a new one, or perhaps have two accessor methods. Gert --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---