is there an interface like listgrid to customize the form item value?
i have a dynamic form. i bind it with a datasource. one field is integer. when i show the value, i would like to times 100.
for instance, the value is 0.101, i would like to display it as 10.1.
please help. many thanks
i rewrite Integer item, but it does not work. the following is my code
public class MyFormItem extends IntegerItem{
public native Integer getValueAsInteger() /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
var ret;
if(self.setValue) {
ret = self.getValue();
} else {
ret = self.value;
}
return @com.smartgwt.client.util.JSOHelper::toInteger(I)(ret) * 100;
}-*/;
public native Object getValue() /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
var ret;
if(self.setValue) {
ret = self.getValue();
} else {
ret = self.value;
}
return $wnd.SmartGWT.convertToJavaType(ret) * 100;
}-*/;
}
i have a dynamic form. i bind it with a datasource. one field is integer. when i show the value, i would like to times 100.
for instance, the value is 0.101, i would like to display it as 10.1.
please help. many thanks
i rewrite Integer item, but it does not work. the following is my code
public class MyFormItem extends IntegerItem{
public native Integer getValueAsInteger() /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
var ret;
if(self.setValue) {
ret = self.getValue();
} else {
ret = self.value;
}
return @com.smartgwt.client.util.JSOHelper::toInteger(I)(ret) * 100;
}-*/;
public native Object getValue() /*-{
var self = this.@com.smartgwt.client.core.DataClass::getJsObj()();
var ret;
if(self.setValue) {
ret = self.getValue();
} else {
ret = self.value;
}
return $wnd.SmartGWT.convertToJavaType(ret) * 100;
}-*/;
}
Comment