More than one constructor annotated with @UiConstructor
Hi all I have my own convenient composite which is a HorizontalPanel with a Label and TextBoxBase, called FormEntry. I have 4 different constructors for this composite, where some take just a label text string and others also take a default value and a boolean determining if the TextboxBase should be PasswordTextBox or a TextBox. Now, I am trying to convert my project to use the new UiBinder feature. I figured based on http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Using_a_widget that I could annotate all my constructors with @UiConstructor and then in the ui.xml use the name/or number of constructor arguments to match it to the right constructor. So for example in the ui.xml I have my:FormEntry ui:field=username labelText=Username defaultValue=nina / my:FormEntry ui:field=password labelText=Password defaultValue=pass123 password=true/ and in the FormEntry.java I have @UiConstructor public FormEntry(String labelText, String defaultValue){ this(labelText, defaultValue, false); } @UiConstructor public FormEntry(String labelText, String defaultValue, boolean password){ // code... } The error message I get is FormEntry has more than one constructor annotated with @UiConstructor. I've looked for more info on how this @UiConstructor works but haven't found anything. So the question are: - do I have the right approach here? - why can't I have more than one constructor marked with UiConstructor? - does the binding happen with the help of the constructor arg names or numbers or types or what? Many thanks for any tips! Nina -- 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.
Doubleclick event handling
Could I please get some clarification on how to use the double click event handling? The classes are there (e.g. http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/HasDoubleClickHandlers.html) but don't seem to be implemented anywhere. I would like to add double click handling to an Image, could someone please give me some example snippet of code on how to do this? I've tried simple things like extending Image and implementing HasDoubleClickHandlers, e.g. private class CommandButton extends Image implements DoubleClickHandler, HasDoubleClickHandlers { private HandlerManager clickHandlers = new HandlerManager(this); public CommandButton(){ super(images/favicon-2.png); addDoubleClickHandler(this); } @Override public void onDoubleClick(DoubleClickEvent event) { Log.debug(doubleclicked command button); } @Override public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return clickHandlers.addHandler(DoubleClickEvent.getType(), handler); } @Override public void fireEvent(GwtEvent? event){ handlers.fireEvent(event); } } but of course this doesn't handle double click events. 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: Understanding KeyUpEvent
Just to clarify what I am trying to do here: I am after a modal key input state, where when I hold down control and alt, display a Dialogbox with a textbox, and when I no longer hold down control and alt, I want that dialogbox to go away. Same concept as the shift key to get upper case letters. So, I figured detecting when the user had let go of the control and alt key by using the KeyUpEvent would be the way to go here. But this event gets fired constantly when these two keys are held down, which I find very confusing. I am using FF3. On May 4, 3:57 pm, nina juliadot...@gmail.com wrote: Hi all I would like to know when a user releases any key on the keyboard, and thought I should use the KeyUpHandler for this. But when I do something like addKeyUpHandler(new KeyUpHandler(){ @Override public void onKeyUp(KeyUpEvent event) { Log.debug(key went up! + event.getNativeKeyCode()); } }); the onKeyUp method is NEVER called when any key is released, but ALWAYS for as long as any key is pressed down. I expected the opposite to happen. Could someone please enlighten me on how to capture the fact that a key was released? I'm using 1.6.4. Many thanks from a very confused Nina --~--~-~--~~~---~--~~ 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: Getting item select events from suggestbox list
Hi Zamek Have you read the http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/SuggestOracle.Suggestion.html about the Associating Data Transfer Objects (DTOs) with Suggestion Objects? I've written my own SuggestBox, SuggestOracle and Suggestion, using the implementation of MultiWordSuggestOracle as inspiration, and didn't find it difficult. In your custom Suggestion, you have your DTO, so in the onSelection callback you get access to the DTO. Good luck Nina On May 4, 11:16 pm, zame...@gmail.com zame...@gmail.com wrote: Hi All, I am using SuggestBox, and there are DTO-s in list. When a user selects items with up and down key, I need to get the selected element to display all data of DTO item on a detail form. It seems to be, there are not a standard event for this. How can I implement this functionality? I need some tips, not a full solving. I can't inherit SUggestbox, because popup panel is private. Can I make an own SuggestBox? Unfortunately it depends on Menubar, because it using protected methods of Menubar:( thx a lot Zamek --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Understanding KeyUpEvent
Hi all I would like to know when a user releases any key on the keyboard, and thought I should use the KeyUpHandler for this. But when I do something like addKeyUpHandler(new KeyUpHandler(){ @Override public void onKeyUp(KeyUpEvent event) { Log.debug(key went up! + event.getNativeKeyCode()); } }); the onKeyUp method is NEVER called when any key is released, but ALWAYS for as long as any key is pressed down. I expected the opposite to happen. Could someone please enlighten me on how to capture the fact that a key was released? I'm using 1.6.4. Many thanks from a very confused Nina --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
DatePicker and keyboard navigation?
Hello there Does anyone know if it's possible, or will be a future feature, to have keyboard support for the DatePicker widget? It would be nice if you could use the tab key to give it focus, arrow keys for navigation and enter or space for selection. Thanks Nina --~--~-~--~~~---~--~~ 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 1.4 DisclosurePanel Horizontal Orientation
Just a note to others who may have the same need: I found http://code.google.com/p/gwt-majic/ very useful. It does sliding, fading and other handy things. It's easy to use and the demo worked out of the box straight in Eclipse. Cheers Nina On Dec 16, 10:29 am, nina juliadot...@gmail.com wrote: I also need the functionality of the DisclosurePanel but one that opens horizontally, i.e. left to right. Does anyone know what the easiest way to achieve this is? Is there another way that doesn't use the DisclosurePanel perhaps, like writing my own animation? Many thanks Nina On Dec 12, 8:00 am, nickle nbleibt...@hotmail.com wrote: I need aDisclosurePanelthat opens horizantally not vertically. Questions: 1. Can this be done through CSS without using rotated images? 2. AsDisclosurePanelis final; how would one add this functionality besides coping the source from the trunk and rebuilding your own widget? thanks nick --~--~-~--~~~---~--~~ 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 1.4 DisclosurePanel Horizontal Orientation
I also need the functionality of the DisclosurePanel but one that opens horizontally, i.e. left to right. Does anyone know what the easiest way to achieve this is? Is there another way that doesn't use the DisclosurePanel perhaps, like writing my own animation? Many thanks Nina On Dec 12, 8:00 am, nickle nbleibt...@hotmail.com wrote: I need aDisclosurePanelthat opens horizantally not vertically. Questions: 1. Can this be done through CSS without using rotated images? 2. AsDisclosurePanelis final; how would one add this functionality besides coping the source from the trunk and rebuilding your own widget? thanks nick --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Padding in FlexTable/HTMLTable leaves rows behind on removeRow()
I have a FlexTable that the user can add and remove rows from. However, I have noticed that when I have any cell padding at all, this padding is left behind when I call removeRow(rowNo). This is particularly noticeable when the user has added a few rows and then removes all of them (one by one): there is a big white space left, which wasn't there before the rows were added and removed. If I call setCellPadding(0), this problem goes away. I have inspected the html using Firebug, and the white spaces left behind are empty tds inside trs. Has anyone else had this problem? Am I doing something the wrong way, or is this a bug? Thanks Nina --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---