See CompoundClassResolver. Designed for this purpose.

On 12/11/2012 14:12, Martin Grigorov wrote:
Hi,

Since you use custom ClassLoaders you have to use custom IClassResolver too.


On Fri, Nov 9, 2012 at 5:22 PM, Decebal Suiu <[email protected]> wrote:

Hi

I'm working to first version of wicket-plugin. I encounter some problems.
In few words I implemented a PluginManagerInitializer that create a
PluginManager, load and start the plugins from a directory
and store the plugin manager to application using wicket meta data.
Each plugin is loaded with a PluginClassLaoder.
I want to map each plugin's resources on ./plugin/plugin-name/...

My problem is how to create a reference to a plugin resource.

See this code:

     @Extension
     public static class HelloSection extends SimpleSection {

         public HelloSection() {
             //super(new Model<String>("Hello"), new
PluginResourceReference(HelloSection.class, "settings.png"));
                 super(new Model<String>("Hello"), new
PackageResourceReference(HelloSection.class, "settings.png"));
         }

     }

In above code I want to add a new tab (section) to my TabbedPanel (I
created
a demo application with a tabbed panel and itabs from plugins)
but HelloSection.class is not visible to wicket (I retrieve a
CastClassException).
It seems to me that I cannot use ResourceReference in my case because
"scope" parameter (must be visible in wicket but I want something relative
to plugin baseResourcesPath).

Any advice how can I implement my idea is welcome.

Best regards,
Decebal




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/need-advice-for-wicket-plugin-s-implementation-tp4653751.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]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to