01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry;
16:
17: /**
18: * Collection of common constant values used throughout Tapestry.
19: */
20: public final class TapestryConstants {
21: /** Default client event name, "action", used in most situations. */
22: public static final String ACTION_EVENT = "action";
23:
24: /**
25: * Event triggered when a page is activated (for rendering). The component event handler will be
26: * passed the context provided by the passivate event.
27: */
28: public static final String ACTIVATE_EVENT = "activate";
29:
30: /**
31: * Event triggered when a link for a page is generated. The event handler for the page may
32: * provide an object, or an array of objects, as the context for the page. These values will
33: * become part of the page's context, and will be provided back when the page is activated.
34: */
35: public static final String PASSIVATE_EVENT = "passivate";
36:
37: /**
38: * Request path prefix that identifies an internal (on the classpath) asset.
39: */
40: public static final String ASSET_PATH_PREFIX = "/assets/";
41:
42: /** Binding expression prefix used for literal strings. */
43: public static final String LITERAL_BINDING_PREFIX = "literal";
44:
45: /** Binding expression prefix used to bind to a property of the component. */
46: public static final String PROP_BINDING_PREFIX = "prop";
47:
48: /**
49: * Meta data key applied to pages that sets the response content type. A factory default
50: * provides the value "text/html" when not overridden.
51: */
52: public static final String RESPONSE_CONTENT_TYPE = "tapestry.response-content-type";
53:
54: /**
55: * Meta data key applied to pages that sets the response encoding. A factory default provides
56: * the value "UTF-8" when not overriden. Content type may also be specified in the
57: * {@link #RESPONSE_CONTENT_TYPE content type} as parameter "charset", i.e.,
58: * "text/html;charset=UTF-8".
59: */
60: public static final String RESPONSE_ENCODING = "tapestry.response-encoding";
61:
62: private TapestryConstants() {
63: }
64: }
|