Just wanted to invite some peer review for this change I just
committed for MYFACES-1588. The problem was that managed beans in
scope "none" weren't accessible via the resolver. The change I made
passes the test cases but there might be a more elegant way to
implement it.
Also, I have an update for the ValueBindingImplCactus.java test case
to check for this bug (looked like a good place for it) but I
couldn't figure out how to run cactus from maven. Does that work OK
and if so can anyone provide tips on how to execute?
Best wishes,
Paul
On Apr 18, 2007, at 4:53 PM, [EMAIL PROTECTED] wrote:
Author: pmcmahan
Date: Wed Apr 18 13:53:26 2007
New Revision: 530154
URL: http://svn.apache.org/viewvc?view=rev&rev=530154
Log:
MYFACES-1588 resolve managed beans in scope "none"
Modified:
myfaces/core/branches/jsf12/impl/src/main/java/org/apache/
myfaces/el/unified/resolver/ManagedBeanResolver.java
Modified: myfaces/core/branches/jsf12/impl/src/main/java/org/apache/
myfaces/el/unified/resolver/ManagedBeanResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/impl/
src/main/java/org/apache/myfaces/el/unified/resolver/
ManagedBeanResolver.java?view=diff&rev=530154&r1=530153&r2=530154
======================================================================
========
--- myfaces/core/branches/jsf12/impl/src/main/java/org/apache/
myfaces/el/unified/resolver/ManagedBeanResolver.java (original)
+++ myfaces/core/branches/jsf12/impl/src/main/java/org/apache/
myfaces/el/unified/resolver/ManagedBeanResolver.java Wed Apr 18
13:53:26 2007
@@ -74,15 +74,6 @@
extContext.getApplicationMap().put(name, obj);
}
});
- s_standardScopes.put(
- "none",
- new Scope()
- {
- public void put(ExternalContext extContext, String
name, Object obj)
- {
- // do nothing
- }
- });
}
/**
@@ -156,8 +147,13 @@
ManagedBean managedBean = runtimeConfig
(context).getManagedBean(strProperty);
if (managedBean != null) {
- storeManagedBean(managedBean, facesContext(context));
+ FacesContext facesContext = facesContext(context);
context.setPropertyResolved(true);
+ if ("none".equals(managedBean.getManagedBeanScope())) {
+ return beanBuilder.buildManagedBean(facesContext,
managedBean);
+ } else {
+ storeManagedBean(managedBean, facesContext);
+ }
}
return null;