params.put("action", "editApp");
params.put("url", metaData.getGadgetDefinition().getUrl());
params.put("category", metaData.getGadgetDefinition().getCategory().toString());
params.put("id", String.valueOf(metaData.getGadgetDefinition().getId()));
params.put("tab", Session.getInstance().getParameterValue("tab"));
final WidgetJSNIFacadeImpl jsni = new WidgetJSNIFacadeImpl();
editControls.addEditClickHandler(new ClickHandler()
{
public void onClick(final ClickEvent event)
{
jsni.setHistoryToken(Session.getInstance().generateUrl(
new CreateUrlRequest(Page.GALLERY, params)), true);
}
});
}
this.add(editControls);
editControls.addDeleteClickHandler(new ClickHandler()
{
public void onClick(final ClickEvent event)
{
if (new WidgetJSNIFacadeImpl().confirm(deleteMessage))
{
model.delete(metaData.getGadgetDefinition().getId());
Session.getInstance().getEventBus()
.notifyObservers(