On Wednesday, January 5, 2011 4:14:47 PM UTC+1, Greg Dougherty wrote:
>
> Hi Jeff, 
>
> You've got things backwards for my concerns.  I want to fire off a 
> Submit event when the user hits Enter, I don't want to do something 
> special once the user has clicked on the button.
>

I think Jeff got it right, but explained it badly: if you wrap you fields 
inside a form, then when hitting Enter, the *browser* will submit the form. 
So all you have to do is to listen to the SubmitEvent on the FormPanel (and 
not the ClickEvent on the SubmitButton, which I believe not all browsers do 
dispatch in this case).

To do that, I need to figure out how to catch a KeyPress Event when 
> the last thing selected was a FileUpload (which doesn't have a 
> KeyPress Event Handler).  Any ideas?
>

I just saw that Widget#addDomHandler is public, so this should work (for any 
widget provided the browser actually dispatches the event):
   fileUpload.addDomHandler(enterbutton, KeyPressevent.getType());


Now, let's go off topic:

As for using UIBinder: 
> 1: I'm building the UI, and I'm a programmer. I LIKE building the UI 
> programmatically. 
> 2: When I looked at it (July - August 2010), the documentation was 
> opaque, and singularly lacking in useful examples.  So avoiding 
> UIBuilder is faster than using it.
>

Probably because you:
 - don't use HTMLPanel enough (reminder: it helps for performance)
 - and haven't spent the necessary hour (half-hour?) to learn how to use it 
and understand how much time it can actually save you (mainly by making your 
UI code much more readable as to which widget contains what).
 

> 3: I build WebApps where the height and width of the UI is dependent 
> upon the data returned in response to user actions.  Which means that 
> the *LayoutPanels are a HUGE step backward in functionality for me. 
> To the extent that when I have to choose between "upgrading" GWT, and 
> losing the non-Layout Panels, I'll probably stop upgrading GWT.  (Yes, 
> I know that the change was a deliberate choice.  I just think it was a 
> horrible mistake.)


I don't see the relationship between layout panels and UiBinder.
 

-- 
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.

Reply via email to