/** * Returns an instance for the contextual type, or null if none available. * * @param bean * Contextual type (Bean) for which an instance is desired * @return The instance, or null if none exists */ public <T> T getBean(Contextual<T> bean) { String id = null; if (config.isPortletScoped(bean)) { id = windowId; } return beans.getBeanInstance(id, bean); }