List of usage examples for com.jgoodies.validation.view ValidationComponentUtils setMandatory
public static void setMandatory(JComponent comp, boolean mandatory)
From source file:example.groovy.swinger.builder.GGTextfield.java
License:Open Source License
public JTextField createComponent(final GroovyPresentationModel gpm) { JTextField jtextfield = new JTextField(); jtextfield.setName(name);/*from ww w .j a v a 2 s . c o m*/ jtextfield.setColumns(getColumns()); ValidationComponentUtils.setMessageKey(jtextfield, getName()); if (isMandatory()) { ValidationComponentUtils.setMandatory(jtextfield, true); } if (!isEditable()) { jtextfield.setEditable(false); } Bindings.bind(jtextfield, gpm.getModel(getName())); return jtextfield; }
From source file:gov.nih.nci.cacore.workbench.portal.panel.AdvancedSettingsPanel.java
License:BSD License
public void initValidation() { // Advanced//w w w .j a v a 2 s. co m ValidationComponentUtils.setMessageKey(getAppBasePathLinuxField(), APP_BASE_PATH_LINUX); ValidationComponentUtils.setMandatory(getAppBasePathLinuxField(), true); ValidationComponentUtils.setMessageKey(getAppBasePathWindowsField(), APP_BASE_PATH_WINDOWS); ValidationComponentUtils.setMandatory(getAppBasePathWindowsField(), true); ValidationComponentUtils.setMessageKey(getCachePathField(), CACHE_PATH); ValidationComponentUtils.setMandatory(getCachePathField(), true); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.AppServerSettingsPanel.java
License:BSD License
public void initValidation() { //App Server/*from w w w . ja v a 2 s . co m*/ ValidationComponentUtils.setMessageKey(getExternalServerHttpUrlField(), SERVER_HTTP_URL); ValidationComponentUtils.setMandatory(getExternalServerHttpUrlField(), true); ValidationComponentUtils.setMessageKey(getServerTypeComboBox(), SERVER_TYPE); ValidationComponentUtils.setMandatory(getServerTypeComboBox(), true); //Tomcat Server ValidationComponentUtils.setMessageKey(getTomcatHostnameField(), TOMCAT_HOSTNAME); ValidationComponentUtils.setMandatory(getTomcatHostnameField(), true); ValidationComponentUtils.setMessageKey(getTomcatPortAjpField(), TOMCAT_PORT_AJP); ValidationComponentUtils.setMandatory(getTomcatPortAjpField(), true); ValidationComponentUtils.setMessageKey(getTomcatPortHttpField(), TOMCAT_PORT_HTTP); ValidationComponentUtils.setMandatory(getTomcatPortHttpField(), true); ValidationComponentUtils.setMessageKey(getTomcatPortShutdownField(), TOMCAT_PORT_SHUTDOWN); ValidationComponentUtils.setMandatory(getTomcatPortShutdownField(), true); ValidationComponentUtils.setMessageKey(getTomcatPortSslField(), TOMCAT_PORT_SSL); ValidationComponentUtils.setMandatory(getTomcatPortSslField(), true); //JBoss Server ValidationComponentUtils.setMessageKey(getJbossPortNameComboBox(), JBOSS_PORT_NAME); ValidationComponentUtils.setMandatory(getJbossPortNameComboBox(), true); ValidationComponentUtils.setMessageKey(getJbossServerAjpPortField(), JBOSS_SERVER_AJP_PORT); ValidationComponentUtils.setMandatory(getJbossServerAjpPortField(), true); ValidationComponentUtils.setMessageKey(getJbossServerHostnameField(), JBOSS_SERVER_HOSTNAME); ValidationComponentUtils.setMandatory(getJbossServerHostnameField(), true); ValidationComponentUtils.setMessageKey(getJbossServerJndiPortField(), JBOSS_SERVER_JNDI_PORT); ValidationComponentUtils.setMandatory(getJbossServerJndiPortField(), true); ValidationComponentUtils.setMessageKey(getJbossServerPortField(), JBOSS_SERVER_PORT); ValidationComponentUtils.setMandatory(getJbossServerPortField(), true); ValidationComponentUtils.setMessageKey(getJbossServerSslPortField(), JBOSS_SERVER_SSL_PORT); ValidationComponentUtils.setMandatory(getJbossServerSslPortField(), true); toggleServerFields(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.CaGridAuthSettingsPanel.java
License:BSD License
public void initValidation() { // caGrid Authenthication ValidationComponentUtils.setMessageKey(getCaGridTargetGridComboBox(), TARGET_GRID); ValidationComponentUtils.setMandatory(getCaGridTargetGridComboBox(), true); ValidationComponentUtils.setMessageKey(getGridSecureCertFileField(), GRID_SECURE_CERT_FILE); ValidationComponentUtils.setMandatory(getGridSecureCertFileField(), true); ValidationComponentUtils.setMessageKey(getGridSecureKeyFileField(), GRID_SECURE_KEY_FILE); ValidationComponentUtils.setMandatory(getGridSecureKeyFileField(), true); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.ClmSettingsPanel.java
License:BSD License
public void initValidation() { // Common Logging Module DB Connection ValidationComponentUtils.setMessageKey(getClmDbTypeComboBox(), CLM_DB_TYPE); ValidationComponentUtils.setMandatory(getClmDbTypeComboBox(), true); ValidationComponentUtils.setMessageKey(getClmDbConnectionUrlField(), CLM_DB_CONNECTION_URL); ValidationComponentUtils.setMandatory(getClmDbConnectionUrlField(), true); ValidationComponentUtils.setMessageKey(getClmDbHostnameField(), CLM_DB_SERVER); ValidationComponentUtils.setMandatory(getClmDbHostnameField(), true); ValidationComponentUtils.setMessageKey(getClmDbPortField(), CLM_DB_SERVER_PORT); ValidationComponentUtils.setMandatory(getClmDbPortField(), true); ValidationComponentUtils.setMessageKey(getClmDbSchemaField(), CLM_DB_NAME); ValidationComponentUtils.setMandatory(getClmDbSchemaField(), true); ValidationComponentUtils.setMessageKey(getClmDbUsernameField(), CLM_DB_USERNAME); ValidationComponentUtils.setMandatory(getClmDbUsernameField(), true); ValidationComponentUtils.setMessageKey(getClmDbPasswordField(), CLM_DB_PASSWORD); ValidationComponentUtils.setMandatory(getClmDbPasswordField(), true); ValidationComponentUtils.setMessageKey(getClmDbDropSchemaCheckBox(), CLM_DB_DROP_SCHEMA); ValidationComponentUtils.setMandatory(getClmDbDropSchemaCheckBox(), true); ValidationComponentUtils.setMessageKey(getClmDbSqlFileField(), CLM_DB_SQL_FILE); ValidationComponentUtils.setMandatory(getClmDbSqlFileField(), true); updateClmDbFields();//w w w. j av a 2s . c o m toggleClmDbConnectionFields(); toggleRecreateClmDbFields(); parentContainer.toggleClmTestConnectionButton(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.CodegenSettingsPanel.java
License:BSD License
public void initValidation() { ValidationComponentUtils.setMessageKey(getPageSizeDbField(), DAO_PAGE_SIZE); ValidationComponentUtils.setMandatory(getPageSizeDbField(), true); ValidationComponentUtils.setMessageKey(getPageSizeRestfulApiField(), RESTFUL_PAGE_SIZE); ValidationComponentUtils.setMandatory(getPageSizeRestfulApiField(), true); ValidationComponentUtils.setMessageKey(getCaDsrConnectionUrlField(), CADSR_CONNECTION_URL); ValidationComponentUtils.setMandatory(getCaDsrConnectionUrlField(), true); toggleXsdFields();//w w w. ja va 2 s .co m toggleCaDsrField(); toggleIsoFields(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.CsmDbConnectionSettingsPanel.java
License:BSD License
public void initValidation() { //CSM DB// w w w .j ava 2 s . com ValidationComponentUtils.setMessageKey(getCsmUseDbConnectionSettingsCheckBox(), CSM_USE_DB_CONNECTION_SETTINGS); ValidationComponentUtils.setMandatory(getCsmUseDbConnectionSettingsCheckBox(), true); ValidationComponentUtils.setMessageKey(getCsmDbJndiNameField(), CSM_JNDI_NAME); ValidationComponentUtils.setMandatory(getCsmDbJndiNameField(), true); ValidationComponentUtils.setMessageKey(getCsmDbConnectionUrlField(), CSM_DB_CONNECTION_URL); ValidationComponentUtils.setMandatory(getCsmDbConnectionUrlField(), true); ValidationComponentUtils.setMessageKey(getCsmDbHostnameField(), CSM_DB_SERVER); ValidationComponentUtils.setMandatory(getCsmDbHostnameField(), true); ValidationComponentUtils.setMessageKey(getCsmDbPortField(), CSM_DB_SERVER_PORT); ValidationComponentUtils.setMandatory(getCsmDbPortField(), true); ValidationComponentUtils.setMessageKey(getCsmDbSchemaField(), CSM_DB_NAME); ValidationComponentUtils.setMandatory(getCsmDbSchemaField(), true); ValidationComponentUtils.setMessageKey(getCsmDbUsernameField(), CSM_DB_USERNAME); ValidationComponentUtils.setMandatory(getCsmDbUsernameField(), true); ValidationComponentUtils.setMessageKey(getCsmDbPasswordField(), CSM_DB_PASSWORD); ValidationComponentUtils.setMandatory(getCsmDbPasswordField(), true); ValidationComponentUtils.setMessageKey(getCsmDbDropSchemaCheckBox(), CSM_DB_DROP_SCHEMA); ValidationComponentUtils.setMandatory(getCsmDbDropSchemaCheckBox(), true); ValidationComponentUtils.setMessageKey(getCsmDbSqlFileField(), CSM_DB_SQL_FILE); ValidationComponentUtils.setMandatory(getCsmDbSqlFileField(), true); toggleCsmDbConnectionFields(); toggleRecreateCsmDBFields(); parentContainer.toggleCsmDbJndiNameField(); parentContainer.toggleCsmTestConnectionButton(); updateCsmDbFields(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.DbConnectionSettingsPanel.java
License:BSD License
public void initValidation() { //DB Connection ValidationComponentUtils.setMessageKey(getDbTypeComboBox(), DB_TYPE); ValidationComponentUtils.setMandatory(getDbTypeComboBox(), true); ValidationComponentUtils.setMessageKey(getDbJndiNameField(), DB_JNDI_NAME); ValidationComponentUtils.setMandatory(getDbJndiNameField(), true); ValidationComponentUtils.setMessageKey(getDbHostnameField(), DB_SERVER); ValidationComponentUtils.setMandatory(getDbHostnameField(), true); ValidationComponentUtils.setMessageKey(getDbPortField(), DB_SERVER_PORT); ValidationComponentUtils.setMandatory(getDbPortField(), true); ValidationComponentUtils.setMessageKey(getDbSchemaField(), DB_NAME); ValidationComponentUtils.setMandatory(getDbSchemaField(), true); ValidationComponentUtils.setMessageKey(getDbUsernameField(), DB_USERNAME); ValidationComponentUtils.setMandatory(getDbUsernameField(), true); ValidationComponentUtils.setMessageKey(getDbPasswordField(), DB_PASSWORD); ValidationComponentUtils.setMandatory(getDbPasswordField(), true); ValidationComponentUtils.setMessageKey(getDbDropSchemaCheckBox(), DB_DROP_SCHEMA); ValidationComponentUtils.setMandatory(getDbDropSchemaCheckBox(), true); ValidationComponentUtils.setMessageKey(getDbSqlFileField(), DB_SQL_FILE); ValidationComponentUtils.setMandatory(getDbSqlFileField(), true); updateDbFields();// ww w . j a va 2 s . co m parentContainer.toggleTestConnectionButton(); parentContainer.toggleDbJndiNameField(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.DeployTypeSettingsPanel.java
License:BSD License
public void initValidation() { // Deploy Type Validation ValidationComponentUtils.setMessageKey(getProjectDirField(), PROJECT_DIR); ValidationComponentUtils.setMandatory(getProjectDirField(), true); ValidationComponentUtils.setMessageKey(getDeployTypeComboBox(), DEPLOY_TYPE); ValidationComponentUtils.setMandatory(getDeployTypeComboBox(), true); ValidationComponentUtils.setMessageKey(getRemoteDeployEnvComboBox(), REMOTE_DEPLOY_ENV); ValidationComponentUtils.setMandatory(getRemoteDeployEnvComboBox(), true); toggleDeployTypeFields();// w w w . j a v a 2 s .com toggleLoadPropertiesButton(); }
From source file:gov.nih.nci.cacore.workbench.portal.panel.LogViewerPanel.java
License:BSD License
public void initValidation() { // Deploy Type Validation ValidationComponentUtils.setMessageKey(getLogFileField(), LOG_FILE); ValidationComponentUtils.setMandatory(getLogFileField(), true); toggleViewLogFileButton();// w w w . j av a 2 s. c o m }