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 <
[email protected]> 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