Professional Documents
Culture Documents
com
CONTENTS INCLUDE:
n
Project Layout
n
Tapestry Annotations and more...
If you are using Maven, it can build a template project for you.
async = whether to make
as callback (similar to onclick,
assign a function object
onreadystatechange event model)
onload, etc. in browser
request
add a header to the HTTP
setRequestHeader
(namevalue)
send the request
send(body) as request body
body = string to be used
-DarchetypeArtifactId=quickstart \
-DgroupId=com.wizzco -DartifactId=snuz Subscribe Now for FREE!
-DpackageName=com.wizzco.snuz
Refcardz.com
You can replace the parts in bold with values specific to your
LinkSubmit A JavaScript-enabled link to submit a form. SuportsInformalParameters Marks the component as supporting additional, non-
formal parameters.
Palette JavaScrript multiple selection and reordering.
PasswordField Single line input field with input obscured. Method Annotation Description
Radio Exclusive toggle button. Log Tapestry should log method entry and exit (at debug level).
RadioGroup Invisible component that organizes Radio OnEvent Method is an event handler method.
components into an exclusive group.
Cached Return value of method should be cached against later
Select Drop down list. invocations.
Submit Clicking form-submit button CommitAfter The Hibernate transaction should be committed after
invoking the method.
TextArea Multiple-line text input field.
TextField Single line input field.
Many additional method annotations are discussed later, in
Tapestry’s scaffolding components allow for quick user interfac- component rendering. All those annotations have a naming
es for ordinary JavaBeans to be assembled quickly and easily. convention alternative.
void beginRender(MarkupWriter writer) { Using the @Inject annotation on a field of type java.util.Locale
writer.element(“div”, “class”, “popup”); will inject the page’s locale. This can be used to format dates
resources.renderInformalParameters(writer); and currency values.
}
Tapestry includes a number of useful services that can be Detailed component reference (with examples):
injected into components or other services. Other services http://tapestry.apache.org/tapestry5/tapestry-core/ref/
are useful not for injection, but to be configured. Tapestry Wiki:
Service Description http://wiki.apache.org/tapestry/
ApplicationDefaults Configuration overrides FactoryDefaults symbols used
to configure other services.
A B O U T T HE A U T H O R REC O MMEN D E D B O O K
Howard M. Lewis Ship Tapestry in Action
Howard M. Lewis Ship is the creator of the Apache The definitive guide to the Tapestry ap-
Tapestry project. He is a frequent speaker at JavaOne, proach: creating full-featured web apps by
ApacheCon, No Fluff Just Stuff, and other software connecting framework components to eco-
conferences. He is the author of “Tapestry in Action” nomical amounts of application code. Many
for Manning Publications, which covers Tapestry 3. He simple examples show you how to tackle
has trained dozens of developers in Tapestry over the common tasks such as form validation, ap-
last five years, is currently the Director of Open Source plication localization, client-side scripting,
Technology at Formos, a Vancouver, Washington based and synchronization between browser and app server.
consulting company.
Web site BUY NOW
http://howardlewisship.com books.dzone.com/books/tapestryinaction
http://www.formos.com
more than 1.7 million software developers, architects and decision Refcardz Feedback Welcome
refcardz@dzone.com
$7.95