tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TAP5-184) Improve error reporting when a javascript asset is intended to be included on page which has no <body> element
Date Wed, 05 Nov 2008 17:13:44 GMT

    [ https://issues.apache.org/jira/browse/TAP5-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645263#action_12645263
] 

Howard M. Lewis Ship commented on TAP5-184:
-------------------------------------------

I've split DocumentLinker from RenderSupport.

In RenderSupportImpl:

  public void commit()
    {
        if (focusFieldId != null)
        {
            addScript("$('%s').activate();", focusFieldId);
        }

        if (init.length() > 0)
        {
            addScript("Tapestry.init(%s);", init);
        }
    }

This means that if you provide an alternate version of RenderSupport, and the default one
receives no method invocations, then the commit() will do nothing.  So it is replaceable.

In terms of making DL "mutable" ... we're sharing some ideas for 5.1 (or 5.2, depending).
 Anyway, the point is, you can replace the DocumentLinker implementation in the Environment
before the RenderSupport filter grabs it, and your implementation can do whatever. In terms
of Facebook support, you'll want an implementation that expects the root element to be <fbml>
and put the necessary <link> and <script> tags there.

> Improve error reporting when a javascript asset is intended to be included on page which
has no <body> element
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-184
>                 URL: https://issues.apache.org/jira/browse/TAP5-184
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.0.15
>            Reporter: Michael Lake
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> I know - silly of me to have a page with no <body></body> element. I spent
an entire day trying to figure out why the javascript wasn't getting included.
> It was my error, but I can see other people making the same mistake...a little error-reporting
would be nice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message