public static <T extends ClientWidgetInfo> T getClientWidgetInfo(String id, MapWidget mapWidget) {
if (mapWidget != null) {
if (mapWidget.getMapModel().getMapInfo() == null) {
GWT.log("MapInfo not found, has mapWidget been initialized?");
}
ClientWidgetInfo cli = mapWidget.getMapModel().getMapInfo().getWidgetInfo(id);
if (cli != null) {
try {
// cannot check because of type erasure
return (T) cli;
} catch (Exception e) {