you can see the code below,
the code displays the image (homeIcon),
but the css style is not applied (to my link for example)

public interface MyResources extends ClientBundle {
  @Source("style.css")
  Style css();

  @Source("homeIcon.png")
  ImageResource homeIcon();

  public interface Style extends CssResource {
      String foo();
  }
}

this is style.css, in the same package as resources,
homeIcon.png is also located in the same package

.foo {
    font-size:10em;
    color:red;
    font-weight:bold;
    width:40em;
    background-color:green;
    text-decoration: none;
}

UiBinder:
<ui:with field='res' type='package.to.client.style.MyResources'/>

<g:HTMLPanel >
        <g:InlineHyperlink text="Home" targetHistoryToken="home"  
styleName="{res.css.foo}"/> 
        <g:Image resource="{res.homeIcon}" />
</g:HTMLPanel>

//this styleName="{res.css.foo}" is marked as RED in my IDE,
and when running the app, it is not applied,
however I can see the image.


java file corresponding to this UiBinder template:
public class MenuWidget  extends Composite {

    public interface Binder extends UiBinder<Widget, MenuWidget> {}


    @Inject
    public MenuWidget(final Binder uiBinder) {
        initWidget(uiBinder.createAndBindUi(this));
    }

}

I am not calling ensureInjected anywhere, could it be that ?
where should I call it ? my JavaCode which backs the UiBinder at this point 
does nothing.
you can see the code.

do you have any idea what i am missing ?

Thank You

-- 
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.

Reply via email to