/*
 * $Id$
 * $Revision$
 * $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.markup.html;

import wicket.Application;
import wicket.Resource;
import wicket.ResourceReference;
import wicket.Session;

/**
 * A convenience class for creating resource references to static resources.
 * 
 * @author Jonathan Locke
 */
public class PackageResourceReference extends ResourceReference
{
	/**
	 * @param application
	 *            The application to bind to
	 * @param scope
	 *            The scope of the binding
	 * @param name
	 *            The name of the resource
	 * @see ResourceReference#ResourceReference(Class, String)
	 */
	public PackageResourceReference(Application application, Class scope, String name)
	{
		super(scope, name);
		bind(Session.get().getApplication());
	}

	/**
	 * @param application
	 *            The application to bind to
	 * @param name
	 *            The name of the resource
	 * @see ResourceReference#ResourceReference(Class, String)
	 */
	public PackageResourceReference(Application application, String name)
	{
		super(name);
		bind(Session.get().getApplication());
	}
	
	/**
	 * @see wicket.ResourceReference#newResource()
	 */
	protected Resource newResource()
	{
		return PackageResource.get(getScope().getPackage(), getName(), getLocale(), getStyle());
	}
}
@@ -787,31 +787,8 @@
 nce;
-%0Aimport wicket.Session;
 %0A%0A/*
@@ -1330,34 +1330,17 @@
 %0A%09%09bind(
-Session.get().getA
+a
 pplicati
@@ -1337,26 +1337,24 @@
 (application
-()
 );%0A%09%7D%0A%0A%09/**%0A
@@ -1639,26 +1639,9 @@
 ind(
-Session.get().getA
+a
 ppli
@@ -1646,18 +1646,16 @@
 lication
-()
 );%0A%09%7D%0A%09%0A

Refactor pilot error. Wanted to use application parameter, not Application.get().