/** * Fires a open event on all registered handlers in the handler manager.If no * such handlers exist, this method will do nothing. * * @param <S> The event source * @param source the source of the handlers * @param jsObj the native event */ public static <S extends HasRecordDoubleClickHandlers & HasHandlers> void fire( S source, JavaScriptObject jsObj) { if (TYPE != null) { RecordDoubleClickEvent event = new RecordDoubleClickEvent(jsObj); source.fireEvent(event); } }
/** * Add a recordDoubleClick handler. * <p> * Executed when the listGrid receives a 'doubleClick' event on an enabled, non-separator record. The default * implementation does nothing -- override to perform some action when any record or field is double clicked.<br> A record * event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is * defined as a string of script, all the parameters below will be available as variables for use in the script.<br> To do * something specific if a particular field is double clicked, add a recordDoubleClick method or string of script to that * field (same parameters) when you're setting up the list.<br> <b>Notes:</b><ul> <li>This will not be called if the click * is below the last item of the list.</li> <li>This method is called from the default implementation of {@link * com.smartgwt.client.widgets.grid.ListGrid#rowDoubleClick ListGrid.rowDoubleClick}, so if that method is overridden this * method may not be fired.</li></ul> * * @param handler the recordDoubleClick handler * @return {@link HandlerRegistration} used to remove this handler */ public HandlerRegistration addRecordDoubleClickHandler(com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent.getType()) == 0) setupRecordDoubleClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent.getType()); }
public void onRecordDoubleClick(RecordDoubleClickEvent event) { String id = event.getRecord().getAttribute(FLD_GEODESKID); //FIXME: preview URL String url = GeodeskUrlUtil.createPreviewUrl(id); com.google.gwt.user.client.Window.open(url, "_blank", null); } });