@Override public Integer sourceToTarget( Type arg0 ) { if ( arg0 == Type.ROLE ) { userRadioButton.setSelected( false ); roleRadioButton.setSelected( true ); systemRoleRadioButton.setSelected( false ); return 1; } else if ( arg0 == Type.USER ) { userRadioButton.setSelected( true ); roleRadioButton.setSelected( false ); systemRoleRadioButton.setSelected( false ); return 0; } else if ( arg0 == Type.SYSTEM_ROLE ) { userRadioButton.setSelected( false ); roleRadioButton.setSelected( false ); systemRoleRadioButton.setSelected( true ); return 2; } else { return -1; } }
@Override protected boolean doLazyInit() { boolean superSucceeded = super.doLazyInit(); if ( !superSucceeded ) { return false; } if ( !managed ) { userRadioButton.setVisible( false ); roleHbox.removeChild( innerRoleVbox ); roleHbox.addChild( roleVboxNonManaged ); } return true; }
private static boolean disableConnectButton( XulDomContainer container ) { String secretKeyValue = getTextBoxValueById( container, XUL_SECRET_KEY ); String accessKeyValue = getTextBoxValueById( container, XUL_ACCESS_KEY ); XulRadio existingClusterMode = (XulRadio) container.getDocumentRoot().getElementById( XUL_EXISTING_CLUSTER_DECK ); if ( existingClusterMode.isSelected() ) { return true; } if ( Strings.isNullOrEmpty( accessKeyValue ) || Strings.isNullOrEmpty( secretKeyValue ) ) { return true; } return false; }
public void buildAndSetParameters( boolean isEditMode ) { if ( isEditMode ) { String file = importDialogModel.getUploadedFile(); if ( file != null ) { mainFormPanel.add( new Hidden( "catalogName", file ) ); } // MONDRIAN-1731 if ( datasourceInfo != null ) { mainFormPanel.add( new Hidden( "origCatalogName", datasourceInfo.getId() ) ); } } // If user selects available data source, then pass the datasource as part of the parameters. // If user selects manual data source, pass in whatever parameters they specify even if it is empty. String parameters = importDialogModel.getParameters(); if ( availableRadio.isSelected() ) { parameters = datasourceParam( connectionList.getValue() ); } // Parameters would contain either the data source from connectionList drop-down // or the parameters manually entered (even if list is empty) String sep = ( StringUtils.isEmpty( parameters ) ) ? "" : ";"; parameters += ";overwrite=" + String.valueOf( isEditMode ? isEditMode : overwrite ); Hidden queryParameters = new Hidden( "parameters", parameters ); mainFormPanel.add( queryParameters ); }
( (XulRadio) document.getElementById( "rule-definition-radio-button" ) ).setSelected( true ); } else { setRuleSource( "file" ); ( (XulRadio) document.getElementById( "rule-file-radio-button" ) ).setSelected( true );
public void updateClusterState() { XulRadioGroup clusterModes = (XulRadioGroup) getXulDomContainer().getDocumentRoot().getElementById( XUL_CLUSTER_MODE ); XulRadio newClusterMode = (XulRadio) clusterModes.getFirstChild(); XulDeck clusterModeTab = (XulDeck) getXulDomContainer().getDocumentRoot().getElementById( XUL_CLUSTER_TAB ); disableAwsConnection( getXulDomContainer() ); if ( newClusterMode.isSelected() ) { this.runOnNewCluster = true; clusterModeTab.setSelectedIndex( 0 ); } else { fixFocusLostOnTab(); clusterModeTab.setSelectedIndex( 1 ); this.runOnNewCluster = false; } }
( (XulRadio) document.getElementById( "rule-definition-radio-button" ) ).setSelected( true ); } else { setRuleSource( "file" ); ( (XulRadio) document.getElementById( "rule-file-radio-button" ) ).setSelected( true );
protected void initializeClusterSelection() { XulRadio newCluster = (XulRadio) container.getDocumentRoot().getElementById( XUL_NEW_CLUSTER_DECK ); XulRadio existingCluster = (XulRadio) container.getDocumentRoot().getElementById( XUL_EXISTING_CLUSTER_DECK ); newCluster.setSelected( this.runOnNewCluster ); existingCluster.setSelected( !this.runOnNewCluster ); updateClusterState(); }
radio.setSelected( true );
private void reset() { analysisFileLabel.setValue( resBundle.getString( "importDialog.IMPORT_MONDRIAN", "Browse for analysis file" ) ); if ( formPanel != null && RootPanel.get().getWidgetIndex( formPanel ) != -1 ) { RootPanel.get().remove( formPanel ); } formPanel = null; submitHandler = null; reloadConnections(); importDialogModel.removeAllParameters(); importDialogModel.setUploadedFile( null ); availableRadio.setSelected( true ); acceptButton.setDisabled( true ); schemaNameLabel.setValue( "" ); setPreference( DATASOURCE_MODE ); overwrite = false; removeHiddenPanels(); }
( (XulRadio) container.getDocumentRoot().getElementById( "simpleRadioButton" ) ).setSelected( this.jobEntry ( (XulRadio) container.getDocumentRoot().getElementById( "advancedRadioButton" ) ).setSelected( !this.jobEntry