1

我在我的 GWT 应用程序中使用了 uniform.js。我需要以图表方式更改选择项的值。但是,小部件似乎没有更新。我知道这可以使用更新

$.uniform.update();

但是,我怎样才能在 GWT 中做到这一点?

4

2 回答 2

1

嗨我有类似的问题。我尝试了下面的 JSNI。它对我有用。

 $wnd.jQuery(".checker span").each(function(){
 if(!$wnd.jQuery(this).parent().find("input:checkbox").is(':checked'))
 {
 $wnd.jQuery(this).removeClass("checked"); 
 }
 });

 $wnd.jQuery(".selector span").each(function(){
 $wnd.jQuery(this).html($wnd.jQuery(this).parent().find(":selected").text());
 });
于 2013-03-17T07:11:53.367 回答
0

是的。您可以使用 JSNI从 gwt 与 jquery 联系。

尝试使用这个

public static native void update() /*-{
  $wnd$.uniform.update();
}-*/; 

或喜欢

public static native void update() /*-{
     $wnd.jQuery.uniform.update();
    }-*/; 

GWT并在你的类 中调用静态方法 update()

于 2013-03-12T06:35:53.083 回答