Thanks for having a look at this.
As per Thiago's request for code

I'm using the latest 3.1.1 bootstrap...

from AppModule class
================

@Contribute(SymbolProvider.class)
@ApplicationDefaults
public static void setupEnvironment(MappedConfiguration<String, Object>
configuration)
{
configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
"jquery");
configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:bootstrap");


Here's the page class.
================

@Import(stylesheet = {"context:less/waterwork.less",
"context:css/site.css"}, library = {"context:js/tweet.js",
        "context:js/waterwork.js"
, "context:bootstrap/js/bootstrap.js"})
public class Index {

    @Inject
    @Path("context:download/LX-S-3.pdf")
    private Asset manualPdf;

    @Inject
    private PageRenderLinkSource pageRenderLinkSource;

    @Inject
    private EmailService emailService;

    @Inject
    private Logger logger;

    @Inject
    private Messages messages;

    @Inject
    private AlertManager alertManager;

    @Inject
    private JavaScriptSupport renderSupport;

    @InjectComponent
    private Form registerForm;

    @InjectComponent
    private Zone formZone;

    @Property
    @Validate("required, regexp")
    private String emailAddress;

    @SetupRender
    private void setupRender() {
        renderSupport.importJavaScriptLibrary("///
cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js");
    }

    private void onPrepareForRender() {
        logger.debug("clearing fields");
        emailAddress = null;
    }

    private Object onSuccess() {
        if (registerForm.getHasErrors()) {
            return formZone.getBody();
        }

        Email email = new Email();
        email.address = emailAddress;
        email.subject = "Download Manual - Wild West Pool Specialties";
        email.url =
pageRenderLinkSource.createPageRenderLink(ca.wwps.pages.Index.class).toAbsoluteURI()+manualPdf.toClientURL().substring(1);
        try {
            emailService.sendEmail(true, email);
        } catch (EmailSendException e) {
            logger.error("Error sending email to recipient :: {}",
email.address, e);
            alertManager.alert(Duration.SINGLE, Severity.ERROR,
messages.format("failure", emailAddress));
            return formZone.getBody();
        }
        alertManager.alert(Duration.TRANSIENT, Severity.INFO,
messages.format("success", emailAddress));
        return formZone.getBody();
    }

    public String getCurrentPageUrl() {
        Link link = pageRenderLinkSource.createPageRenderLink(getClass());
        return link.toAbsoluteURI();
    }
}


my custom javascripts
waterwork.js
==========

//jQuery to collapse the navbar on scroll
$(window).scroll(function() {
    if ($(".navbar").offset().top > 50) {
        $(".navbar-fixed-top").addClass("top-nav-collapse");
    } else {
        $(".navbar-fixed-top").removeClass("top-nav-collapse");
    }
});

//jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
    $('.page-scroll a').bind('click', function(event) {
        var $anchor = $(this);
        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 1500, 'easeInOutExpo');
        event.preventDefault();
    });
});

tweet.js
======
$(document).ready(function(){
    $('a[data-text]').each(function(){
      $(this).attr('data-text', "Here's something interesting over at
wwps.ca");
    });
    $.getScript('http://platform.twitter.com/widgets.js');
});

Thanks for having a look.



On Sat, Apr 26, 2014 at 10:34 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Code could be a factor here, so please post it.
>
>
> On Fri, 25 Apr 2014 15:05:46 -0300, Jon Williams <
> williams.jonat...@gmail.com> wrote:
>
>  Nope, just 1. This is a very simple SPA. So there's only 1 page template
>> involved, doesn't even use a Layout component. There's 1 page, 1 zone, 1
>> form & 1 alerts component.
>>
>> I thought about making a simpler test case, but it's already super simple,
>> i can't see how I could really get any simpler.
>>
>> If you want to have a look at the javascript running, the site is live @
>> http://wildwestpoolspecialties.appspot.com/
>>
>>
>> Just for thoroughness, here's my page template...
>> thanks
>>
>> <!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"/>
>>     <meta name="viewport" content="width=device-width,
>> initial-scale=1.0"/>
>>     <meta name="description" content=""/>
>>     <meta name="author" content="digimax.com"/>
>>
>>     <meta property="og:title"
>>           content="Wild West Pool Specialties"/>
>>     <meta property="og:site_name" content="Wild West Pool Specialties"/>
>>     <meta property="og:description" content="Canada's leader in pool and
>> spa control systems. Download the manual here."/>
>>
>>     <title>Wild West Pool Specialties</title>
>>     <!-- Fonts -->
>>     <link href="
>> http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/
>> font-awesome.min.css"
>> rel="stylesheet" type="text/css"/>
>>     <link href='
>> http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic'
>> rel='stylesheet' type='text/css'/>
>>     <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700
>> '
>> rel='stylesheet' type='text/css'/>
>>
>>     <link rel="image_src" href="img/intro-bg.jpg" />
>> </head>
>>
>> <body id="page-top" data-spy="scroll" data-target=".navbar-custom">
>>
>> <nav class="navbar navbar-custom navbar-fixed-top" role="navigation">
>>     <div class="container">
>>         <div class="navbar-header page-scroll">
>>             <button type="button" class="navbar-toggle"
>> data-toggle="collapse" data-target=".navbar-main-collapse">
>>                 <i class="fa fa-bars"></i>
>>             </button>
>>             <a class="navbar-brand" href="#page-top">
>>                 <i class="fa fa-play-circle"></i>Wild West
>>             </a>
>>         </div>
>>
>>         <!-- Collect the nav links, forms, and other content for toggling
>> -->
>>         <div class="collapse navbar-collapse navbar-right
>> navbar-main-collapse">
>>             <ul class="nav navbar-nav">
>>                 <!-- Hidden li included to remove active class from about
>> link when scrolled up past about section -->
>>                 <li class="hidden">
>>                     <a href="#page-top"></a>
>>                 </li>
>>                 <li class="page-scroll">
>>                     <a href="#download">Download</a>
>>                 </li>
>>                 <li class="page-scroll">
>>                     <a href="#about">About</a>
>>                 </li>
>>                 <li class="page-scroll">
>>                     <a href="#contact">Contact</a>
>>                 </li>
>>             </ul>
>>         </div>
>>         <!-- /.navbar-collapse -->
>>     </div>
>>     <!-- /.container -->
>> </nav>
>>
>> <section class="intro">
>>     <div class="intro-body">
>>         <div class="container">
>>             <div class="row">
>>                 <div class="col-md-8 col-md-offset-2">
>>                     <h1 class="brand-heading title-banner">Wild West Pool
>> Specialties</h1>
>>                     <p class="intro-text">Canada's premiere source for
>> pool
>> control systems.</p>
>>                     <div class="page-scroll">
>>                         <a href="#download" class="btn btn-circle">
>>                             <i class="fa fa-angle-double-down
>> animated"></i>
>>                         </a>
>>                     </div>
>>                 </div>
>>             </div>
>>         </div>
>>     </div>
>> </section>
>>
>> <section id="download" class="container content-section text-center">
>>     <div class="download-section">
>>         <div class="container">
>>             <div class="col-lg-8 col-lg-offset-2">
>>                 <h2>Download Manual</h2>
>>                 <p>We'll send you a link to download the manual. Please
>> provide your email address.</p>
>>                 <img src="${context:img/pdf_manual.jpg}" alt="LX-S
>> CONTROLLER"/>
>>                 <t:zone t:id="formZone">
>>                     <form t:type="form" t:id="registerForm"
>> class="form-horizontal text-left" zone="^" autofocus="false">
>>                         <t:alerts />
>>                         <fieldset>
>>                             <div class="form-group">
>>                                 <t:label for="emailAddress"
>> class="col-lg-4
>> control-label">enter your email address</t:label>
>>                                 <div class="col-lg-8">
>>                                     <input t:type="textfield"
>> t:id="emailAddress" value="emailAddress" placeholder="Type your email
>> address here"/>
>>                                 </div>
>>                             </div>
>>                             <button t:type="submit" t:id="register"
>> t:mixins="disableaftersubmit" class="btn btn-default btn-lg"
>> value="Download"/>
>>                         </fieldset>
>>                     </form>
>>                 </t:zone>
>>             </div>
>>         </div>
>>     </div>
>> </section>
>>
>> <section id="about" class="content-section text-center">
>>     <div class="about-section">
>>         <div class="container">
>>             <div class="col-lg-8 col-lg-offset-2">
>>                 <h2>About Us</h2>
>>                 <p>The undisputed best in pool control systems. Canadian
>> owned and operated since 1999.</p>
>>             </div>
>>         </div>
>>     </div>
>> </section>
>>
>> <section id="contact" class="container content-section text-center">
>>     <div class="row">
>>         <div class="col-lg-8 col-lg-offset-2">
>>             <h2>Contact Wild West</h2>
>>             <p>Feel free to email us to provide feedback on our site, give
>> us suggestions, or to just say hello!</p>
>>             <p>wild.west.pool.specialt...@gmail.com</p>
>>             <ul class="list-inline banner-social-buttons">
>>                 <li><span t:type="facebook" url="${currentPageUrl}"/></li>
>>                 <li><span t:type="twitter" url="${currentPageUrl}"/></li>
>>             </ul>
>>         </div>
>>     </div>
>>     <footer>
>>         <p style="font-size: smaller;">copyright &#x00A9; 2014 wild west
>> pool specialties. all rights reserved.</p>
>>     </footer>
>> </section>
>> </body>
>>
>> </html>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Apr 25, 2014 at 10:13 AM, Howard Lewis Ship <hls...@gmail.com
>> >wrote:
>>
>>  Is there any possibility that there are two different Alerts components
>>> on
>>> the page?
>>>
>>> On Thu, Apr 24, 2014 at 2:20 PM, Jon Williams
>>> <williams.jonat...@gmail.com>wrote:
>>>
>>> > Still broken in the beta5.
>>> > Pretty sure this is a bug, i'll make a JIRA issue.
>>> >
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>> @hlship
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to