confirmBox.setTitle( BaseMessages.getString( PKG, "ConfirmDialog.Title" ) );//$NON-NLS-1$ confirmBox.setMessage( BaseMessages.getString( PKG, "RemoveRoleConfirmDialog.Message" ) );//$NON-NLS-1$ confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$ confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) );//$NON-NLS-1$ confirmBox.addDialogCallback( new XulDialogCallback<Object>() { confirmBox.open();
/** * removeAcl method is called when the user select a or a list of acls to remove from the list. It first display a * confirmation box to the user asking to confirm the removal. If the user selected ok, it deletes selected acls from * the list * * @throws Exception */ public void removeAcl() throws Exception { confirmBox.open(); }
confirmBox.setTitle( BaseMessages.getString( PKG, "ConfirmDialog.Title" ) ); confirmBox.setMessage( BaseMessages.getString( PKG, "RemoveUserConfirmDialog.Message" ) ); confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) ); confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) ); confirmBox.addDialogCallback( new XulDialogCallback<Object>() { confirmBox.open();
confirmBox.setTitle( BaseMessages.getString( PKG, "TrashBrowseController.DeleteHomeFolderWarningTitle" ) ); //$NON-NLS-1$ confirmBox.setMessage( BaseMessages.getString( PKG, "TrashBrowseController.DeleteHomeFolderWarningMessage" ) ); //$NON-NLS-1$ confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) ); //$NON-NLS-1$ confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) ); //$NON-NLS-1$ confirmBox.addDialogCallback( new XulDialogCallback<Object>() { confirmBox.open(); } catch ( Exception e ) { if ( mainController == null || !mainController.handleLostRepository( e ) ) {
final RepositoryMeta repositoryMeta = input.searchRepository( model.getSelectedRepository().getName() ); if ( repositoryMeta != null ) { confirmBox.setTitle( BaseMessages.getString( PKG, "RepositoryLogin.ConfirmDeleteRepositoryDialog.Title" ) ); confirmBox.setMessage( BaseMessages.getString( PKG, "RepositoryLogin.ConfirmDeleteRepositoryDialog.Message" ) ); confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) ); confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) ); confirmBox.addDialogCallback( new XulDialogCallback<Object>() { confirmBox.open();
confirmBox.setTitle( BaseMessages.getString( PKG, "PermissionsController.ContextChangeWarning" ) ); //$NON-NLS-1$ confirmBox.setMessage( BaseMessages.getString( PKG, "PermissionsController.ContextChangeWarningText" ) ); //$NON-NLS-1$ confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Yes" ) ); //$NON-NLS-1$ confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.No" ) ); //$NON-NLS-1$ confirmBox.addDialogCallback( new XulDialogCallback<Object>() { public void onClose( XulComponent sender, Status returnCode, Object retVal ) { if ( returnCode == Status.ACCEPT ) { confirmBox.open(); } else { returnType = TYPE.NO_OP;
protected void init( Repository rep ) throws Exception { if ( rep != null && rep.hasService( RepositorySecurityProvider.class ) ) { service = (RepositorySecurityProvider) rep.getService( RepositorySecurityProvider.class ); } else { throw new ControllerInitializationException( BaseMessages.getString( PKG, "PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE", RepositorySecurityManager.class ) ); //$NON-NLS-1$ } messageBox = (XulMessageBox) document.createElement( "messagebox" );//$NON-NLS-1$ viewAclsModel = new UIRepositoryObjectAcls(); manageAclsModel = new UIRepositoryObjectAclModel( viewAclsModel ); bf = new DefaultBindingFactory(); bf.setDocument( this.getXulDomContainer().getDocumentRoot() ); mainController = (MainController) this.getXulDomContainer().getEventHandler( "mainController" ); confirmBox = (XulConfirmBox) document.createElement( "confirmbox" );//$NON-NLS-1$ confirmBox.setTitle( BaseMessages.getString( PKG, "PermissionsController.RemoveAclWarning" ) ); //$NON-NLS-1$ confirmBox.setMessage( BaseMessages.getString( PKG, "PermissionsController.RemoveAclWarningText" ) ); //$NON-NLS-1$ confirmBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) ); //$NON-NLS-1$ confirmBox.setCancelLabel( BaseMessages.getString( PKG, "Dialog.Cancel" ) ); //$NON-NLS-1$ confirmBox.addDialogCallback( new XulDialogCallback<Object>() { public void onClose( XulComponent sender, Status returnCode, Object retVal ) { if ( returnCode == Status.ACCEPT ) { viewAclsModel.removeSelectedAcls(); } } public void onError( XulComponent sender, Throwable t ) { } } ); }
confirm.setTitle( title ); confirm.setMessage( message ); confirm.setAcceptLabel( okButtonLabel ); confirm.setCancelLabel( cancelButtonLabel ); confirm.addDialogCallback( new XulDialogCallback<String>() { public void onClose( XulComponent component, Status status, String value ) { if ( onResulthandler != null ) { confirm.open();
public void showConfirm( final JavaScriptObject callback, String message, String title, String okText, String cancelText ) throws XulException { XulConfirmBox confirm = (XulConfirmBox) wizard.getMainWizardContainer().getDocumentRoot().createElement( "confirmbox" ); confirm.setTitle( title ); confirm.setMessage( message ); confirm.setAcceptLabel( okText ); confirm.setCancelLabel( cancelText ); confirm.addDialogCallback( new XulDialogCallback<String>() { public void onClose( XulComponent component, Status status, String value ) { if ( status == XulDialogCallback.Status.ACCEPT ) { notifyDialogCallbackSuccess( callback, value ); } } public void onError( XulComponent component, Throwable err ) { notifyDialogCallbackError( callback, err.getMessage() ); } } ); confirm.open(); }
confirm.setTitle( "Confirmation" ); confirm.setMessage( message ); confirm.setAcceptLabel( "Ok" ); confirm.setCancelLabel( "Cancel" ); confirm.addDialogCallback( new XulDialogCallback<String>() { public void onClose( XulComponent component, Status status, String value ) { if ( status == XulDialogCallback.Status.ACCEPT ) { confirm.open();
private void showAutoModelConfirmDialog() throws XulException { XulConfirmBox confirm = (XulConfirmBox) document.createElement( "confirmbox" ); //$NON-NLS-1$ confirm.setTitle( ModelerMessagesHolder.getMessages().getString( "auto_populate_title" ) ); //$NON-NLS-1$ confirm.setMessage( getAutoPopulateMsg() ); confirm.setAcceptLabel( ModelerMessagesHolder.getMessages().getString( "yes" ) ); //$NON-NLS-1$ confirm.setCancelLabel( ModelerMessagesHolder.getMessages().getString( "no" ) ); //$NON-NLS-1$ confirm.addDialogCallback( new XulDialogCallback() { public void onClose( XulComponent sender, Status returnCode, Object retVal ) { if ( returnCode == Status.ACCEPT ) { autoPopulate(); } } public void onError( XulComponent sender, Throwable t ) { } } ); confirm.open(); }
confirm.setTitle( "Confirmation" ); confirm.setMessage( msg ); confirm.setAcceptLabel( "Ok" ); confirm.setCancelLabel( "Cancel" ); confirm.addDialogCallback( new XulDialogCallback<String>() { public void onClose( XulComponent component, Status status, String value ) { if ( status == XulDialogCallback.Status.ACCEPT ) { confirm.open();
@Bindable public void clearFields() { try { XulConfirmBox confirm = (XulConfirmBox) document.createElement( "confirmbox" ); //$NON-NLS-1$ confirm.setTitle( ModelerMessagesHolder.getMessages().getString( "clear_model_title" ) ); //$NON-NLS-1$ confirm.setMessage( ModelerMessagesHolder.getMessages().getString( "clear_model_msg" ) ); //$NON-NLS-1$ confirm.setAcceptLabel( ModelerMessagesHolder.getMessages().getString( "yes" ) ); //$NON-NLS-1$ confirm.setCancelLabel( ModelerMessagesHolder.getMessages().getString( "no" ) ); //$NON-NLS-1$ confirm.addDialogCallback( new XulDialogCallback() { public void onClose( XulComponent sender, Status returnCode, Object retVal ) { if ( returnCode == Status.ACCEPT ) { clearTreeModel(); } } public void onError( XulComponent sender, Throwable t ) { } } ); confirm.open(); } catch ( Exception e ) { e.printStackTrace(); } }