You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2009/09/22 10:48:54 UTC
svn commit: r817546 -
/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java
Author: werpu
Date: Tue Sep 22 08:48:54 2009
New Revision: 817546
URL: http://svn.apache.org/viewvc?rev=817546&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-18
starting works on the class scanning additionall to the source scan
Modified:
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java?rev=817546&r1=817545&r2=817546&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java Tue Sep 22 08:48:54 2009
@@ -49,27 +49,11 @@
}
- /**
- * simple check we do not check for the contents of the managed property here
- * This is somewhat a simplification does not drag down the managed property handling
- * speed too much
- * <p/>
- * TODO we have to find a way to enable the checking on managed property level
- * so that we can replace the meta data on the fly (probably by extending the interface)
- * for first registration this is enough
- *
- * @param name
- * @param clazz
- * @return
- */
- public boolean hasToReregister(String name, JavaClass clazz) {
- ManagedBean mbean = _alreadyRegistered.get(name);
- return mbean == null || !mbean.getManagedBeanClassName().equals(clazz.getName());
- }
-
-
public void register(Class clazz, String annotationName, Map<String, Object> params) {
- throw new UnsupportedOperationException("Not yet implemented");
+ RuntimeConfig config = getRuntimeConfig();
+ String propVal = (String) params.get("name");
+
+ //TODO rest of compiled class registration
}
@@ -91,7 +75,7 @@
AnnotationConstant propVal = (AnnotationConstant) params.get("name");
String beanName = (String) propVal.getParameterValue();
- beanName = beanName.replaceAll("\"","");
+ beanName = beanName.replaceAll("\"", "");
if (!hasToReregister(beanName, clazz)) {
return;
}
@@ -137,6 +121,25 @@
/**
+ * simple check we do not check for the contents of the managed property here
+ * This is somewhat a simplification does not drag down the managed property handling
+ * speed too much
+ * <p/>
+ * TODO we have to find a way to enable the checking on managed property level
+ * so that we can replace the meta data on the fly (probably by extending the interface)
+ * for first registration this is enough
+ *
+ * @param name
+ * @param clazz
+ * @return
+ */
+ private boolean hasToReregister(String name, JavaClass clazz) {
+ ManagedBean mbean = _alreadyRegistered.get(name);
+ return mbean == null || !mbean.getManagedBeanClassName().equals(clazz.getName());
+ }
+
+
+ /**
* <p>Return an array of all <code>Field</code>s reflecting declared
* fields in this class, or in any superclass other than
* <code>java.lang.Object</code>.</p>