You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/01/17 19:00:28 UTC

[jira] [Closed] (WICKET-4987) Inherited markup and classload

     [ https://issues.apache.org/jira/browse/WICKET-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier closed WICKET-4987.
------------------------------

    Resolution: Not A Problem
      Assignee: Sven Meier

Wicket stores the name of the container class with the markup, later it uses IClassResolver to resolve the class again.

You can set this up in your Application:

    public void init() {
	super.init();

	final ClassLoader cl = ... // create a suitable classLoader
	getApplicationSettings().setClassResolver(new AbstractClassResolver() {
	    @Override
	    public ClassLoader getClassLoader() {
		return cl;
	    }
	});
    }

In your page do:

    Class clz = getApplication().getApplicationSettings().getClassResolver().resolveClass("com.mycompany.ChildPage");

                
> Inherited markup and classload
> ------------------------------
>
>                 Key: WICKET-4987
>                 URL: https://issues.apache.org/jira/browse/WICKET-4987
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.4.0
>         Environment: Linux OpenJDK 1.7
>            Reporter: Peter Henderson
>            Assignee: Sven Meier
>         Attachments: wicket-classloader.tar.gz
>
>
> Wicket cannot load markup when a child page inherits from a base page and the 2 pages are not from the same class loader.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira