001    // Copyright 2006, 2007, 2008, 2009, 2010, 2011 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.tapestry5.internal.services;
016    
017    import org.apache.tapestry5.corelib.components.Form;
018    import org.apache.tapestry5.corelib.components.FormInjector;
019    import org.apache.tapestry5.corelib.components.Zone;
020    import org.apache.tapestry5.services.javascript.JavaScriptStack;
021    
022    /**
023     * Constants used when processing requests from the client web browser.
024     */
025    public final class RequestConstants
026    {
027    
028        /**
029         * Virtual folder name for assets that are actually stored in the context, but are exposed (much like classpath
030         * assets) to gain far-future expires headers and automatic content compression.
031         *
032         * @since 5.1.0.0
033         */
034        public static final String CONTEXT_FOLDER = "ctx";
035    
036        /**
037         * Folder for combined {@link JavaScriptStack} JavaScript files. The path consists of the locale (as a folder) and
038         * the name
039         * of the stack (suffixed with ".js").
040         *
041         * @since 5.2.0
042         */
043        public static final String STACK_FOLDER = "stack";
044    
045        /**
046         * Name of parameter, in an Ajax update, that identifies the client-side id of the {@link Form} being extended. Used
047         * with {@link Zone}, {@link FormInjector} and other similar components that may be contained within a form.
048         *
049         * @since 5.2.0
050         */
051        public static final String FORM_CLIENTID_PARAMETER = "t:formid";
052    
053        /**
054         * The server-side part of {@link #FORM_CLIENTID_PARAMETER} identifying the server-side component id.
055         *
056         * @since 5.2.0
057         */
058        public static final String FORM_COMPONENTID_PARAMETER = "t:formcomponentid";
059    }