if ( DesignChoiceConstants.PARAM_TYPE_DATETIME.equals( getSelectedDataType( ) ) ) { defaultValue = DEUtil.convertToXMLString( DataTypeUtil.toDate( defaultValue, ULocale.US ) ); }
	protected void okPressed( )	{		try		{			// Save the name and display name			inputParameter.setName( nameEditor.getText( ) );			inputParameter.setPromptText( UIUtil.convertToModelString( promptTextEditor.getText( ),					true ) );			String newControlType = getSelectedControlType( );			if ( PARAM_CONTROL_COMBO.equals( newControlType ) )			{				newControlType = DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;				inputParameter.setMustMatch( true );			}			else if ( PARAM_CONTROL_LIST.equals( newControlType ) )			{				newControlType = DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;				inputParameter.setMustMatch( false );			}			else			{				inputParameter.setProperty( ScalarParameterHandle.MUCH_MATCH_PROP,						null );			}			// Save control type			inputParameter.setControlType( newControlType );			// Save default value			inputParameter.setDefaultValue( defaultValue );			// Set data type			inputParameter.setDataType( dataType.findChoiceByDisplayName( dataTypeChooser.getText( ) )					.getName( ) );			// Clear original choices list			PropertyHandle selectionChioceList = inputParameter.getPropertyHandle( ScalarParameterHandle.SELECTION_LIST_PROP );			selectionChioceList.setValue( null );			if ( isStatic( ) )			{				// Save static choices list				inputParameter.setValueType( DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC );				if ( !DesignChoiceConstants.PARAM_CONTROL_TEXT_BOX.equals( newControlType )						&& !DesignChoiceConstants.PARAM_CONTROL_CHECK_BOX.equals( newControlType ) )				{					for ( Iterator iter = choiceList.iterator( ); iter.hasNext( ); )					{						SelectionChoice choice = (SelectionChoice) iter.next( );						if ( isValidValue( choice.getValue( ) ) == null )						{							selectionChioceList.addItem( choice );						}					}				}				inputParameter.setDataSetName( null );				inputParameter.setValueExpr( null );				inputParameter.setLabelExpr( null );			}			else			{				// Save dynamic settings				inputParameter.setValueType( DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC );				inputParameter.setDataSetName( dataSetChooser.getText( ) );				inputParameter.setValueExpr( getExpression( columnChooser.getText( ) ) );				inputParameter.setLabelExpr( getExpression( displayTextChooser.getText( ) ) );			}			// Save help text			inputParameter.setHelpText( UIUtil.convertToModelString( helpTextEditor.getText( ),					false ) );			// Save format			inputParameter.setCategory( formatCategroy );			inputParameter.setPattern( formatPattern );			if ( isStatic( )					&& ( PARAM_CONTROL_COMBO.equals( getSelectedControlType( ) ) || DesignChoiceConstants.PARAM_CONTROL_RADIO_BUTTON.equals( getSelectedControlType( ) ) )					&& !containValue( null, defaultValue, COLUMN_VALUE ) )			{				defaultValue = null;			}			// Save options			if ( dirtyProperties.containsKey( CHECKBOX_HIDDEN ) )			{				inputParameter.setHidden( getProperty( CHECKBOX_HIDDEN ) );			}			if ( dirtyProperties.containsKey( CHECKBOX_ALLOW_NULL ) )			{				inputParameter.setAllowNull( getProperty( CHECKBOX_ALLOW_NULL ) );			}			if ( allowBlank.isEnabled( ) )			{				if ( dirtyProperties.containsKey( CHECKBOX_ALLOW_BLANK ) )				{					inputParameter.setAllowBlank( getProperty( CHECKBOX_ALLOW_BLANK ) );				}			}			else			{				inputParameter.setProperty( ScalarParameterHandle.ALLOW_BLANK_PROP,						null );			}			if ( doNotEcho.isEnabled( ) )			{				if ( dirtyProperties.containsKey( CHECKBOX_DO_NOT_ECHO ) )				{					inputParameter.setConcealValue( getProperty( CHECKBOX_DO_NOT_ECHO ) );				}			}			else			{				inputParameter.setProperty( ScalarParameterHandle.CONCEAL_VALUE_PROP,						null );			}			if ( needSort.isEnabled( ) )			{				if ( dirtyProperties.containsKey( CHECKBOX_SORT ) )				{					inputParameter.setFixedOrder( !getProperty( CHECKBOX_SORT ) );				}			}			else			{				inputParameter.setProperty( ScalarParameterHandle.FIXED_ORDER_PROP,						null );			}			// Save limits			if ( !isStatic( ) && !StringUtil.isBlank( listLimit.getText( ) ) )			{				try				{					inputParameter.setListlimit( Integer.parseInt( listLimit.getText( ) ) );				}				catch ( NumberFormatException ex )				{					ExceptionHandler.openErrorMessageBox( ERROR_TITLE_INVALID_LIST_LIMIT,							MessageFormat.format( ERROR_MSG_INVALID_LIST_LIMIT,									new Object[]{										Integer.toString( Integer.MAX_VALUE )									} ) );				}			}			else			{				inputParameter.setProperty( ScalarParameterHandle.LIST_LIMIT_PROP,						null );			}		}		catch ( Exception e )		{			ExceptionHandler.handle( e );			return;		}		setResult( inputParameter );		super.okPressed( );	}