It sounds like you're just getting started with Wicket.  Why are you
"rocking the boat" already?  Just put the markup where it belongs and
don't try messing with putting it elsewhere until you truly understand
what you're doing.

On Tue, Nov 23, 2010 at 9:26 AM, Alis <ajcalve...@yahoo.es> wrote:
>
>   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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to