01: package com.sun.portal.app.sharedtasks.util;
02:
03: import javax.faces.context.FacesContext;
04:
05: /**
06: * Factory class for obtaining task beans.
07: *
08: * @author ashwin.mathew@sun.com
09: */
10: public class TaskBeanFactory {
11:
12: private TaskBeanFactory() {
13: }
14:
15: public static Object getBean(String beanName) {
16: FacesContext context = FacesContext.getCurrentInstance();
17:
18: return context.getApplication().getVariableResolver()
19: .resolveVariable(context, beanName);
20: }
21:
22: }
|