Skip to main content



      Home
Home » Eclipse Projects » Virgo » Dynamic class loading in fragment(How to load dynamically new classes in context)
Dynamic class loading in fragment [message #758657] Thu, 24 November 2011 01:54 Go to next message
Eclipse UserFriend
HI all,

I am facing a new problem.

I have a web bundle. This web bundle is extended by a fragment which is containing new classes.

This fragment et loaded at runtime (added by user).

The problem is, I need to load beans from that fragment.

So I wish to do
String myFragmentNewBeanId = someBusinessService.getNewBeanId();
AppContextAware.getApplicationContext().getBean(myFragmentNewBeanId);


but getBean argument MUST be a final String....

Does someone here knows if it's possible to dynamically load a new bean by a non final String ?

Thanks.
Re: Dynamic class loading in fragment [message #758658 is a reply to message #758657] Thu, 24 November 2011 01:57 Go to previous message
Eclipse UserFriend
Sorry,

I am a morron...


	public ICell getCell(String cellName){
		return (ICell)AppContextAware.getApplicationContext().getBean(cellName);
	}


Here is the solution.
Previous Topic:ClassNotFoundException when using bundled spring-context-support
Next Topic:Problems registering two servlets in a WAB
Goto Forum:
  


Current Time: Sat May 17 21:56:42 EDT 2025

Powered by FUDForum. Page generated in 0.02527 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top