001 // Copyright 2005 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry.form;
016
017 /**
018 * Constants used by the Form component.
019 *
020 * @author Howard Lewis Ship
021 * @since 4.0
022 */
023 public class FormConstants
024 {
025 /**
026 * Normal submit of the form, typically by the user clicking a submit control.
027 */
028
029 public static final String SUBMIT_NORMAL = "submit";
030
031 /**
032 * Indicates that the form was cancelled. A form is cancelled on the client side when the
033 * JavaScript function document.<em>form-name</em>.events.cancel() is invoked.
034 */
035
036 public static final String SUBMIT_CANCEL = "cancel";
037
038 /**
039 * Indicates that the form was submitted to force a refresh. Most client-side submit listeners
040 * will have been skipped (particularily, those related to validaton). A form is submitted for
041 * refresh on the client side when the JavaScript function document.<em>form-name</em>.events.refresh()
042 * is invoked.
043 */
044 public static final String SUBMIT_REFRESH = "refresh";
045
046 /**
047 * Query parameter reserved to identify the name of the component that triggered the form
048 * submit. This is primarily used by the {@link org.apache.tapestry.form.LinkSubmit} component.
049 */
050 public static final String SUBMIT_NAME_PARAMETER = "submitname";
051 }