/** Copy of {@link JavascriptResourceReference} from Apache Wicket 1.4.7
*/
@Override
protected Resource newResource() {
PackageResource packageResource = JavascriptPackageResource.newPackageResource(getScope(),
getName(), getLocale(), getStyle());
if (packageResource != null)
{
locale = packageResource.getLocale();
}
else
{
throw new IllegalArgumentException("package resource [scope=" + getScope() + ",name=" +
getName() + ",locale=" + getLocale() + "style=" + getStyle() + "] not found");