001// Licensed under the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005// http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.
012
013package org.apache.tapestry5.internal.services;
014
015import org.apache.tapestry5.corelib.components.Form;
016import org.apache.tapestry5.corelib.components.Zone;
017import org.apache.tapestry5.services.javascript.JavaScriptStack;
018
019/**
020 * Constants used when processing requests from the client web browser.
021 */
022public final class RequestConstants
023{
024
025    /**
026     * Virtual folder name for assets that are actually stored in the context, but are exposed (much like classpath
027     * assets) to gain far-future expires headers and automatic content compression.
028     *
029     * @since 5.1.0.0
030     */
031    public static final String CONTEXT_FOLDER = "ctx";
032
033    /**
034     * Folder for combined {@link JavaScriptStack} JavaScript files. The path consists of the locale (as a folder) and
035     * the name
036     * of the stack (suffixed with ".js").
037     *
038     * @since 5.2.0
039     */
040    public static final String STACK_FOLDER = "stack";
041
042    /**
043     * Name of parameter, in an Ajax update, that identifies the client-side id of the {@link Form} being extended. Used
044     * with {@link Zone} and other similar components that may be contained within a form.
045     *
046     * @since 5.2.0
047     */
048    public static final String FORM_CLIENTID_PARAMETER = "t:formid";
049
050    /**
051     * The server-side part of {@link #FORM_CLIENTID_PARAMETER} identifying the server-side component id.
052     *
053     * @since 5.2.0
054     */
055    public static final String FORM_COMPONENTID_PARAMETER = "t:formcomponentid";
056}