Re: Strange Validation Error when using UiBinder with images in Google Plugin for Eclipse
Thanks, Jason!
but the link appears to be broken, I got
"The requested URL /p/google-web-toolkit/issues/detail?can=2&q=4397
was not found on this server."
when tried starring the issue.
best regards
Fábio.
On 21 dez, 14:50, Jason Parekh <jasonpar...@gmail.com> wrote:
> Hi Fábio,
>
> Definitely a bug, thanks for posting about this issue.
>
> A workaround is to "import
> com.google.gwt.resources.client.ImageResource;" in your View.java.
>
> The problem is we find the logo() method in the superinterface of
> Images, but when we go to look up the method's return type, we try to
> resolve ImageResource in the context of the Images type. This fails
> (since it is not imported in View.java), and we post a problem marker.
> This will be fixed in the next release.
>
> Opened issuehttp://code.google.com/p/google-web-toolkit/issues/detail?can=2&q=4397
>
> Thanks,
> jason
>
>
>
> On Mon, Dec 21, 2009 at 10:49 AM, Fabio <fabio.it...@gmail.com> wrote:
> > Hi,
>
> > I have two interfaces:
>
> > public interface Banners extends ClientBundle {
> > ImageResource logo();
> > ImageResource guj();
> > }
>
> > public interface Icons extends ClientBundle {
> > ImageResource br();
> > ImageResource us();
> > }
>
> > In the main class, I group them together under a single interface:
>
> > public class View {
> > ...
> > public static interface Images extends Banners, Icons { }
> > ...
> > }
>
> > In ui.xml, I use them:
>
> > <ui:with field='images' type='java.client.View.Images' />
> > <g:HTMLPanel>
> > <g:Image resource='{images.logo}' /> // error
> > <g:Image resource='{images.guj}' /> // error
> > </g:HTMLPanel>
>
> > The app runs normally, but GPE highlights the following errors:
> > "Method logo is undefined" and "Method guj is undefined". Is this some
> > type of bug or am I missing something?
>
> > May be important to say the same technique works fine with Messages,
> > no error is highlighted:
>
> > <ui:with field='messages' type='java.client.View.Messages' />
> > ...
> > <g:HTML text='{messages.heading}' /> // no error
>
> > Thanks in advance,
> > Fábio Miranda.
>
> > --
>
> > 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+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home