* @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle)
*/
public void respond(RequestCycle requestCycle)
{
Application application = requestCycle.getApplication();
SharedResources sharedResources = application.getSharedResources();
final String resourceKey = getRequestParameters().getResourceKey();
Resource resource = sharedResources.get(resourceKey);
// try to lazily register
if (resource == null)
{
int ix = resourceKey.indexOf('/');
if (ix != -1)
{
String className = resourceKey.substring(0, ix);
IClassResolver resolver = application.getApplicationSettings().getClassResolver();
Class scope = null;
try
{
// First try to match mounted resources.
scope = Application.get().getSharedResources().getAliasClass(className);
// If that fails, resolve it as a fully qualified class
// name.
if (scope == null)
{
scope = resolver.resolveClass(className);
}
String path = resourceKey.substring(ix + 1);
PackageResource packageResource = PackageResource.get(scope, path);
if (sharedResources.get(resourceKey) == null)
{
sharedResources.add(resourceKey, packageResource);
}
resource = packageResource;
}
catch (Exception e)
{