Modified: websites/production/tapestry/content/component-cheat-sheet.html
==============================================================================
--- websites/production/tapestry/content/component-cheat-sheet.html (original)
+++ websites/production/tapestry/content/component-cheat-sheet.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Cheat Sheet - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -231,7 +231,7 @@
</div>
-<p>For an exhaustive list, see the <a href="annotations.html">annotations
list</a>.</p><h2 id="ComponentCheatSheet-FieldInjectionAnnotations">Field
Injection Annotations</h2><p>Main articles: <a
href="component-classes.html">Component Classes</a>, <a
href="injection.html">Injection</a>, <a
href="annotations.html">Annotations</a></p><h3
id="ComponentCheatSheet-@Inject">@Inject</h3><p class="confluence-link">@Inject
is the Swiss Army knife of annotations; it's designed to connect your component
to services, resources, and other objects. See <a
href="injection.html">Injection</a>.</p><h4
id="ComponentCheatSheet-ServiceInjection">Service Injection</h4><p>In most
cases, the injected value is a service; the service is located by type. If
there are ambiguities, caused by multiple services implementing the same
interface, you'll see injection exceptions. You can resolve those exceptions by
adding marker annotations to select a specific service, or by adding @Service
to specify the spec
ific service ID you want.</p><div class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Use of @Service is discouraged. If
marker annotations are available, that is preferred.</p></div></div><h3
id="ComponentCheatSheet-@InjectComponent">@InjectComponent</h3><p>Injects a
component from this component's template into this component's class. Injecting
a component is based on the component's ID, which should match the field name.
However, the value attribute of the @InjectComponent annotation can be
specified as well, this takes precedence over the field name.</p><p>It is
common to inject a component in order to obtain its client-side ID (used when
generating client-side JavaScript).</p><h3
id="ComponentCheatSheet-@InjectContainer">@InjectContainer</h3><p>Injects the
container of a component or, when used in a mixin, injec
ts the component the mixin is attached to.</p><h3
id="ComponentCheatSheet-@InjectPage">@InjectPage</h3><p>Injects a page of the
application. Normally, the page to inject is identified based on the field
type. The value attribute can be specified, in which case the page to be
injected is identified by name.</p><h3
id="ComponentCheatSheet-@Environmental">@Environmental</h3><p>Injects an <a
href="environmental-services.html">environmental object</a>; such objects are
request scoped but may be overridden at any time using the methods of the
Environment service. Environmental objects are used to allow outer components
to communicate with components they enclose.</p><p>Most often, @Environmental
is used with type JavaScriptSupport, which is used to add JavaScript code and
libraries to the rendered page.</p><h2
id="ComponentCheatSheet-FieldBehaviorAnnotations">Field Behavior
Annotations</h2><p>Main articles: <a href="component-classes.html">Component
Classes</a>, <a href="annotations.html"
>Annotations</a></p><h3
>id="ComponentCheatSheet-@PageActivationContext">@PageActivationContext</h3><p>This
> annotation is allowed on a <em>single</em> field; the value of the field
>will be included in URLs for the page as the page's activation context. This
>is an alternative to implementing event handler methods for the activate and
>passivate events directly.</p><h3
>id="ComponentCheatSheet-@Parameter">@Parameter</h3><p>Marks the field as a
>component parameter. Attributes of the annotation allow the parameter to be
>marked as required or optional. If the parameter value will typically be a
>literal string (for example, the title parameter to a Layout component), you
>should add <code>defaultPrefix=BindingConstants.LITERAL</code> to the
>annotation so that users of the component won't have to use the "literal:"
>binding prefix with the parameter. See <a
>href="component-parameters.html">Component Parameters</a>.</p><h3
>id="ComponentCheatSheet-@Persist">@Persist</h3><p>Marks the field as a pe
rsistent value, one that maintains its value between requests. The default
<em>strategy</em> is to simply store the value in the session (which is created
as needed). Other strategies can be specified by name as the value attribute.
See <a href="persistent-page-data.html">Persistent Page Data</a>.</p><h3
id="ComponentCheatSheet-@Property">@Property</h3><p>Directs Tapestry to
automatically generate a getter and a setter for the field, converting it to a
JavaBeans property than can be referenced from the template.</p><h3
id="ComponentCheatSheet-@SessionState">@SessionState</h3><p>Marks the field as
a Session State Object (SSO). SSOs store global data, and can be injected into
any page or component. The SSOs are stored in the session, using a key based on
the Java type. SSOs are usually created on demand, but the <code>create</code>
attribute can turn this off. See <a href="component-cheat-sheet.html">Component
Cheat Sheet</a></p><h3 id="ComponentCheatSheet-@SessionAttribute">@SessionA
ttribute</h3><p>In Tapestry 5.2 and later, marks the field as a Session
Attribute. Like Session State Objects (SSO), a Session Attribute is stored in
the session, however Session Attributes are stored by using a name you choose
rather than based on the Java type. See <a href="session-storage.html">Session
Storage</a>.</p><h3
id="ComponentCheatSheet-@ActivationRequestParameter">@ActivationRequestParameter</h3><p>Fields
with this annotation will be encoded into URLs as query parameters, in much
the same way as data is encoded into the URL path. The query parameter name
matches the field name, unless the value attribute is specified.</p><h2
id="ComponentCheatSheet-MethodAnnotations">Method Annotations</h2><p>Main
articles: <a href="component-classes.html">Component Classes</a>, <a
href="annotations.html">Annotations</a></p><h3
id="ComponentCheatSheet-@OnEvent">@OnEvent</h3><p>Marks a method as an event
handler method. Such methods may have any visibility, and typically use package
priv
ate visibility (that is, no visibility keyword at all). By default, the method
will handle the action event from any component; the value attribute controls
the matched event, and the component annotation is used to limit the event
source.</p><p>An event handler method may take parameters, corresponding the
event context associated with the event, such as the page activation context
for the activate event. The method will not be invoked if it defines more
parameters than there are values in the context.</p><p>The @RequestParameter
annotation can be used on parameters, in which case the parameters value comes
from a request query parameter, and not from the event context.</p><p>Events
fired on a component bubble up the component's container. Return a non-null
value to cancel event bubbling. What values may be returned from an event
handler method is dependent on the type of event.</p><p>You may also return
true to indicate that the event is handled and bubbling should cancel (even fo
r events that do not permit a return value).</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>An alternative to @OnEvent is the
naming convention <code>on</code><em>EventName</em> or
<code>on</code><em>EventName</em><code>From</code><em>ComponentId</em>.</p></div></div><h3
id="ComponentCheatSheet-@Log">@Log</h3><p>Marks the method to be logged for
debugging purposes: method entry (with parameters) and exit (with return value)
will be logged at debug level, as will any thrown exception. This is primarily
for debugging purposes. The Logger name will match the component classes' fully
qualified class name.</p><h3
id="ComponentCheatSheet-@CommitAfter">@CommitAfter</h3><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning confluence
-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The support for this annotation
comes from the <a href="hibernate.html">tapestry-hibernate</a> module or <a
href="integrating-with-jpa.html">tapestry-jpa</a> module.</p></div></div><h3
id="ComponentCheatSheet-@Cached">@Cached</h3><p>Used on methods that perform
expensive operations, such as database queries. The first time such a method is
invoked, the return value is cached. Future invocations of the same method
return the cached value.</p><p>The result cache is per-request and is discarded
at the end of the request.</p><p>@Cached only works on methods that take no
parameters.</p><h2 id="ComponentCheatSheet-ParameterAnnotations">Parameter
Annotations</h2><p>Main article: <a href="component-parameters.html">Component
Parameters</a></p><h3
id="ComponentCheatSheet-@RequestParameter">@RequestParameter</h3><p>Used with
event handler methods to get the value for the parameter from a request query
parameter.
</p><h2 id="ComponentCheatSheet-TypeAnnotations">Type Annotations</h2><h3
id="ComponentCheatSheet-@Events">@Events</h3><p>Lists the names of events that
may be fired from within this component; used for documentation purposes
only.</p><h3 id="ComponentCheatSheet-@Import">@Import</h3><p>Allows JavaScript
libraries and CSS stylesheet files to be included in the rendered page. Each
such file is added to the page only once, in the order in which the page
renders.</p><p>It is allowed to use symbol expansions (with the
<code>${...</code>} syntax) inside a library or stylesheet path.</p><p>@Import
may also be applied to individual methods, in which case the import operation
only occurs when the method is invoked.</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>When specifying a file to import,
you'll often use t
he prefix <code>context:</code> to indicate that the file is stored in the web
application context, and not on the classpath. Relative paths will be on the
classpath, relative to the Java class.</p></div></div><h3
id="ComponentCheatSheet-@SupportsInformalParameters">@SupportsInformalParameters</h3><p>Marks
the component as allowing informal parameters (extra attributes in the
template that do not match formally declared parameters). Normally, informal
parameters are simply discarded.</p><p>The method
ComponentResources.renderInformalParameters() can be used to include the
informal parameters within the element rendered by your component.</p><h3
id="ComponentCheatSheet-@Secure">@Secure</h3><p>Main Article: <a
href="security.html">Security</a></p><p>Marks the page as accessible only via
secure (HTTPs). Any attempt to access the page via standard HTTP will be
redirected to the HTTPs version.</p><p>By default, the @Secure annotation is
ignored in development mode and only active in prod
uction mode.</p><h2 id="ComponentCheatSheet-RenderPhaseMethods">Render Phase
Methods</h2><p>Main article: <a href="component-rendering.html">Component
Rendering</a></p><p>Render phase methods are close cousins to event handler
methods; they are how Tapestry integrates your code into the overall rendering
of the page. For each render phase, there's an annotation and corresponding
naming convention to define a render phase method:</p><div
class="table-wrap"><table class="table table-bordered"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Annotation</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Method Name</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>General
Use</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>@SetupRender</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>setupRender()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Initializes the component before
rendering</p></td></tr><tr><td col
span="1" rowspan="1" class="confluenceTd"><p>@BeginRender</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>beginRender()</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Renders the element and primary
attributes of the component</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>@AfterRender</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>afterRender()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Closes the element started in
beginRender()</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>@CleanupRender</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>cleanupRender()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Performs cleanup after all rendering of the component
finishes</p></td></tr></tbody></table></div><p>Render phase methods either take
no parameters, or take a single parameter of type MarkupWriter.</p><p>Render
phase methods may return <code>void</code>, a <code>bo
olean</code>, or a <em>renderable object</em>.</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Generally, a <code>renderable
object</code> is a <a class="external-link"
href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/Block.html">Block</a>
or a component. The object is pushed onto the stack of rendering operations,
temporarily replacing the current component as the object to be
rendered.</p></div></div><p>Returning true is the same as returning void; it
means that the component should follow the typical
flow:</p><ul><li>@SetupRender</li><li>@BeginRender</li><li>Render the
component's template, if any</li><li>Render the component's
body</li><li>@AfterRender</li><li>@CleanupRender</li></ul><p>If a component has
a template, the component's body will only render if the template contains a <
;t:body> element. If a component has no template, then it will always
render its body (between @BeginRender and @AfterRender).</p><p>A render phase
method may also return false, in which case the flow continues to an alternate
render phase, as per the chart in the <a
href="component-cheat-sheet.html">Component Cheat Sheet</a> reference
page.</p><p>The most common cases:</p><ul><li>return <code>false</code> from
@BeginRender to skip the rendering of the component's template and/or body, and
continue with @AfterRender</li><li>return <code>false</code> from @AfterRender
to return to @BeginRender (this is used in component, such as
<code>Loop</code>, that render themselves multiple times)</li></ul><h2
id="ComponentCheatSheet-PageLifeCycleMethods">Page Life Cycle
Methods</h2><p>Main article: <a href="page-life-cycle.html">Page Life
Cycle</a></p><p>Pages have a life cycle and this is represented by a
<em>third</em> set of annotations or method naming conventions. Life cycle
methods may
appear on a page or any component of a page.</p><div
class="table-wrap"><table class="table table-bordered"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Annotation</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Method Name</p></th><th
colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@PageLoaded</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>pageLoaded()</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The page instance has been loaded but not
yet attached for the first time.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>@PageAttached</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>pageAttached()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The page is being used within a particular request.
This occurs before the activate event.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@Pa
geReset</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>pageReset()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>See notes below.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@PageDetached</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>pageDetached()</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>End of request
notification.</p></td></tr></tbody></table></div><p>Page life cycle methods may
be any visibility. They must take no parameters and return void.</p><p>Page
life cycle methods are of lower importance starting in Tapestry 5.2, since page
instances are now shared across threads, rather than pooled.</p><p>The
@PageReset life cycle is new in Tapestry 5.2. It will be invoked on a page
render request when linked to from some other page of the application. This is
to allow the page to reset its state, if any, when a user returns to the page
from some other part of the application.</p><h2 id="ComponentCheatSh
eet-ConfiguringAnnotations">Configuring Annotations</h2><p>The SymbolProvider
service has two interfaces : FactoryDefaults and ApplicationDefaults. Tapestry
provides 2 annotations in order to define which implementation you want to
override in your AppModule : </p><ul><li><p>@FactoryDefaults</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader
panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)
with @FactoryDefaults</b></div><div class="codeContent panelContent pdl">
+<p>For an exhaustive list, see the <a href="annotations.html">annotations
list</a>.</p><h2 id="ComponentCheatSheet-FieldInjectionAnnotations">Field
Injection Annotations</h2><p>Main articles: <a
href="component-classes.html">Component Classes</a>, <a
href="injection.html">Injection</a>, <a
href="annotations.html">Annotations</a></p><h3
id="ComponentCheatSheet-@Inject">@Inject</h3><p class="confluence-link">@Inject
is the Swiss Army knife of annotations; it's designed to connect your component
to services, resources, and other objects. See <a
href="injection.html">Injection</a>.</p><h4
id="ComponentCheatSheet-ServiceInjection">Service Injection</h4><p>In most
cases, the injected value is a service; the service is located by type. If
there are ambiguities, caused by multiple services implementing the same
interface, you'll see injection exceptions. You can resolve those exceptions by
adding marker annotations to select a specific service, or by adding @Service
to specify the spec
ific service ID you want.</p><div class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Use of @Service is discouraged. If
marker annotations are available, that is preferred.</p></div></div><h3
id="ComponentCheatSheet-@InjectComponent">@InjectComponent</h3><p>Injects a
component from this component's template into this component's class. Injecting
a component is based on the component's ID, which should match the field name.
However, the value attribute of the @InjectComponent annotation can be
specified as well, this takes precedence over the field name.</p><p>It is
common to inject a component in order to obtain its client-side ID (used when
generating client-side JavaScript).</p><h3
id="ComponentCheatSheet-@InjectContainer">@InjectContainer</h3><p>Injects the
container of a component or, when used in a mixin, injec
ts the component the mixin is attached to.</p><h3
id="ComponentCheatSheet-@InjectPage">@InjectPage</h3><p>Injects a page of the
application. Normally, the page to inject is identified based on the field
type. The value attribute can be specified, in which case the page to be
injected is identified by name.</p><h3
id="ComponentCheatSheet-@Environmental">@Environmental</h3><p>Injects an <a
href="environmental-services.html">environmental object</a>; such objects are
request scoped but may be overridden at any time using the methods of the
Environment service. Environmental objects are used to allow outer components
to communicate with components they enclose.</p><p>Most often, @Environmental
is used with type JavaScriptSupport, which is used to add JavaScript code and
libraries to the rendered page.</p><h2
id="ComponentCheatSheet-FieldBehaviorAnnotations">Field Behavior
Annotations</h2><p>Main articles: <a href="component-classes.html">Component
Classes</a>, <a href="annotations.html"
>Annotations</a></p><h3
>id="ComponentCheatSheet-@PageActivationContext">@PageActivationContext</h3><p>This
> annotation is allowed on a <em>single</em> field; the value of the field
>will be included in URLs for the page as the page's activation context. This
>is an alternative to implementing event handler methods for the activate and
>passivate events directly.</p><h3
>id="ComponentCheatSheet-@Parameter">@Parameter</h3><p>Marks the field as a
>component parameter. Attributes of the annotation allow the parameter to be
>marked as required or optional. If the parameter value will typically be a
>literal string (for example, the title parameter to a Layout component), you
>should add <code>defaultPrefix=BindingConstants.LITERAL</code> to the
>annotation so that users of the component won't have to use the "literal:"
>binding prefix with the parameter. See <a
>href="component-parameters.html">Component Parameters</a>.</p><h3
>id="ComponentCheatSheet-@Persist">@Persist</h3><p>Marks the field as a pe
rsistent value, one that maintains its value between requests. The default
<em>strategy</em> is to simply store the value in the session (which is created
as needed). Other strategies can be specified by name as the value attribute.
See <a href="persistent-page-data.html">Persistent Page Data</a>.</p><h3
id="ComponentCheatSheet-@Property">@Property</h3><p>Directs Tapestry to
automatically generate a getter and a setter for the field, converting it to a
JavaBeans property than can be referenced from the template.</p><h3
id="ComponentCheatSheet-@SessionState">@SessionState</h3><p>Marks the field as
a Session State Object (SSO). SSOs store global data, and can be injected into
any page or component. The SSOs are stored in the session, using a key based on
the Java type. SSOs are usually created on demand, but the <code>create</code>
attribute can turn this off. See <a href="component-cheat-sheet.html">Component
Cheat Sheet</a></p><h3 id="ComponentCheatSheet-@SessionAttribute">@SessionA
ttribute</h3><p>In Tapestry 5.2 and later, marks the field as a Session
Attribute. Like Session State Objects (SSO), a Session Attribute is stored in
the session, however Session Attributes are stored by using a name you choose
rather than based on the Java type. See <a href="session-storage.html">Session
Storage</a>.</p><h3
id="ComponentCheatSheet-@ActivationRequestParameter">@ActivationRequestParameter</h3><p>Fields
with this annotation will be encoded into URLs as query parameters, in much
the same way as data is encoded into the URL path. The query parameter name
matches the field name, unless the value attribute is specified.</p><h2
id="ComponentCheatSheet-MethodAnnotations">Method Annotations</h2><p>Main
articles: <a href="component-classes.html">Component Classes</a>, <a
href="annotations.html">Annotations</a></p><h3
id="ComponentCheatSheet-@OnEvent">@OnEvent</h3><p>Marks a method as an event
handler method. Such methods may have any visibility, and typically use package
priv
ate visibility (that is, no visibility keyword at all). By default, the method
will handle the action event from any component; the value attribute controls
the matched event, and the component annotation is used to limit the event
source.</p><p>An event handler method may take parameters, corresponding the
event context associated with the event, such as the page activation context
for the activate event. The method will not be invoked if it defines more
parameters than there are values in the context.</p><p>The @RequestParameter
annotation can be used on parameters, in which case the parameters value comes
from a request query parameter, and not from the event context.</p><p>Events
fired on a component bubble up the component's container. Return a non-null
value to cancel event bubbling. What values may be returned from an event
handler method is dependent on the type of event.</p><p>You may also return
true to indicate that the event is handled and bubbling should cancel (even fo
r events that do not permit a return value).</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>An alternative to @OnEvent is the
naming convention <code>on</code><em>EventName</em> or
<code>on</code><em>EventName</em><code>From</code><em>ComponentId</em>.</p></div></div><h3
id="ComponentCheatSheet-@Log">@Log</h3><p>Marks the method to be logged for
debugging purposes: method entry (with parameters) and exit (with return value)
will be logged at debug level, as will any thrown exception. This is primarily
for debugging purposes. The Logger name will match the component classes' fully
qualified class name.</p><h3
id="ComponentCheatSheet-@CommitAfter">@CommitAfter</h3><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning confluence
-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The support for this annotation
comes from the <a href="hibernate.html">tapestry-hibernate</a> module or <a
href="integrating-with-jpa.html">tapestry-jpa</a> module.</p></div></div><h3
id="ComponentCheatSheet-@Cached">@Cached</h3><p>Used on methods that perform
expensive operations, such as database queries. The first time such a method is
invoked, the return value is cached. Future invocations of the same method
return the cached value.</p><p>The result cache is per-request and is discarded
at the end of the request.</p><p>@Cached only works on methods that take no
parameters.</p><h2 id="ComponentCheatSheet-ParameterAnnotations">Parameter
Annotations</h2><p>Main article: <a href="component-parameters.html">Component
Parameters</a></p><h3
id="ComponentCheatSheet-@RequestParameter">@RequestParameter</h3><p>Used with
event handler methods to get the value for the parameter from a request query
parameter.
</p><h2 id="ComponentCheatSheet-TypeAnnotations">Type Annotations</h2><h3
id="ComponentCheatSheet-@Events">@Events</h3><p>Lists the names of events that
may be fired from within this component; used for documentation purposes
only.</p><h3 id="ComponentCheatSheet-@Import">@Import</h3><p>Allows JavaScript
libraries and CSS stylesheet files to be included in the rendered page. Each
such file is added to the page only once, in the order in which the page
renders.</p><p>It is allowed to use symbol expansions (with the
<code>${...</code>} syntax) inside a library or stylesheet path.</p><p>@Import
may also be applied to individual methods, in which case the import operation
only occurs when the method is invoked.</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>When specifying a file to import,
you'll often use t
he prefix <code>context:</code> to indicate that the file is stored in the web
application context, and not on the classpath. Relative paths will be on the
classpath, relative to the Java class.</p></div></div><h3
id="ComponentCheatSheet-@SupportsInformalParameters">@SupportsInformalParameters</h3><p>Marks
the component as allowing informal parameters (extra attributes in the
template that do not match formally declared parameters). Normally, informal
parameters are simply discarded.</p><p>The method
ComponentResources.renderInformalParameters() can be used to include the
informal parameters within the element rendered by your component.</p><h3
id="ComponentCheatSheet-@Secure">@Secure</h3><p>Main Article: <a
href="security.html">Security</a></p><p>Marks the page as accessible only via
secure (HTTPs). Any attempt to access the page via standard HTTP will be
redirected to the HTTPs version.</p><p>By default, the @Secure annotation is
ignored in development mode and only active in prod
uction mode.</p><h2 id="ComponentCheatSheet-RenderPhaseMethods">Render Phase
Methods</h2><p>Main article: <a href="component-rendering.html">Component
Rendering</a></p><p>Render phase methods are close cousins to event handler
methods; they are how Tapestry integrates your code into the overall rendering
of the page. For each render phase, there's an annotation and corresponding
naming convention to define a render phase method:</p><div
class="table-wrap"><table class="table table-bordered
table-responsive"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Annotation</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Method Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>General Use</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@SetupRender</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>setupRender()</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Initializes the component before
rendering</p></td
></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>@BeginRender</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>beginRender()</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Renders the element and primary attributes of the
>component</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>@AfterRender</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>afterRender()</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Closes the element started in
>beginRender()</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>@CleanupRender</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>cleanupRender()</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Performs cleanup after all rendering of the component
>finishes</p></td></tr></tbody></table></div><p>Render phase methods either
>take no parameters, or take a single parameter of type
>MarkupWriter.</p><p>Render phase methods may return <code>void</
code>, a <code>boolean</code>, or a <em>renderable object</em>.</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Generally, a <code>renderable
object</code> is a <a class="external-link"
href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/Block.html">Block</a>
or a component. The object is pushed onto the stack of rendering operations,
temporarily replacing the current component as the object to be
rendered.</p></div></div><p>Returning true is the same as returning void; it
means that the component should follow the typical
flow:</p><ul><li>@SetupRender</li><li>@BeginRender</li><li>Render the
component's template, if any</li><li>Render the component's
body</li><li>@AfterRender</li><li>@CleanupRender</li></ul><p>If a component has
a template, the component's body will only render if the templa
te contains a <t:body> element. If a component has no template, then it
will always render its body (between @BeginRender and @AfterRender).</p><p>A
render phase method may also return false, in which case the flow continues to
an alternate render phase, as per the chart in the <a
href="component-cheat-sheet.html">Component Cheat Sheet</a> reference
page.</p><p>The most common cases:</p><ul><li>return <code>false</code> from
@BeginRender to skip the rendering of the component's template and/or body, and
continue with @AfterRender</li><li>return <code>false</code> from @AfterRender
to return to @BeginRender (this is used in component, such as
<code>Loop</code>, that render themselves multiple times)</li></ul><h2
id="ComponentCheatSheet-PageLifeCycleMethods">Page Life Cycle
Methods</h2><p>Main article: <a href="page-life-cycle.html">Page Life
Cycle</a></p><p>Pages have a life cycle and this is represented by a
<em>third</em> set of annotations or method naming conventions. Life
cycle methods may appear on a page or any component of a page.</p><div
class="table-wrap"><table class="table table-bordered
table-responsive"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Annotation</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Method Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@PageLoaded</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>pageLoaded()</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The page instance has been loaded but not
yet attached for the first time.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>@PageAttached</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>pageAttached()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The page is being used within a particular request.
This occurs before the activate event.</p></td></tr><tr><td colspan="1" rowsp
an="1" class="confluenceTd"><p>@PageReset</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>pageReset()</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>See notes below.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>@PageDetached</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>pageDetached()</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>End of request
notification.</p></td></tr></tbody></table></div><p>Page life cycle methods may
be any visibility. They must take no parameters and return void.</p><p>Page
life cycle methods are of lower importance starting in Tapestry 5.2, since page
instances are now shared across threads, rather than pooled.</p><p>The
@PageReset life cycle is new in Tapestry 5.2. It will be invoked on a page
render request when linked to from some other page of the application. This is
to allow the page to reset its state, if any, when a user returns to the page
from some other part of the applic
ation.</p><h2 id="ComponentCheatSheet-ConfiguringAnnotations">Configuring
Annotations</h2><p>The SymbolProvider service has two interfaces :
FactoryDefaults and ApplicationDefaults. Tapestry provides 2 annotations in
order to define which implementation you want to override in your AppModule
: </p><ul><li><p>@FactoryDefaults</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>AppModule.java (partial) with
@FactoryDefaults</b></div><div class="codeContent panelContent pdl">
<pre><code class="language-java">@Contribute(SymbolProvider.class)
@FactoryDefaults
public void setParam(MappedConfiguration< String, String> configuration){
@@ -297,4 +297,4 @@ public void setParam(MappedConfiguration
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>
Modified: websites/production/tapestry/content/component-classes.html
==============================================================================
--- websites/production/tapestry/content/component-classes.html (original)
+++ websites/production/tapestry/content/component-classes.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Classes - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -331,4 +331,4 @@ public class Countdown
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>
Modified: websites/production/tapestry/content/component-events-faq.html
==============================================================================
--- websites/production/tapestry/content/component-events-faq.html (original)
+++ websites/production/tapestry/content/component-events-faq.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Events FAQ - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -143,11 +143,11 @@
<!-- /// Content Start -->
<div id="content">
<div id="ConfluenceContent"><h1
id="ComponentEventsFAQ-ComponentEvents">Component Events</h1><p>Main Article:
<a href="component-events.html">Component Events</a></p><h2
id="ComponentEventsFAQ-Contents">Contents</h2><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1588040565245 {padding: 0px;}
-div.rbtoc1588040565245 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1588040565245 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1588292596249 {padding: 0px;}
+div.rbtoc1588292596249 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1588292596249 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1588040565245">
+/*]]>*/</style></p><div class="toc-macro rbtoc1588292596249">
<ul class="toc-indentation"><li><a
href="#ComponentEventsFAQ-WhydoesTapestrysendaredirectafteraformissubmitted?">Why
does Tapestry send a redirect after a form is submitted?</a></li><li><a
href="#ComponentEventsFAQ-IspecifiedazoneinmyActionLink/EventLink,sowhydoesn'tmyeventfireviaajax(request.isXHR()isfalse)?">I
specified a zone in my ActionLink/EventLink, so why doesn't my event fire via
ajax (request.isXHR() is false)?</a></li></ul>
</div><h2
id="ComponentEventsFAQ-WhydoesTapestrysendaredirectafteraformissubmitted?">Why
does Tapestry send a redirect after a form is submitted?</h2><p>This is an
extension of the <a class="external-link"
href="http://en.wikipedia.org/wiki/Post/Redirect/Get"
rel="nofollow">Post/Redirect/Get</a> approach. It ensures that after an
operation that updates server-side state, such as a form submission, if the
user resubmits the resulting page, the operation is <strong>not</strong>
performed a second time; instead just the results of the operation, reflecting
the changed server-side state, is re-rendered.</p><p>This has the unwanted
requirement that any data needed to render the response must persist between
the event request (the form submission) and the render request; this often
means that fields must be annotated with @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>.
@@ -217,4 +217,4 @@ div.rbtoc1588040565245 li {margin-left:
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>
Modified: websites/production/tapestry/content/component-events.html
==============================================================================
--- websites/production/tapestry/content/component-events.html (original)
+++ websites/production/tapestry/content/component-events.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Events - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -367,4 +367,4 @@ private void timeToUpdate() {
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>
Modified: websites/production/tapestry/content/component-libraries.html
==============================================================================
--- websites/production/tapestry/content/component-libraries.html (original)
+++ websites/production/tapestry/content/component-libraries.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Libraries - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -379,4 +379,4 @@ public class HappyModule
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>
Modified: websites/production/tapestry/content/component-mixins.html
==============================================================================
--- websites/production/tapestry/content/component-mixins.html (original)
+++ websites/production/tapestry/content/component-mixins.html Fri May 1
00:29:08 2020
@@ -19,24 +19,24 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="tapestry, apache, apache tapestry, frameowrk,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
+ <meta name="keywords" content="tapestry, apache, apache tapestry, framework,
java, web, component, open source, application, dynamic, scalable, robust,
servlet">
<meta name="description" content="Apache Tapestry is a open-source
component-oriented framework for creating dynamic, robust, highly scalable web
applications in Java. Tapestry complements and builds upon the standard Java
Servlet API, and so it works in any servlet container or application server.">
<title>
Component Mixins - Apache Tapestry
</title>
- <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="images/apache-tapestry-5-icon-144.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="images/apache-tapestry-5-icon-114.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="images/apache-tapestry-5-icon-72.png">
- <link rel="apple-touch-icon-precomposed"
href="images/apache-tapestry-5-icon-57.png">
- <link rel="shortcut icon" href="images/apache-tapestry-5-icon-32.png">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144"
href="/images/apache-tapestry-5-icon-144.png">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114"
href="/images/apache-tapestry-5-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72"
href="/images/apache-tapestry-5-icon-72.png">
+ <link rel="apple-touch-icon-precomposed"
href="/images/apache-tapestry-5-icon-57.png">
+ <link rel="shortcut icon" href="/images/apache-tapestry-5-icon-32.png">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css">
- <link rel="stylesheet" href="/styles/main.css">
+ <link rel="stylesheet" href="/styles/main.css">
<script type="text/javascript">
if (window.location.protocol === 'http:' && window.location.hostname !==
'localhost') {
@@ -55,7 +55,7 @@
ga('create', 'UA-400821-1', 'auto');
ga('send', 'pageview');
</script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+ <script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<!-- /// Navigation Start -->
@@ -303,7 +303,7 @@ private TextField userId;
@MixinClasses(value={Autocomplete.class,DefaultFromCookie.class},
order={"before:discardbody;after:renderdisabled","before:autocomplete")
</code></pre>
-</div></div><p>The ordering is always specified in terms of the order of the
"forward" rendering process (setupRender, beginRender, etc.). When the
"reverse" rendering phases (afterRender, etc.) occur, the mixin order is
exactly reversed. Mixins which have no associated ordering constraints will be
ordered in a manner which is consistent with the specified constraints for all
other mixins, but is otherwise unspecified.</p><h2
id="ComponentMixins-AvailableMixins">Available Mixins</h2><p>Tapestry includes
the following mixins out-of-the-box.</p><div class="table-wrap"><table
class="table table-bordered"><tbody><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html">Autocomplete</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>modifies a text field to
provide for auto-completion of text using values retrieved from the server as
the user types.
<a href="ajax-and-zones.html">See instructions</a>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Confirm.html">Confirm</a></td><td
colspan="1" rowspan="1" class="confluenceTd">attached to a Form or link
component, runs a modal-dialog to force the user to confirm the behavior. New
for Tapestry 5.4.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/DiscardBody.html">DiscardBody</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>discards a component's body.
Returns false from the BeforeRenderBody phase, which prevents the rendering of
the body.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/F
ormFieldFocus.html">FormFieldFocus</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>instruments the outer Form on which component the focus
should be activated. Replaced by OverrideFieldFocus starting in Tapestry
5.4.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/FormGroup.html">FormGroup</a></td><td
colspan="1" rowspan="1" class="confluenceTd">attaches to a field to render an
enclosing <div> element and label for proper Bootstrap markup of text
fields, selects, and textareas</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/NotEmpty.html">NotEmpty</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>attaches to any component that
renders an element. At the end of the render, if the element is empty,
then a non-breaking space (&nbsp;) is injected into the
element.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/OverrideFieldFocus.html">OverrideFieldFocus</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>when attached to a form field,
causes that field to gain focus. Starting in Tapestry 5.4, this supersedes
FormFieldFocus.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderClientId.html">RenderClientId</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>forces a client element to
render its client id by ensuring that "getClientId" is
called.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apa
che/tapestry5/corelib/mixins/RenderDisabled.html">RenderDisabled</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>renders a "disabled" attribute
if the containing component is disabled</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderInformals.html">RenderInformals</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>renders out all informal
parameters, at the end of the BeginRender phase. This mixin can be used with
components that render a single tag inside the BeginRender
phase.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html">RenderNotification</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>triggers component event
notifications when the attached comp
onent enters its BeginRender and AfterRender render
phases.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/TriggerFragment.html">TriggerFragment</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>when applied to a Checkbox or
Radio component, links the input field and a FormFragment, making the field
control the client-side visibility of the FormFragment</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/ZoneRefresh.html">ZoneRefresh</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>periodically refreshes a Zone
by triggering an event on the server using ajax
requests.</p></td></tr></tbody></table></div><p>In addition, the following
mixins are available from other sources:</p><div class="table-wrap"><
table class="table table-bordered"><tbody><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/creatingmixins1"
rel="nofollow">ClickOnce</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>From JumpStart, a mixin to apply to a submit button,
ensuring it can't be double-clicked</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained">Confirm</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Adds a JavaScript
<em>confirm</em> prompt to any link</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/oneven"
rel="nofollow">ZoneUpdater</a></td><td colspan="1" rowspan="1"
class="confluenceTd">Updates a zone when a client-side event
occurs</td></tr></tbo
dy></table></div><h2 id="ComponentMixins-AdditionalTools">Additional
Tools</h2><p><a class="external-link"
href="http://tapestryxpath.sourceforge.net/" rel="nofollow">Tapestry-Xpath</a>
is a third-part Tapestry module that allows XPath traversal of the Tapestry
(server-side) DOM, which can be extremely useful in certain mixins.</p></div>
+</div></div><p>The ordering is always specified in terms of the order of the
"forward" rendering process (setupRender, beginRender, etc.). When the
"reverse" rendering phases (afterRender, etc.) occur, the mixin order is
exactly reversed. Mixins which have no associated ordering constraints will be
ordered in a manner which is consistent with the specified constraints for all
other mixins, but is otherwise unspecified.</p><h2
id="ComponentMixins-AvailableMixins">Available Mixins</h2><p>Tapestry includes
the following mixins out-of-the-box.</p><div class="table-wrap"><table
class="table table-bordered table-responsive"><tbody><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html">Autocomplete</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>modifies a text field to
provide for auto-completion of text using values retrieved from the server as
the user types. <a href="ajax-and-zones.html">See
instructions</a>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Confirm.html">Confirm</a></td><td
colspan="1" rowspan="1" class="confluenceTd">attached to a Form or link
component, runs a modal-dialog to force the user to confirm the behavior. New
for Tapestry 5.4.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/DiscardBody.html">DiscardBody</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>discards a component's body.
Returns false from the BeforeRenderBody phase, which prevents the rendering of
the body.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5
/corelib/mixins/FormFieldFocus.html">FormFieldFocus</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>instruments the outer Form on
which component the focus should be activated. Replaced by OverrideFieldFocus
starting in Tapestry 5.4.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/FormGroup.html">FormGroup</a></td><td
colspan="1" rowspan="1" class="confluenceTd">attaches to a field to render an
enclosing <div> element and label for proper Bootstrap markup of text
fields, selects, and textareas</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/NotEmpty.html">NotEmpty</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>attaches to any component that
renders an element. At the end of the render, if the e
lement is empty, then a non-breaking space (&nbsp;) is injected into the
element.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/OverrideFieldFocus.html">OverrideFieldFocus</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>when attached to a form field,
causes that field to gain focus. Starting in Tapestry 5.4, this supersedes
FormFieldFocus.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderClientId.html">RenderClientId</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>forces a client element to
render its client id by ensuring that "getClientId" is
called.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link" href="http://tapestry.apache.org/curren
t/apidocs/org/apache/tapestry5/corelib/mixins/RenderDisabled.html">RenderDisabled</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>renders a "disabled" attribute
if the containing component is disabled</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderInformals.html">RenderInformals</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>renders out all informal
parameters, at the end of the BeginRender phase. This mixin can be used with
components that render a single tag inside the BeginRender
phase.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html">RenderNotification</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>triggers component event
notifications when
the attached component enters its BeginRender and AfterRender render
phases.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/TriggerFragment.html">TriggerFragment</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>when applied to a Checkbox or
Radio component, links the input field and a FormFragment, making the field
control the client-side visibility of the FormFragment</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/ZoneRefresh.html">ZoneRefresh</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>periodically refreshes a Zone
by triggering an event on the server using ajax
requests.</p></td></tr></tbody></table></div><p>In addition, the following
mixins are available from other sources:</p><div cla
ss="table-wrap"><table class="table table-bordered
table-responsive"><tbody><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/creatingmixins1"
rel="nofollow">ClickOnce</a></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>From JumpStart, a mixin to apply to a submit button,
ensuring it can't be double-clicked</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><a class="external-link"
href="http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained">Confirm</a></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Adds a JavaScript
<em>confirm</em> prompt to any link</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/oneven"
rel="nofollow">ZoneUpdater</a></td><td colspan="1" rowspan="1"
class="confluenceTd">Updates a zone when a clien
t-side event occurs</td></tr></tbody></table></div><h2
id="ComponentMixins-AdditionalTools">Additional Tools</h2><p><a
class="external-link" href="http://tapestryxpath.sourceforge.net/"
rel="nofollow">Tapestry-Xpath</a> is a third-part Tapestry module that allows
XPath traversal of the Tapestry (server-side) DOM, which can be extremely
useful in certain mixins.</p></div>
</div>
<!-- /// Content End -->
</div>
@@ -357,4 +357,4 @@ private TextField userId;
</footer><br clear="none"></p><p><br clear="none"></p></div>
<!-- /// Footer End -->
</body>
-</html>
\ No newline at end of file
+</html>