I done the class to change the location:
public class ConfigHtmlPath extends ResourceStreamLocator {
/**
* Constructor class
*/
public ConfigHtmlPath() {
}
/**
* Find the html resource in the dir especified
* @param clazz class to localize
* @param path path where the class is
* @return the new resource stream
*/
public IResourceStream locate(Class<?> clazz, String path)
{
String location;
String extension = path.substring(path.lastIndexOf('.') + 1);
String simpleFileName = Strings.lastPathComponent(clazz.getName(),
'.');
location = "/views/" + simpleFileName + "." + extension;
URL url;
try
{
// try to load the resource from the web context
url =
WebApplication.get().getServletContext().getResource(location);
if (url != null)
{
return new UrlResourceStream(url);
}
}
catch (MalformedURLException e)
{
throw new WicketRuntimeException(e);
}
// resource not found; fall back on class loading
return super.locate(clazz, path);
}
}
Thank you by reply! :)
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/error-in-heritance-tp3055355p3055527.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]