Take a look at AbstractEditableCell#clearViewData(Obect
key)<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/AbstractEditableCell.html#clearViewData%28java.lang.Object%29>

EditTextCell automatically recognizes when the pending value becomes the
actual value (successful commit).  If it fails, you have to revert the value
manually by clearing the ViewData, which contains the pending value.  The
key in this case is the key associated with the value you are editing.  If
you do not specify a KeyProvider, the key is the value itself.


John LaBanca | GWT Software Engineer | [email protected]



On Mon, Aug 1, 2011 at 2:24 PM, vaibhav bhalke <[email protected]>wrote:

> Hi,
>
> I want to used editableNumbercell like intger,decimal etc.. But there
> is no such gwt widget present so I am using editable text cell and
> using validation for numbers when user update value in cell.
>
> Problem is that if validation fail then editabletext cell value
> restored to old value.
>
> intgerColumn.setFieldUpdater(new FieldUpdater<RecordInfo, String>() {
>        public void update(int index, RecordInfo object, String value) {
>            // Called when the user changes the value.
>            if(value.matches("(-)?(\\d){1,8}")){
>                object.setColumnInRecordEdited(true);
>                object.setValue(value);
>                RecordData.get().refreshDisplays();
>            }else{
>                Window.alert("Specify valid integer value for parameter");
>                // How to reset old value here? currently updated
> value immediately set to cell
>
>            }
>
>        }
>    });
>
> Any help or guidance in this matter would be appreciated.
>
> --
> Best Regards,
> Vaibhav
>
> --
> 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.
>
>

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