Boolean formatIsRegistered,
final String itemName) {
if ( !explorerViewCenterPanel.showIfOpen( key ) ) {
String feedUrl = GWT.getModuleBaseURL() + "feed/package?name=" + packageName + "&viewUrl=" + Util.getSelfURL() + "&status=*";
final AssetTable table = new AssetTable( packageUuid,
formatInList,
formatIsRegistered,
new OpenItemCommand() {
public void open(String uuid) {
openAsset( uuid );
}
public void open(MultiViewRow[] rows) {
openAssetsToMultiView( rows );
}
},
feedUrl );
explorerViewCenterPanel.addTab( itemName + " [" + packageName + "]",
table,
key );
final ServerPushNotification sub = new ServerPushNotification() {
public void messageReceived(PushResponse response) {
if ( response.messageType.equals( "packageChange" ) && response.message.equals( packageName ) ) {
table.refresh();
}
}
};
PushClient.instance().subscribe( sub );
table.addUnloadListener( new Command() {
public void execute() {
PushClient.instance().unsubscribe( sub );
}
} );
}