Monday, January 12, 2015

Re: JSNI - how to reference a CSS client bundle?

Hey Magnus

are you got the solution ?

because i am stick at some point in jsni. I try to get the gwtbutton css from Resource interface but it not call

public native void jsni() 
/*-{
var lib = @com.ruchi.bundle.client.Resource::INSTANCE;
  var style = lib.@com.ruchi.bundle.client.Resource.MyCssResource::gwtbutton();
var sroot = $doc.getElementById("container");
sroot.className=style;
}-*/; 



public interface Resource extends ClientBundle {
public interface MyCssResource extends CssResource{
String gwtbutton();
}

public static Resource INSTANCE = GWT.create(Resource.class);
@Source("com/ruchi/bundle/css/button.css")
MyCssResource button();

}

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment