I am using GWT CellTable 2.1.
How to override OnBrowseEvent for Custom EditTextCell
(NumberCell,CustomStringCell etc..)?
In my CustomStringCell, I want to avoid space only at Initial position(1st
index) How to do?
I tried following way
@Override
public void onBrowserEvent(Context context, Element parent,
String value, NativeEvent event,
ValueUpdater<String> valueUpdater) {
super.onBrowserEvent(context, parent, value, event, valueUpdater);
boolean isEditing = isEditing(context, parent, value);
if(isEditing){
if(event!=null){
info(" event.getKeyCode() = "+event.getKeyCode()+"
:: value ="+value);
if(event.getKeyCode()==32){
event.preventDefault();
return;
}
}
}
}
Current behavior using above code : User cant edit space at all *
------------------------------------------------------------------------------------------
*
*In Case of CustomStringCell:*
*Expected* : @User should not edit space at 1st index of textString. *
_myString* is not allowed in CustomStringCell.
@User should use space between string like *Record_ID* or *
Google_Search_Engine* (Consider _ as space)
*How can I achieve this in OnBrowseEvent of CustomStringCell?*
*
----------------------------------------------------------------------------------------
*
*In Case of CustomNumberCell :*
Suppose my data type is Decimal.
OnBrowseEvent of CustomNumberCell I allowed only keycode of numbers[0-9],
backspace and dot ('*.*')
I want to allow only one dot ('*.*') in decimal
*Not allowed :* *_234* , *.123* , *13.223.23* , *123...23.23*
*How can I achieve in OnBrowseEvent of CustomNumberCell?*
*How to get new value from cell after each keypress ?*
*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.