Apache tapestry - Initial commit
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
|
||||
>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>${title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="shortcut icon" href="${asset:context:/favicon.ico}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<t:pagelink page="index" class="navbar-brand">app</t:pagelink>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<t:loop source="pageNames" value="pageName">
|
||||
<t:any element="li" class="prop:classForPageName">
|
||||
<t:pagelink page="prop:pageName">${pageName}</t:pagelink>
|
||||
</t:any>
|
||||
</t:loop>
|
||||
</ul>
|
||||
<span class="navbar-right">
|
||||
<li>
|
||||
<t:pagelink page="login" class="btn btn-default navbar-btn">Sign in</t:pagelink>
|
||||
</li>
|
||||
</span>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<t:alerts/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<t:body />
|
||||
|
||||
<hr />
|
||||
|
||||
<footer>
|
||||
<p>© Your Company 2015</p>
|
||||
</footer>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="com.baeldung.tapestry" level="TRACE"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,23 @@
|
||||
<html t:type="layout" title="About apache-tapestry"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
|
||||
xmlns:p="tapestry:parameter">
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>About apache-tapestry application ...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t:if test="learn">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>
|
||||
To learn more go to
|
||||
<a href="http://tapestry.apache.org">Tapestry home</a>
|
||||
and start typing...
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</t:if>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<html t:type="layout" title="Contact com.baeldung"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
|
||||
xmlns:p="tapestry:parameter">
|
||||
|
||||
<p>Contact com.baeldung ...</p>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<html t:type="layout" title="Not found apache-tapestry"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
|
||||
xmlns:p="tapestry:parameter">
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h1>Requested page not found!</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
greeting=Welcome to Tapestry 5! We hope that this project template will get you going in style.
|
||||
@@ -0,0 +1,46 @@
|
||||
<html t:type="layout" title="apache-tapestry Index"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
|
||||
>
|
||||
|
||||
<!-- Most of the page content, including <head>, <body>, etc. tags, comes from Layout.tml -->
|
||||
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
<div class="hero-unit">
|
||||
<p>
|
||||
<img src="${asset:context:images/tapestry.png}"
|
||||
alt="${message:greeting}" title="${message:greeting}"/>
|
||||
</p>
|
||||
<h3>${message:greeting}</h3>
|
||||
<p>The current time is: <strong>${currentTime}</strong></p>
|
||||
<p>
|
||||
This is a template for a simple marketing or informational website. It includes a large callout called
|
||||
the hero unit and three supporting pieces of content. Use it as a starting point to create something
|
||||
more unique.
|
||||
</p>
|
||||
<p><t:actionlink t:id="learnmore" class="btn btn-primary btn-large">Learn more »</t:actionlink></p>
|
||||
</div>
|
||||
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Normal link</h2>
|
||||
<p>Clink the bottom link and the page refresh with event <code>complete</code></p>
|
||||
<p><t:eventlink event="complete" class="btn btn-default">Complete»</t:eventlink></p>
|
||||
</div>
|
||||
<t:zone t:id="middlezone" class="span4">
|
||||
|
||||
</t:zone>
|
||||
<div class="span4">
|
||||
<h2>Ajax link</h2>
|
||||
<p>Click the bottom link to update just the middle column with Ajax call with event <code>ajax</code></p>
|
||||
<p><t:eventlink event="ajax" zone="middlezone" class="btn btn-default">Ajax»</t:eventlink></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t:block t:id="block">
|
||||
<h2>Ajax updated</h2>
|
||||
<p>I'v been updated through AJAX call</p>
|
||||
<p>The current time is: <strong>${currentTime}</strong></p>
|
||||
</t:block>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html t:type="layout" title="apache-tapestry com.example"
|
||||
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
|
||||
xmlns:p="tapestry:parameter">
|
||||
|
||||
<div class="row">
|
||||
<div class="span4 offset3">
|
||||
<t:form t:id="login">
|
||||
<h2>Please sign in</h2>
|
||||
<t:textfield t:id="email" class="input-block-level" validate="required" placeholder="Email address"/>
|
||||
<t:passwordfield t:id="password" class="input-block-level" validate="required" placeholder="Password"/>
|
||||
<t:submit class="btn btn-large btn-primary" value="Sign in"/>
|
||||
</t:form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
# Default to info level output; this is very handy if you eventually use Hibernate as well.
|
||||
log4j.rootCategory=info, A1
|
||||
|
||||
# A1 is set to be a ConsoleAppender.
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
|
||||
# A1 uses PatternLayout.
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A1.layout.ConversionPattern=[%p] %c{2} %m%n
|
||||
|
||||
# Service category names are the name of the defining module class
|
||||
# and then the service id.
|
||||
log4j.category.com.baeldung.tapestry.services.AppModule.TimingFilter=info
|
||||
|
||||
# Outputs a list of pages, components and mixins at startup.
|
||||
log4j.category.org.apache.tapestry5.modules.TapestryModule.ComponentClassResolver=info
|
||||
|
||||
# Outputs startup statistics; elapsed time to setup and initialize the registry, a list of
|
||||
# available services, and a launch banner that includes the Tapestry version number.
|
||||
log4j.category.org.apache.tapestry5.TapestryFilter=info
|
||||
|
||||
|
||||
# Turning on debug mode for a page's or component's transformer logger
|
||||
# will show all of the code changes that occur when the
|
||||
# class is loaded.
|
||||
|
||||
# log4j.category.tapestry.transformer.com.baeldung.tapestry.pages.Index=debug
|
||||
|
||||
# Turning on debug mode for a component's events logger will show all the events triggered on the
|
||||
# component, and which component methods are invoked as a result.
|
||||
|
||||
# log4j.category.tapestry.events.com.baeldung.tapestry.pages.Index=debug
|
||||
|
||||
# Turning on trace mode for a page's render logger provides extended information about every step
|
||||
# in rendering (this is not generally helpful). Turning on debug mode will add a one-line
|
||||
# summary that includes the elapsed render time, which can be useful in tracking down
|
||||
# performance issues.
|
||||
|
||||
# log4j.category.tapestry.render.com.baeldung.tapestry.pages.Index=debug
|
||||
|
||||
# Turn on some verbose debugging about everything in the application. This is nice initially,
|
||||
# while getting everything set up. You'll probably want to remove this once you are
|
||||
# up and running, replacing it with more selective debugging output.
|
||||
log4j.category.com.baeldung.tapestry=debug
|
||||
Reference in New Issue
Block a user