Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.drools.guvnor.client.explorer;
 
public class ModuleFormatsGridPlace extends Activity {
    private final ClientFactory clientFactory;
                                  ClientFactory clientFactory) {
        this. = moduleFormatsGridPlace;
        this. = clientFactory;
    }
    private String key() {
        if ( .getFormats().length == 0 ) {
            keyBuilder.append"[0]" );
        } else {
            for (String format : .getFormats()) {
                keyBuilder.appendformat );
            }
        }
        return keyBuilder.toString();
    }
    @Override
    public void start(AcceptItem tabbedPanel,
                      EventBus eventBus) {
        openPackageViewAssets(
                tabbedPanel,
                .getPackageConfigData().getUuid(),
                .getPackageConfigData().getName(),
                key(),
                .getFormats().length == 0 ? null : Arrays.asList.getFormats() ),
                .getFormats().length == 0 ? . : null,
                .getTitle() );
    }
    private void openPackageViewAssets(AcceptItem tabbedPanel,
                                       final String packageUuid,
                                       final String packageName,
                                       String key,
                                       final List<StringformatInList,
                                       Boolean formatIsRegistered,
                                       final String itemName) {
        String feedUrl = GWT.getModuleBaseURL()
                + "feed/package?name="
                + packageName
                + "&viewUrl="
                + Util.getSelfURL()
                + "&status=*";
        final AssetPagedTable table = new AssetPagedTable(
                packageUuid,
                formatInList,
                formatIsRegistered,
                feedUrl,
                 );
        tabbedPanel.additemName
                + " ["
                + packageName
                + "]",
                table );
        final ServerPushNotification sub = new ServerPushNotification() {
            public void messageReceived(PushResponse response) {
                if ( response.messageType.equals"packageChange" )
                        && response.message.equalspackageName ) ) {
                    table.refresh();
                }
            }
        };
        PushClient.instance().subscribesub );
        table.addUnloadListenernew Command() {
            public void execute() {
                PushClient.instance().unsubscribesub );
            }
        } );
    }
New to GrepCode? Check out our FAQ X