tileGrid.addRecordClickHandler(new RecordClickHandler() {
public void onRecordClick(RecordClickEvent event) {
event.getRecord(); //here is the exception
getRecord() hase only one return method…
com.smartgwt.client.widgets.grid.ListGridRecord getRecord();
but my record class :public class ImgRecord extends TileRecord{
I take it from example.. if i extends it from ListGridRecord, the tile dosnt show anything.
How to get clicked record from tileGrid?
I added the following code to the showcase example (BasicTilingSample.java in the package com.smartgwt.sample.showcase.client.tiling) and it worked for me ) NOTE: For some reason, the messageboard software is inserting a space between the “c” and the “k” in the import statements below…obviously there should not be any spaces :
C’mon … isn’t it obvious ? Since it seems to always insert a space after exactly 50 non-whitespace characters, I would dare to say it does it on purpose to keep us from breaking the forum layout with overly long non-wrappable words, which are supposed to appear inside [ CODE ]-Tags only.
Uncaught JavaScript exception [java.lang.ClassCastException: com.smartgwt.sample.showcase.client.data.CarRecord cannot be cast to com.smartgwt.client.widgets.grid.ListGridRecord
at com.smartgwt.client.widgets.grid.ListGridRecord.getOrCreateRef(ListGridRecord.java:68)
at com.smartgwt.client.widgets.tile.events.RecordClickEvent.getRecord(Native Method)
at test.gwt.client.Upload$2.onRecordClick(Upload.java:118)
public class CarRecord extends TileRecord { TileRecord can’t be cast to ListGridRecord.
I’m using latest nightly build of smartGWT
PS: javaDocs is very pure.. it’s available not for all classes…
PPS: where can I get SVN with smart-gwt sources?