GWT -- Retain search text value in html text box after filtering in cell table -
i created custom header cell table in gwt. consists of filter text box , below column name. able filter column data. not able retain search text after filtering cell table. text box becoming empty after filtering. have used html text box in header. please me retain search text value after filtering cell table. have added code below onbrowserevent... @override public void onbrowserevent(context context, element elem, nativeevent event) { super.onbrowserevent(context, elem, event);
int eventtype = event.getkeycode(); if (eventtype == keycodes.key_enter) { inputelement inputelement = getinputelement(elem); setvalue(inputelement.getvalue()); if(filterhandler != null){ filterhandler.onfilter(getvalue()); } inputelement.setattribute("value", inputelement.getvalue()); //event.preventdefault(); } } protected inputelement getinputelement(element parent) { element elem = parent.getelementsbytagname("input").getitem(0); assert (elem.getclass() == inputelement.class); return elem.cast(); }
have column's header
return search query getvalue
, it'll passed cell's render()
method.
Comments
Post a Comment