Comment by gal.dolber:

Hi guys!

I coudn't get this
{{{<g:Image resource='{res.logoImage}'>}}}
working and I realy like ImageBundle so here is a tip to use ImageResource  
and ImageBundle with UiBinder

{{{
package com.google.gwt.user.client.ui;

import com.google.gwt.resources.client.ImageResource;

public class UiImage extends Image {

        public void setResource(ImageResource resource) {
                setUrl(resource.getURL());
                setWidth(resource.getWidth() + "px");
                setHeight(resource.getHeight() + "px");
        }
        
        public void setBundle(AbstractImagePrototype prototype) {
                prototype.applyTo(this);
        }
}
}}}

{{{
<ui:with field='resources' type='com.gwt.test.client.ColorPickerResources'/>
<ui:with field='bundle' type='com.gwt.test.client.ColorPickerBundle'/>

<g:FlowPanel>
   <g:UiImage resource='{resources.marker}'></g:UiImage>
   <g:UiImage bundle='{bundle.marker}'></g:UiImage>
</g:FlowPanel>
}}}


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UiBinder

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

Reply via email to