I think something ate your message. I don't see any javascript.

Are you seeing javascript errors in your browsers javascript console?

There is no reason this shouldn't work so please provide a small code
sample that shows your problem.

Thanks,
Josh

On Mon, Jul 11, 2011 at 1:11 PM, bogdan_cm <[email protected]> wrote:
> Current configuration that works:
>
> Layout Template sample (MemberPagesLayout.tml):
>
>
> &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
> &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> <head>
> <title>Alternative Reality - your secret life</title>
> <link rel="stylesheet" href="${member_menu}" type="text/css" />
> <link rel="stylesheet" href="${member_home_tables}" type="text/css" />
> <link rel="stylesheet" href="${member_home}" type="text/css" />
> <link rel="stylesheet" href="${resize}" type="text/css" />
> <link rel="stylesheet" href="${generic}" type="text/css" />
>
>
>
>
> <meta name="Keywords" content="alternative,reality" />
> <meta name="Description"
>        content="Alternative Reality - your secret life" />
> </head>
>
> <body onLoad="modifyImagesBasedOnShape()">
> ...
>
>
> ---------------------------------------------------------
> Component Page tml:
> MemberHome.tml
>
> <html t:type="MemberPagesLayout"
>        xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>
>
> <tr>
>        <td valign="top">
>
>                <table border="0" width="100%"
>                        style="padding-left: 10px; padding-top: 20px;">
> ...
>
>
> --------------------------------------------------
> Component Java extract:
>
> public class MemberHome {
>
>        // SEARCH SUBMIT LOGIC
>        @Property
>        private String userNameToLookFor;
>
>        @Component
>        private Form searchForm;
>
>        @Inject
>        private PageRenderLinkSource searchLink;
>        // SEARCH SUBMIT LOGIC
>
>        // LAST SESSION PLAY
>        @Property
>        // private String lastSessionPlay =
>        private String lastSessionPlay;
> ...
>
>
>
> -------------------------------------
> This configuration, having the javascript in the Layout component works, and
> the java script does it's part in the page.
>
>
> When I move the script from MemberPagesLayout.tml to a js, put this file
> under: Web-Content/assets/js/generic.js and annotate the MemberHome.java
> with:
> @Import(library="context:/assets/js/test.js") it stops working.
>
> I do believe i'm missing something very simple.
>
> Thanks all again for help.
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Javascript-library-not-loaded-into-the-page-via-Import-tp4574599p4576319.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to