Hi,
I'm upgrading to 4.0 (from 3.1) and I have a problem with SelectItem on fetchData(DSCallback callback)
the problem back since March 3, changing SelectItem.java
24 févr. 11:30 130224/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
3 mars 12:34 130303/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
diff 130224/src/com/smartgwt/client/widgets/form/fields/SelectItem.java 130303/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
1074a1075,1081
> * @see {@link SelectItem#fetchData()}
> */
> public void fetchData(DSCallback callback){
> fetchData(callback,null);
> }
>
> /**
1601,1614d1607
<
<
< /**
< * @see SelectItem#fetchData()
< * @see SelectItem#fetchData(com.smartgwt.client.data.DSCallback, DSRequest)
< */
< public native void fetchData(DSCallback callback) /*-{
< var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
< self.fetchData($entry(function (item, dsResponse, data, dsRequest) {
< var responseJ = @com.smartgwt.client.data.DSResponse::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsResponse);
< var requestJ = @com.smartgwt.client.data.DSRequest::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsRequest);
< if(callback != null) callback.@com.smartgwt.client.data.DSCallback::execute(Lcom/smartgwt/client/data/DSResponse;Ljava/lang/Object;Lcom/smartgwt/client/data/DSRequest;)(responseJ, data, requestJ);
< }));
< }-*/;
A workaround :
itemCol = new SelectItem("coloris_article_code") {
public native void fetchData(DSCallback callback, DSRequest requestProperties) /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
self.fetchData(
$entry( function(item,dsResponse,data,dsRequest) {
if(callback!=null) callback.@com.smartgwt.client.data.DSCallback::execute(Lcom/smartgwt/client/data/DSResponse;Ljava/lang/Object;Lcom/smartgwt/client/data/DSRequest;)(
@com.smartgwt.client.data.DSResponse::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsResponse), data,
@com.smartgwt.client.data.DSRequest::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsRequest)
);
}), requestProperties == null ? null : requestProperties.@com.smartgwt.client.core.DataClass::getJsObj()());
}-*/;
};
Gwt 2.5.1
Smartgwt-4.0p (build 2013-07-12)
Firefox 22 (Dev mode)
Best Regards,
Regis
I'm upgrading to 4.0 (from 3.1) and I have a problem with SelectItem on fetchData(DSCallback callback)
the problem back since March 3, changing SelectItem.java
24 févr. 11:30 130224/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
3 mars 12:34 130303/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
diff 130224/src/com/smartgwt/client/widgets/form/fields/SelectItem.java 130303/src/com/smartgwt/client/widgets/form/fields/SelectItem.java
1074a1075,1081
> * @see {@link SelectItem#fetchData()}
> */
> public void fetchData(DSCallback callback){
> fetchData(callback,null);
> }
>
> /**
1601,1614d1607
<
<
< /**
< * @see SelectItem#fetchData()
< * @see SelectItem#fetchData(com.smartgwt.client.data.DSCallback, DSRequest)
< */
< public native void fetchData(DSCallback callback) /*-{
< var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
< self.fetchData($entry(function (item, dsResponse, data, dsRequest) {
< var responseJ = @com.smartgwt.client.data.DSResponse::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsResponse);
< var requestJ = @com.smartgwt.client.data.DSRequest::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsRequest);
< if(callback != null) callback.@com.smartgwt.client.data.DSCallback::execute(Lcom/smartgwt/client/data/DSResponse;Ljava/lang/Object;Lcom/smartgwt/client/data/DSRequest;)(responseJ, data, requestJ);
< }));
< }-*/;
A workaround :
itemCol = new SelectItem("coloris_article_code") {
public native void fetchData(DSCallback callback, DSRequest requestProperties) /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
self.fetchData(
$entry( function(item,dsResponse,data,dsRequest) {
if(callback!=null) callback.@com.smartgwt.client.data.DSCallback::execute(Lcom/smartgwt/client/data/DSResponse;Ljava/lang/Object;Lcom/smartgwt/client/data/DSRequest;)(
@com.smartgwt.client.data.DSResponse::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsResponse), data,
@com.smartgwt.client.data.DSRequest::new(Lcom/google/gwt/core/client/JavaScriptObject;)(dsRequest)
);
}), requestProperties == null ? null : requestProperties.@com.smartgwt.client.core.DataClass::getJsObj()());
}-*/;
};
Gwt 2.5.1
Smartgwt-4.0p (build 2013-07-12)
Firefox 22 (Dev mode)
Best Regards,
Regis
Comment