PDA

View Full Version : tooltip to every item in duallistfield



pkarnati
11 Jan 2010, 3:03 PM
Hi,
Any ideas on how to show/set tooltip for each item in from and to list of duallistfield in gxt.code that is not working is

to.getListView().addListener(Events.OnMouseOver, new Listener<ComponentEvent>(){
@Override
public void handleEvent(ComponentEvent be) {
MessageBox.alert("Alert","mouse over", null);
ListViewEvent le = (ListViewEvent) be;
if(le.getIndex()!= -1){
LocationsObject temp = (LocationsObject)toData.get(le.getIndex());
MessageBox.alert("Alert","Object name"+temp.getName(), null);
String innerHTML = to.getListView().getElement(le.getIndex()).getInnerHTML();
String html = "<span qtitle=\"Georgia Message\" qtip=\"Testing\" class='invalidRow'>"
+ (innerHTML != null ? innerHTML : "") + "</span>";
to.getListView().getElement(le.getIndex()).setInnerHTML(html);
// be.getTargetEl().dom.setInnerHTML(html);
}
}
});

thanks in advance