001: /**
002: * Copyright 2006 Webmedia Group Ltd.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: **/package org.araneaframework.uilib;
016:
017: import java.io.Serializable;
018:
019: /**
020: * Configuration context for Uilib widgets. Defined constants
021: * are the keys under which some existing widgets search their configuration.
022: *
023: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
024: */
025: public interface ConfigurationContext extends Serializable {
026: /**
027: * <code>String</code> containing the patterns for <code>Date</code> date validation.
028: */
029: public static final String CUSTOM_DATE_FORMAT = "uilib.widgets.forms.controls.CustomDateFormat";
030:
031: /**
032: * <code>String</code> containing the patterns for <code>Date</code> time validation.
033: */
034: public static final String CUSTOM_TIME_FORMAT = "uilib.widgets.forms.controls.CustomTimeFormat";
035:
036: /**
037: * <code>String</code> containing the format for <code>Date</code> default date output.
038: */
039: public static final String DEFAULT_DATE_OUTPUT_FORMAT = "uilib.widgets.forms.controls.DefaultOutputDateFormat";
040:
041: /**
042: * <code>String</code> containing the format for <code>Date</code> default time output.
043: */
044: public static final String DEFAULT_TIME_OUTPUT_FORMAT = "uilib.widgets.forms.controls.DefaultOutputTimeFormat";
045:
046: /**
047: * The full class name of the implementation of {@link org.araneaframework.uilib.form.converter.ConverterProvider} interface
048: * that will override the default.
049: */
050: public static final String CUSTOM_CONVERTER_PROVIDER = "uilib.widgets.forms.converters.CustomConverterProvider";
051:
052: /**
053: * <code>Long</code> that controls the default size of the list (eg how many rows are shown on one page).
054: */
055: public static final String DEFAULT_LIST_ITEMS_ON_PAGE = "uilib.widgets.lists.DefaultListItemsOnPage";
056:
057: /**
058: * <code>Long</code> that controls the full size of the list (eg how many rows maximum may be shown at once).
059: */
060: public static final String FULL_LIST_ITEMS_ON_PAGE = "uilib.widgets.lists.FullListItemsOnPage";
061:
062: /**
063: * <code>Long</code> that controls the default of how many list pages combine into one block for quick navigation.
064: */
065: public static final String DEFAULT_LIST_PAGES_ON_BLOCK = "uilib.widgets.lists.DefaultListPagesOnBlock";
066:
067: /**
068: * <code>Boolean</code> that controls whether to preserve the list starting row when switching to showing full list and back.
069: */
070: public static final String LIST_PRESERVE_STARTING_ROW = "uilib.widgets.lists.DefaultPreserveStartingRow";
071:
072: /**
073: * <code>FilterFormBuilderVisitor.Configurator</code> that configures the built filter form elements.
074: */
075: public static final String LIST_FILTER_CONFIGURATOR = "uilib.widgets.lists.ListFilterConfigurator";
076:
077: /**
078: * {@link org.araneaframework.uilib.form.control.AutoCompleteTextControl.ResponseBuilder} that configures how
079: * {@link org.araneaframework.uilib.form.control.AutoCompleteTextControl} sends back the suggested completions.
080: */
081: public static final String AUTO_COMPLETE_RESPONSE_BUILDER = "uilib.widgets.AutoCompleteTextControl.DefaultResponseBuilder";
082:
083: /**
084: * <code>LikeConfiguration</code> that configures Like filter in lists.
085: */
086: public static final String LIKE_CONFIGURATION = "uilib.widgets.lists.LikeConfiguration";
087:
088: /**
089: * This <code>java.lang.Boolean</code> property should be set to <code>true</code> if application wants all forms to
090: * be validated on-the-fly. Validation is done by invoking server-side {@link org.araneaframework.core.ActionListener}s that perform the
091: * validation. When this is set to <code>false</code>, programmer can manually enable action validation for those
092: * {@link org.araneaframework.uilib.form.FormWidget}/{@link org.araneaframework.uilib.form.FormElement} which should be validated on-the-fly. When {@link ConfigurationContext} does
093: * not include entry corresponding to this property, it defaults to <code>false</code>.
094: *
095: * @since 1.1
096: */
097: public static final String BACKGROUND_FORM_VALIDATION = "uilib.widgets.forms.seamless.validation";
098:
099: /**
100: * This property should be set to the class which stores the errors produced by failed {@link org.araneaframework.uilib.form.FormElement}
101: * validations. When this property is not set, {@link org.araneaframework.uilib.form.StandardFormElementValidationErrorRenderer} is used.
102: */
103: public static final String FORMELEMENT_ERROR_RENDERER = "uilib.widgets.forms.formelement.error.renderer";
104:
105: /**
106: * Returns a configuration entry with given name.
107: */
108: public Object getEntry(String entryName);
109: }
|