This is how i include _javascript_
add( new
_javascript_Reference("validation",validations()) );
public final PackageResourceReference
validations()
{
return new PackageResourceReference(Application.get(), MyPage.class, "myValidator.js");
}
return new PackageResourceReference(Application.get(), MyPage.class, "myValidator.js");
}
and the mark up will be like given
below
<wicket:head>
<script wicket:id="validation" ></script>
</wicket:head>
Regards
Dipu
----- Original Message -----
From: "David Leangen" <[EMAIL PROTECTED]>
To: "Wicket List" <[email protected]>
Sent: Tuesday, November 01, 2005 4:46
AM
Subject: [Wicket-user] Including _javascript_ the
"Wicket" way
> Sorry for making so much noise!! I guess I should have taken more time
> before moving over to Wicket from Tapestry. Until I get used to the
> Wicket way, my productivity has gone way down. :-(
>
> Sorry for all the questions, but your help is much appreciated.
>
>
> Anyway, I am now trying to include my _javascript_ files in the way
> described here:
>
> http://www.wicket-wiki.org.uk/wiki/index.php/_javascript_
>
> But this page only really describes css in any detail. The approach does
> not appear to be exactly the same for _javascript_. For those like me who
> are doing this for the first time and haven't "got" it yet, it's not
> quite enough to get me to the "ah ha!" point.
>
> So, what is the best way to do this? For instance:
>
> <script wicket:id="js" language="_javascript_" type="text/_javascript_"
> src=""/>
>
> Along with something like:
>
> _javascript_Reference js = new _javascript_Reference("js", ThisPage.class,
> "scripts/main.js");
> add(js);
>
>
> (Obviously, this is not right, but it's all I can come up with right
> now...)
>
>
> BTW, are there any detailed references to the components/tags (including
> a list of attributes/parameters) anywhere like Tapestry has on their
> site? All I see are:
>
> http://www.wicket-wiki.org.uk/wiki/index.php/Tags
> (unfortunately, almost no useful information)
>
> http://www.wicket-library.com/wicket-examples/compref
> (seems to be a fairly complete list of components along
> with working examples, but I don't see a listing of
> the tags, parameters, or attributes to use. Also, I
> can't find the code for these examples...)
>
>
> Or at least, where should I look in the code to figure this out?
>
>
> Thanks again!
> Dave
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
