Created issue
http://code.google.com/p/google-web-toolkit/issues/detail?id=4075

Thanks!

--Sri


2009/9/24 Ray Ryan <rj...@google.com>

> That's a flat out bug. Would you mind putting something on the issue
> tracker?
>
>
> On Thu, Sep 24, 2009 at 11:48 AM, Sripathi Krishnan <
> sripathi.krish...@gmail.com> wrote:
>
>> I have a custom widget which has a constructor with some fields.
>>
>> class HelpWidget extends Composite {
>>    //usual interface declaration for UiBinder
>>
>>     public HelpWidget(HandlerManager eventBus) {
>>       .....
>>        initWidget(uibinder.createAndBindUi(this);
>>     }
>> }
>>
>> Now, I have another widget which includes HelpWidget in its ui.xml
>>
>> In PageLayout.ui.xml
>> ------------------------------
>> <gwt:HTMLPanel>
>>      <custom:HelpWidget ui:field="helpWidget_" />
>> </gwt:HTMLPanel>
>>
>>
>> In PageLayout.java
>> ----------------------------
>> ..
>>
>> @UiField (provided = true)
>> HelpWidget helpWidget_;
>>
>> public PageLayout() {
>>    HandlerManager eventBus = new HandlerManager();
>>    helpWidget_ = new HelpWidget(eventBus);
>> }
>>
>> Note that I am instantiating the HelpWidget myself, and I am annotating it
>> with provided = true.
>>
>> But when I compile, GWTC complains saying that HelpWidget "must have a
>> default constructor, or must annotate the constructor with @UiConstructor".
>> If I annotate the constructor with @UiField, it complains that eventBus
>> parameter must be provided.
>>
>>
>> If I am taking care of object creation, then UiBinder shouldn't complain
>> about the constructor, right?
>>
>> --Sri
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to