I have the following code in a listgrid, to show a twitter button in a listgrid column. This works in FF, Safari and Chrome
Build: Smart GWT Power / Nightly build 13-12-2010
But on IE8, I don't see the image.
My code:
the connected datasource field looks like this:
Build: Smart GWT Power / Nightly build 13-12-2010
But on IE8, I don't see the image.
My code:
Code:
//instance variable
final ListGrid grid = new ListGrid() {
/** not relevant for the bug, since it acts on different column, but pasted here for completion */
@Override
protected String getCellCSSText(ListGridRecord record, int rowNum,
int colNum) {
final String fieldName = this.getFieldName(colNum);
if (fieldName.equals("Colour")) {
String code = record.getAttribute("Colour");
return "background-color: " + code + "; color: " + code + ;";
}
return "";
}
};
protected void init() {
...
grid.setWidth100();
grid.setHeight100();
grid.setAlternateRecordStyles(true);
grid.setCellHeight(22);
grid.setDataSource(dataSource);
grid.setAutoFetchData(false);
grid.setCanEdit(true);
grid.setModalEditing(true);
grid.setShowFilterEditor(true);
grid.setDoubleClickDelay(100);
grid.setEditEvent(ListGridEditEvent.DOUBLECLICK);
grid.setListEndEditAction(RowEndEditAction.NEXT);
grid.setCanRemoveRecords(true);
grid.setAutoSaveEdits(true);
grid.setShowRecordComponents(true);
grid.setShowRecordComponentsByCell(true);
grid.setRecordComponentHeight(22);
...
TwitterField.setShowHover(false);
TwitterField.setCanEdit(false); //twitter fields cannot be edited.
TwitterField.setWidth(22);
TwitterField.setCanDragResize(false);
TwitterField.setIcon("twitter-icon.png");
grid.addCellClickHandler(new CellClickHandler() {
public void onCellClick(CellClickEvent event) {
final ListGridRecord record = event.getRecord();
final String fieldName = grid.getFieldName(event.getColNum());
if ("Twitter".equals(fieldName)) {
FlavourTwitterTweetWindow w = new FlavourTwitterTweetWindow(
record, fieldName);
w.show();
w.bringToFront();
}
}
});
}
Code:
<field name="Twitter" title="Twitter" type="icon" required="false" />
Comment