public void showPreview(String uuid, String versionAsString) {

        final CmsUUID id = new CmsUUID(uuid);
        final CmsHistoryVersion version = CmsHistoryVersion.fromString(versionAsString);

        CmsRpcAction<CmsPreviewInfo> previewAction = new CmsRpcAction<CmsPreviewInfo>() {

            @Override
            public void execute() {

                start(0, true);
                CmsCoreProvider.getVfsService().getHistoryPreviewInfo(
                    id,
                    CmsCoreProvider.get().getLocale(),
                    version,
                    this);
            }

            @Override
            protected void onResponse(CmsPreviewInfo result) {

                stop(false);
                CmsPreviewDialog dialog = CmsPreviewDialog.createPreviewDialog(result);
                dialog.setPreviewInfoProvider(new I_PreviewInfoProvider() {

                    public void loadPreviewForLocale(String locale, AsyncCallback<CmsPreviewInfo> resultCallback) {

                        CmsCoreProvider.getVfsService().getHistoryPreviewInfo(id, locale, version, resultCallback);
                    }
                });

                dialog.center();
            }
        };
        previewAction.execute();
    }
public void showPreview ( String uuid , String versionAsString ) { final CmsUUID id = new CmsUUID ( uuid ) ; final CmsHistoryVersion version = CmsHistoryVersion . fromString ( versionAsString ) ; CmsRpcAction < CmsPreviewInfo > previewAction = new CmsRpcAction < CmsPreviewInfo > ( ) { @ Override public void execute ( ) { start ( 0 , true ) ; CmsCoreProvider . getVfsService ( ) . getHistoryPreviewInfo ( id , CmsCoreProvider . get ( ) . getLocale ( ) , version , this ) ; } @ Override protected void onResponse ( CmsPreviewInfo result ) { stop ( false ) ; CmsPreviewDialog dialog = CmsPreviewDialog . createPreviewDialog ( result ) ; dialog . setPreviewInfoProvider ( new I_PreviewInfoProvider ( ) { public void loadPreviewForLocale ( String locale , AsyncCallback < CmsPreviewInfo > resultCallback ) { CmsCoreProvider . getVfsService ( ) . getHistoryPreviewInfo ( id , locale , version , resultCallback ) ; } } ) ; dialog . center ( ) ; } } ; previewAction . execute ( ) ; }
@see org.opencms.ui.shared.components.I_CmsGwtDialogClientRpc#showPreview(java.lang.String, java.lang.String)