Thanks Thomas and Sripathi for you replies. Yes it is working for me now. I followed the second approach i.e. @UiFactory.
I will now try with the first and third options. -Thanks On Apr 14, 3:21 pm, Sripathi Krishnan <[email protected]> wrote: > > Does this mean that we can mix both the declarative UI and programmatic Ui > > code which is written in earlier versions of GWT2.0. > > Yes, you absolutely can. > > The code you pasted is doing exactly that. MyImageButton is a "pre-GWT2.0 > programmatic widget". Its not working because you are not providing UpImage > parameter (which you have defined in your constructor). Thomas' email above > explains how to set the upImage attribute. > > If the upImage attribute is causing the confusion, change your constructor > like this and then try - > public @UiConstructor MyImageButton() { > super("My Custom Button"); > } > > Once you get a hang of custom widgets work, just follow Thomas' advice to > pass images to your constructor. > > --Sri > > On 14 April 2010 14:53, San <[email protected]> wrote: > > > Hi Thomas, > > > Thanks for reply. > > > Yes you never said that the MyImageButton also should be created using > > UIBinder or it should have the ui.xml. > > > Please clear me if I am wrong. > > > Does this mean that we can mix both the declarative UI and > > programmatic Ui code which is written in earlier versions of GWT2.0. > > > It will be helpful for me if you can guide me to any such example or > > tutorial > > > -Thanks > > > On Apr 14, 1:58 pm, Thomas Broyer <[email protected]> wrote: > > > On Apr 13, 12:45 pm, San <[email protected]> wrote: > > > > > Hi Thomas, > > > > > Thanks for your help. > > > > I think i just did something wrong when I posted above message with > > > > the code snipet in it. > > > > > Actually I am not havingUIBinderxml for the MyImageButton class. > > > > Did I ever implied it?! > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-web-toolkit%[email protected]> > > . > > 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 [email protected]. 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.
