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/10/19 11:47:24 UTC
svn commit: r826619 - in /myfaces/extensions/scripting/trunk:
core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/
core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators...
Author: werpu
Date: Mon Oct 19 09:47:23 2009
New Revision: 826619
URL: http://svn.apache.org/viewvc?rev=826619&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-26
reverting
Added:
myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestValidator.java
- copied, changed from r826618, myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java
Modified:
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/ScriptingApplicationFactory.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/LifefcycleProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/NavigationHandlerProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BeanImplementationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ConverterImplementationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/MapEntityAnnotationScanner.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/SingleEntityAnnotationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedComponent.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/startup/IntialScanAnnotationListener.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/QDoxTest.java
myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy-taglib.xml
myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/ScriptingApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/ScriptingApplicationFactory.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/ScriptingApplicationFactory.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/factories/ScriptingApplicationFactory.java Mon Oct 19 09:47:23 2009
@@ -29,16 +29,15 @@
/**
* Application factory which introduces
* scripting proxies for their artefacts
- *
+ * <p/>
* We use a mix of AOP and helper constructs
* to reach the goal to be dynamic.
* For most artefacts we just need to
* check if the object is a Groovy object
* and then reload at their connection interfaces
- *
+ * <p/>
* Some artefacts have a longer lifespan and/or are stateless
- * for those we have to work with reloading AOP
- *
+ * for those we have to work with reloading AOP
*
* @author Werner Punz
*/
@@ -55,8 +54,7 @@
public Application getApplication() {
Application retVal = _delegate.getApplication(); //To change body of implemented methods use File | Settings | File Templates.
-
- if (scriptingEnabled && !(retVal instanceof ApplicationProxy) )
+ if (scriptingEnabled && !(retVal instanceof ApplicationProxy))
retVal = new ApplicationProxy(retVal);
return retVal;
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java Mon Oct 19 09:47:23 2009
@@ -22,6 +22,7 @@
import org.apache.myfaces.scripting.api.ScriptingConst;
import org.apache.myfaces.scripting.core.util.ProxyUtils;
import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedResourceHandler;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedComponent;
import javax.el.*;
import javax.faces.FacesException;
@@ -43,6 +44,12 @@
* our decorating applicstion
* which should resolve our bean issues within a central
* bean processing interceptor
+ * <p/>
+ *
+ * TODO at component reload via annotations the component family is lost
+ * locate where it is and then add the family handling here
+ * so that it is set again!
+ * (Line 490 it is lost)
*
* @author Werner Punz
*/
@@ -94,9 +101,8 @@
public UIComponent createComponent(ValueExpression valueExpression, FacesContext facesContext, String s) throws FacesException, NullPointerException {
weaveDelegate();
- System.out.println("create1");
UIComponent component = _delegate.createComponent(valueExpression, facesContext, s);
-
+ UIComponent oldComponent = component;
//We can replace annotated components on the fly via
//ApplicationImpl.addComponent(final String componentType, final String componentClassName)
@@ -111,15 +117,18 @@
* maybe in the long run we can make a decorator here instead
* but for now lets try it this way
*/
- if (ProxyUtils.isDynamic(component.getClass()) && !alreadyWovenInRequest(component.toString())) {
- /*once it was tainted we have to recreate all the time*/
- component = (UIComponent) ProxyUtils.getWeaver().reloadScriptingInstance(component);
- alreadyWovenInRequest(component.toString());
+ component = (UIComponent) reloadInstance(component);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, valueExpression, facesContext, s);
}
+
return component;
}
+
public ExpressionFactory getExpressionFactory() {
weaveDelegate();
return _delegate.getExpressionFactory();
@@ -275,26 +284,41 @@
weaveDelegate();
//the components are generated anew very often
//we cannot do an on object weaving here
- UIComponent component = _delegate.createComponent(componentType);
+ UIComponent oldComponent = _delegate.createComponent(componentType);
/*we are reweaving on the fly because we cannot be sure if
* the class is not recycled all the time in the creation
* code, in the renderer we do it on method base
* due to the fact that our renderers are recycled via
* a flyweight pattern*/
- return (UIComponent) reloadInstance(component);
+ UIComponent component = (UIComponent) reloadInstance(oldComponent);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, componentType);
+ }
+
+ return component;
+
}
public UIComponent createComponent(ValueBinding valueBinding, FacesContext facesContext, String componentType) throws FacesException {
weaveDelegate();
- UIComponent component = _delegate.createComponent(valueBinding, facesContext, componentType);
+ UIComponent oldComponent = _delegate.createComponent(valueBinding, facesContext, componentType);
/*we are reweaving on the fly because we cannot be sure if
* the class is not recycled all the time in the creation
* code, in the renderer we do it on method base
* due to the fact that our renderers are recycled via
* a flyweight pattern*/
- return (UIComponent) reloadInstance(component);
+ UIComponent component = (UIComponent) reloadInstance(oldComponent);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, valueBinding, facesContext, componentType);
+ }
+
+ return component;
}
public Iterator<String> getComponentTypes() {
@@ -431,22 +455,68 @@
}
}
+
+ //TODO implement those
@Override
public UIComponent createComponent(FacesContext facesContext, Resource resource) {
- return super.createComponent(facesContext, resource);
+ weaveDelegate();
+
+ UIComponent oldComponent = _delegate.createComponent(facesContext, resource);
+
+ /*we are reweaving on the fly because we cannot be sure if
+ * the class is not recycled all the time in the creation
+ * code, in the renderer we do it on method base
+ * due to the fact that our renderers are recycled via
+ * a flyweight pattern*/
+ UIComponent component = (UIComponent) reloadInstance(oldComponent);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, facesContext, resource);
+ }
+
+ return component;
+
}
@Override
- public UIComponent createComponent(FacesContext facesContext, String s, String s1) {
+ public UIComponent createComponent(FacesContext facesContext, String componentType, String rendererType) {
weaveDelegate();
- //TODO check if we can add a component weaving here, but I assume it is handled in the viewroot already decently
- return _delegate.createComponent(facesContext, s, s1);
+ UIComponent oldComponent = _delegate.createComponent(facesContext, componentType, rendererType);
+
+ /*we are reweaving on the fly because we cannot be sure if
+ * the class is not recycled all the time in the creation
+ * code, in the renderer we do it on method base
+ * due to the fact that our renderers are recycled via
+ * a flyweight pattern*/
+ UIComponent component = (UIComponent) reloadInstance(oldComponent);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, facesContext, componentType, rendererType);
+ }
+
+ return component;
}
@Override
public UIComponent createComponent(ValueExpression valueExpression, FacesContext facesContext, String s, String s1) {
weaveDelegate();
- return (UIComponent) reloadInstance(_delegate.createComponent(valueExpression, facesContext, s, s1));
+ UIComponent oldComponent = _delegate.createComponent(valueExpression, facesContext, s, s1);
+
+ /*we are reweaving on the fly because we cannot be sure if
+ * the class is not recycled all the time in the creation
+ * code, in the renderer we do it on method base
+ * due to the fact that our renderers are recycled via
+ * a flyweight pattern*/
+ UIComponent component = (UIComponent) reloadInstance(oldComponent);
+
+ //we now have to check for an annotation change, but only in case a reload has happened
+ if (component.getClass().hashCode() != oldComponent.getClass().hashCode()) {
+ return handeAnnotationChange(component, valueExpression, facesContext, s, s1);
+ }
+
+ return component;
}
@Override
@@ -559,4 +629,98 @@
return true;
}
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, ValueExpression valueExpression, FacesContext facesContext, String s) {
+ UIComponent componentToChange = _delegate.createComponent(valueExpression, facesContext, s);
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+ componentToChange = _delegate.createComponent(valueExpression, facesContext, s);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
+
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, String componentType) {
+ UIComponent componentToChange = _delegate.createComponent(componentType);
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+ componentToChange = _delegate.createComponent(componentType);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, ValueBinding valueBinding, FacesContext context, String componentType) {
+ UIComponent componentToChange = _delegate.createComponent(valueBinding, context, componentType);
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+ componentToChange = _delegate.createComponent(valueBinding, context, componentType);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, FacesContext context, Resource resource) {
+ UIComponent componentToChange = _delegate.createComponent(context, resource);
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+ componentToChange = _delegate.createComponent(context, resource);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, FacesContext context, String componentType, String rendererType) {
+ UIComponent componentToChange = _delegate.createComponent(context, componentType, rendererType);
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+ componentToChange = _delegate.createComponent(context, componentType, rendererType);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
+ private UIComponent handeAnnotationChange(UIComponent oldComponent, ValueExpression valueExpression, FacesContext facesContext, String s, String s1) {
+ UIComponent componentToChange = _delegate.createComponent(valueExpression, facesContext, s, s1);
+ String family = oldComponent.getFamily();
+ if (componentToChange instanceof PurgedComponent) {
+ ProxyUtils.getWeaver().fullAnnotationScan();
+
+ //via an additional create component we can check whether a purged component
+ //was registered after the reload because the annotation has been removed
+
+ componentToChange = _delegate.createComponent(valueExpression, facesContext, s, s1);
+ if (componentToChange instanceof PurgedComponent) {
+ throw new FacesException("Annotation on component removed but no replacement found");
+ }
+ return componentToChange;
+ }
+ return oldComponent;
+ }
+
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ELResolverProxy.java Mon Oct 19 09:47:23 2009
@@ -83,6 +83,7 @@
return newRetVal;
}
_getValue.set(Boolean.TRUE);
+ //base == null means bean el
if (base == null) {
final FacesContext facesContext = FacesContext.getCurrentInstance();
RuntimeConfig config = RuntimeConfig.getCurrentInstance(facesContext.getExternalContext());
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/LifefcycleProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/LifefcycleProxy.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/LifefcycleProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/LifefcycleProxy.java Mon Oct 19 09:47:23 2009
@@ -36,7 +36,7 @@
Lifecycle _delegate = null;
private void weaveDelegate() {
- if(_delegate != null)
+ if (_delegate != null)
_delegate = (Lifecycle) ProxyUtils.getWeaver().reloadScriptingInstance(_delegate);
}
@@ -49,7 +49,7 @@
weaveDelegate();
/*we can put our object weaving code into the add here*/
if (ProxyUtils.isDynamic(phaseListener.getClass()))
- phaseListener = (PhaseListener) ProxyUtils.createMethodReloadingProxyFromObject(phaseListener, PhaseListener.class);
+ phaseListener = (PhaseListener) ProxyUtils.createMethodReloadingProxyFromObject(phaseListener, PhaseListener.class);
_delegate.addPhaseListener(phaseListener);
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/NavigationHandlerProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/NavigationHandlerProxy.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/NavigationHandlerProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/NavigationHandlerProxy.java Mon Oct 19 09:47:23 2009
@@ -48,7 +48,6 @@
}
-
public Object getDelegate() {
return _delegate; //To change body of implemented methods use File | Settings | File Templates.
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java Mon Oct 19 09:47:23 2009
@@ -30,6 +30,7 @@
import javax.faces.render.ClientBehaviorRenderer;
import javax.faces.context.ResponseWriter;
import javax.faces.context.ResponseStream;
+import javax.faces.FacesException;
import java.io.Writer;
import java.io.OutputStream;
import java.util.Iterator;
@@ -58,17 +59,35 @@
//renderers itself are flyweight patterns which means they are shared over objects
renderer = (Renderer) reloadInstance(renderer);
- //we have a purged renderer we now have to trigger a full recompile and rescan!
- //and once found we should get the new renderer in recursively without further hazzles
- if (renderer instanceof PurgedRenderer) {
- ProxyUtils.getWeaver().fullAnnotationScan();
- }
+
_delegate.addRenderer(s, s1, renderer);
}
public Renderer getRenderer(String s, String s1) {
weaveDelegate();
- return (Renderer) reloadInstance(_delegate.getRenderer(s, s1));
+ Renderer rendr = _delegate.getRenderer(s, s1);
+ Renderer rendr2 = (Renderer) reloadInstance(rendr);
+ if (rendr != rendr2) {
+ rendr2 = _delegate.getRenderer(s, s1);
+ if (rendr2 instanceof PurgedRenderer) {
+ return handleAnnotationChange(s, s1);
+ }
+
+ _delegate.addRenderer(s, s1, rendr2);
+ return rendr2;
+ }
+ return rendr;
+ }
+
+ private Renderer handleAnnotationChange(String s, String s1) {
+ Renderer rendr2;
+ ProxyUtils.getWeaver().fullAnnotationScan();
+ rendr2 = _delegate.getRenderer(s, s1);
+ if (rendr2 instanceof PurgedRenderer) {
+ throw new FacesException("Renderer not found");
+ }
+ rendr2 = _delegate.getRenderer(s, s1);
+ return rendr2;
}
public ResponseStateManager getResponseStateManager() {
@@ -134,8 +153,10 @@
return null;
}
if (ProxyUtils.isDynamic(instance.getClass()) && !alreadyWovenInRequest(instance.toString())) {
- instance = ProxyUtils.getWeaver().reloadScriptingInstance(instance);
alreadyWovenInRequest(instance.toString());
+ instance = ProxyUtils.getWeaver().reloadScriptingInstance(instance);
+
+ //now the add should be done properly if possible
}
return instance;
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BaseAnnotationScanListener.java Mon Oct 19 09:47:23 2009
@@ -48,8 +48,18 @@
}
protected String getAnnotatedStringParam(Map<String, Object> propMap, String key) {
- AnnotationConstant propVal = (AnnotationConstant) propMap.get(key);
+ Object tempPropVal = propMap.get(key);
+ if(tempPropVal instanceof String) {
+ return (String) tempPropVal;
+ }
+ AnnotationConstant propVal = (AnnotationConstant) tempPropVal;
+ if (propVal == null) {
+ return null;
+ }
String val = (String) propVal.getParameterValue();
+ if (val == null) {
+ return null;
+ }
val = val.replaceAll("\"", "");
return val;
}
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=826619&r1=826618&r2=826619&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 Mon Oct 19 09:47:23 2009
@@ -47,11 +47,11 @@
public class BeanImplementationListener extends BaseAnnotationScanListener implements AnnotationScanListener {
- private static final String SCOPE_SESSION = "session";
- private static final String SCOPE_APPLICATION = "application";
- private static final String SCOPE_VIEW = "view";
- private static final String SCOPE_NONE = "none";
- private static final String SCOPE_CUSTOM = "custom";
+ private static final String SCOPE_SESSION = "session";
+ private static final String SCOPE_APPLICATION = "application";
+ private static final String SCOPE_VIEW = "view";
+ private static final String SCOPE_NONE = "none";
+ private static final String SCOPE_CUSTOM = "custom";
public boolean supportsAnnotation(String annotation) {
@@ -331,7 +331,7 @@
ProxyUtils.getEventProcessor().dispatchEvent(new BeanRemovedEvent(className, mbeanToDispatch.getManagedBeanName()));
}
- for(String toRemove: mbeanKey) {
+ for (String toRemove : mbeanKey) {
_alreadyRegistered.remove(toRemove);
}
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/BehaviorImplementationListener.java Mon Oct 19 09:47:23 2009
@@ -21,6 +21,8 @@
import com.thoughtworks.qdox.model.JavaClass;
import org.apache.myfaces.scripting.api.AnnotationScanListener;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedComponent;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedBehavior;
import javax.faces.component.behavior.FacesBehavior;
@@ -30,17 +32,16 @@
*/
public class BehaviorImplementationListener extends SingleEntityAnnotationListener implements AnnotationScanListener {
+
public BehaviorImplementationListener() {
super();
_entityParamValue = "value";
}
-
public boolean supportsAnnotation(String annotation) {
return annotation.equals(FacesBehavior.class.getName()); //To change body of implemented methods use File | Settings | File Templates.
}
-
protected void addEntity(Class clazz, String val) {
if (log.isTraceEnabled()) {
log.trace("addBehavior(" + val + ","
@@ -57,4 +58,13 @@
getApplication().addBehavior(val, clazz.getFullyQualifiedName());
}
+ @Override
+ public void purge(String className) {
+ super.purge(className);
+ String val = (String) _alreadyRegistered.remove(className);
+ if (val != null) {
+ getApplication().addBehavior(val, PurgedBehavior.class.getName());
+ }
+ }
+
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ComponentImplementationListener.java Mon Oct 19 09:47:23 2009
@@ -20,11 +20,10 @@
import com.thoughtworks.qdox.model.JavaClass;
import org.apache.myfaces.scripting.api.AnnotationScanListener;
+import org.apache.myfaces.scripting.core.util.ProxyUtils;
import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedComponent;
import javax.faces.component.FacesComponent;
-import java.util.Map;
-import java.util.Iterator;
/**
* @author Werner Punz (latest modification by $Author$)
@@ -50,7 +49,9 @@
+ clazz.getName() + ")");
}
getApplication().addComponent(val, clazz.getName());
- _alreadyRegistered.put(val, clazz.getName());
+ //TODO check by debugging into the impl why the family is lost
+ //if we run into this stage via reloading
+ _alreadyRegistered.put(clazz.getName(), val);
}
protected void addEntity(JavaClass clazz, String val) {
@@ -58,25 +59,17 @@
log.trace("addComponent(" + val + ","
+ clazz.getFullyQualifiedName() + ")");
}
+ ProxyUtils.getWeaver().loadScriptingClassFromName(clazz.getFullyQualifiedName());
getApplication().addComponent(val, clazz.getFullyQualifiedName());
- _alreadyRegistered.put(val, clazz.getFullyQualifiedName());
+ _alreadyRegistered.put(clazz.getFullyQualifiedName(), val);
}
-
@Override
public void purge(String className) {
super.purge(className);
- Iterator<Map.Entry<String, Object>> it = _alreadyRegistered.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry<String, Object> entry = it.next();
- String storedClassName = (String) entry.getValue();
- if (className.equals(storedClassName)) {
- //this is a recursive call into getApplication().addComponent we have to
- //our application has to respond to this by blocking additional scans
- //if the add component already has been called and is not finished
- getApplication().addComponent(entry.getKey(), PurgedComponent.class.getName());
- it.remove();
- }
+ String val = (String) _alreadyRegistered.remove(className);
+ if (val != null) {
+ getApplication().addComponent(val, PurgedComponent.class.getName());
}
}
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ConverterImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ConverterImplementationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ConverterImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ConverterImplementationListener.java Mon Oct 19 09:47:23 2009
@@ -20,8 +20,12 @@
import com.thoughtworks.qdox.model.JavaClass;
import org.apache.myfaces.scripting.api.AnnotationScanListener;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedRenderer;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedConverter;
import javax.faces.convert.FacesConverter;
+import javax.faces.render.RenderKit;
+import javax.faces.application.Application;
import java.util.Map;
/**
@@ -123,11 +127,23 @@
return true;
}
- return alreadyRegistered.equals(entry);
+ return !alreadyRegistered.equals(entry);
}
public boolean supportsAnnotation(String annotation) {
return annotation.equals(FacesConverter.class.getName());
}
+ @Override
+ public void purge(String className) {
+ super.purge(className);
+ AnnotationEntry entry = (AnnotationEntry) _alreadyRegistered.remove(className);
+ if (entry == null) {
+ return;
+ }
+
+ Application renderKit = getApplication();
+ renderKit.addConverter(entry.getValue(), PurgedConverter.class.getName());
+ }
+
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/MapEntityAnnotationScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/MapEntityAnnotationScanner.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/MapEntityAnnotationScanner.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/MapEntityAnnotationScanner.java Mon Oct 19 09:47:23 2009
@@ -54,7 +54,7 @@
Map<String, Object> parms = new HashMap<String, Object>(_annotationParms.length);
for (String accessor : _annotationParms) {
- ReflectUtil.fastExecuteMethod(annotation, accessor, new Object[0]);
+ parms.put(accessor ,ReflectUtil.fastExecuteMethod(annotation, accessor, new Object[0]));
}
if (hasToReregister(parms, clazz)) {
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/RendererImplementationListener.java Mon Oct 19 09:47:23 2009
@@ -96,7 +96,7 @@
}
public String getRenderKitId() {
- return rendererType;
+ return renderKitId;
}
}
@@ -108,8 +108,8 @@
@Override
protected void addEntity(Class clazz, Map<String, Object> params) {
- String value = (String) params.get(PAR_FAMILY);
- String theDefault = (String) params.get(PAR_RENDERERTYPE);
+ String value = (String) getAnnotatedStringParam(params, PAR_FAMILY);
+ String theDefault = (String) getAnnotatedStringParam(params, PAR_RENDERERTYPE);
String renderKitId = getRenderKitId(params);
RenderKit renderKit = getRenderkit(renderKitId);
@@ -138,8 +138,8 @@
@Override
protected void addEntity(JavaClass clazz, Map<String, Object> params) {
- String value = (String) params.get(PAR_FAMILY);
- String theDefault = (String) params.get(PAR_RENDERERTYPE);
+ String value = getAnnotatedStringParam(params, PAR_FAMILY);
+ String theDefault = getAnnotatedStringParam(params, PAR_RENDERERTYPE);
String renderKitId = getRenderKitId(params);
RenderKit renderKit = getRenderkit(renderKitId);
@@ -159,7 +159,7 @@
try {
//recompile the class here because we cannot deal with the renderer otherwise
- renderKit.addRenderer((String) params.get(PAR_FAMILY), (String) params.get(PAR_RENDERERTYPE), (Renderer) ProxyUtils.getWeaver().loadScriptingClassFromName(clazz.getFullyQualifiedName()).newInstance());
+ renderKit.addRenderer(getAnnotatedStringParam(params,PAR_FAMILY), getAnnotatedStringParam(params, PAR_RENDERERTYPE), (Renderer) ProxyUtils.getWeaver().loadScriptingClassFromName(clazz.getFullyQualifiedName()).newInstance());
} catch (InstantiationException e) {
log.error(e);
} catch (IllegalAccessException e) {
@@ -191,7 +191,7 @@
if (alreadyRegistered == null) {
return true;
}
-
+ //here the check if the new class is the same as the old one
return alreadyRegistered.equals(entry);
}
@@ -204,11 +204,11 @@
AnnotationEntry entry = new AnnotationEntry(value, theDefault, renderKitId);
AnnotationEntry alreadyRegistered = (AnnotationEntry) _alreadyRegistered.get(clazz.getFullyQualifiedName());
- if (alreadyRegistered == null) {
- return true;
+ if (alreadyRegistered != null) {
+ return !alreadyRegistered.equals(entry);
}
- return alreadyRegistered.equals(entry);
+ return true;
}
@Override
@@ -219,10 +219,8 @@
return;
}
- Map<String, Object> newParams = new HashMap<String, Object>();
- newParams.put(PAR_FAMILY, entry.getComponentFamily());
- newParams.put(PAR_RENDERERTYPE, entry.getRendererType());
- newParams.put(PAR_RENDERKITID, entry.getRenderKitId());
+ //TODO handle the changed renderer params, but annotation on same
+ //class case (remove and add case on the same class)
RenderKit renderKit = getRenderkit(entry.getRenderKitId());
try {
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/SingleEntityAnnotationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/SingleEntityAnnotationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/SingleEntityAnnotationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/SingleEntityAnnotationListener.java Mon Oct 19 09:47:23 2009
@@ -43,7 +43,6 @@
public void register(Class clazz, Annotation annotation) {
-
String val = (String) ReflectUtil.executeMethod(annotation, _entityParamValue);
if (hasToReregister(val, clazz)) {
addEntity(clazz, val);
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedComponent.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedComponent.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedComponent.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedComponent.java Mon Oct 19 09:47:23 2009
@@ -35,200 +35,200 @@
* @version $Revision$ $Date$
*/
-public class PurgedComponent extends UIComponent{
+public class PurgedComponent extends UIComponent {
@Override
public Map<String, Object> getAttributes() {
- return null;
+ return null;
}
@Override
public boolean isRendered() {
- return false;
+ return false;
}
@Override
public void setValueBinding(String name, ValueBinding binding) {
-
+
}
@Override
public String getClientId(FacesContext context) {
- return null;
+ return null;
}
@Override
public String getFamily() {
- return null;
+ return null;
}
@Override
public String getId() {
- return null;
+ return null;
}
@Override
public void setId(String id) {
-
+
}
@Override
public void setParent(UIComponent parent) {
-
+
}
@Override
public UIComponent getParent() {
- return null;
+ return null;
}
@Override
public void setRendered(boolean rendered) {
-
+
}
@Override
public String getRendererType() {
- return null;
+ return null;
}
@Override
public void setRendererType(String rendererType) {
-
+
}
@Override
public boolean getRendersChildren() {
- return false;
+ return false;
}
@Override
public ValueBinding getValueBinding(String name) {
- return null;
+ return null;
}
@Override
public List<UIComponent> getChildren() {
- return null;
+ return null;
}
@Override
public int getChildCount() {
- return 0;
+ return 0;
}
@Override
public UIComponent findComponent(String expr) {
- return null;
+ return null;
}
@Override
public Map<String, UIComponent> getFacets() {
- return null;
+ return null;
}
@Override
public UIComponent getFacet(String name) {
- return null;
+ return null;
}
@Override
public Iterator<UIComponent> getFacetsAndChildren() {
- return null;
+ return null;
}
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException {
-
+
}
@Override
public void decode(FacesContext context) {
-
+
}
@Override
public void encodeBegin(FacesContext context) throws IOException {
-
+
}
@Override
public void encodeChildren(FacesContext context) throws IOException {
-
+
}
@Override
public void encodeEnd(FacesContext context) throws IOException {
-
+
}
@Override
protected void addFacesListener(FacesListener listener) {
-
+
}
@Override
protected FacesListener[] getFacesListeners(Class clazz) {
- return new FacesListener[0];
+ return new FacesListener[0];
}
@Override
protected void removeFacesListener(FacesListener listener) {
-
+
}
@Override
public void queueEvent(FacesEvent event) {
-
+
}
@Override
public void processRestoreState(FacesContext context, Object state) {
-
+
}
@Override
public void processDecodes(FacesContext context) {
-
+
}
@Override
public void processValidators(FacesContext context) {
-
+
}
@Override
public void processUpdates(FacesContext context) {
-
+
}
@Override
public Object processSaveState(FacesContext context) {
- return null;
+ return null;
}
@Override
protected FacesContext getFacesContext() {
- return null;
+ return null;
}
@Override
protected Renderer getRenderer(FacesContext context) {
- return null;
+ return null;
}
public Object saveState(FacesContext context) {
- return null;
+ return null;
}
public void restoreState(FacesContext context, Object state) {
-
+
}
public boolean isTransient() {
- return false;
+ return false;
}
public void setTransient(boolean newTransientValue) {
-
+
}
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java Mon Oct 19 09:47:23 2009
@@ -67,6 +67,6 @@
}
public Object getDelegate() {
- return _delegate;
+ return _delegate;
}
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/startup/IntialScanAnnotationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/startup/IntialScanAnnotationListener.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/startup/IntialScanAnnotationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/startup/IntialScanAnnotationListener.java Mon Oct 19 09:47:23 2009
@@ -29,10 +29,10 @@
/**
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
- *
- * we do the initial source scan after the entire application has started up
- * we now can reuse our jsf2 system event faclities by placing
- * a listener to the application startup
+ * <p/>
+ * we do the initial source scan after the entire application has started up
+ * we now can reuse our jsf2 system event faclities by placing
+ * a listener to the application startup
*/
public class IntialScanAnnotationListener implements SystemEventListener {
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java Mon Oct 19 09:47:23 2009
@@ -26,8 +26,8 @@
/**
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
- *
- * Testprobe for the qdox evaluation testbed
+ * <p/>
+ * Testprobe for the qdox evaluation testbed
*/
@ManagedBean(name = "TestProbe")
@@ -35,6 +35,5 @@
@Ignore
public class Probe {
-
-
+
}
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/QDoxTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/QDoxTest.java?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/QDoxTest.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/QDoxTest.java Mon Oct 19 09:47:23 2009
@@ -36,12 +36,12 @@
* @version $Revision$ $Date$
* <p/>
* Testing ground for qdox evaluation
- *
- *
- * we set it to ignore because it is a testing
- *
- * class to evaluate how to handle qdox
- * on java sources
+ * <p/>
+ * <p/>
+ * we set it to ignore because it is a testing
+ * <p/>
+ * class to evaluate how to handle qdox
+ * on java sources
*/
@Ignore
@@ -75,7 +75,7 @@
for (Annotation annot : annotations) {
System.out.println(annot.toString());
managedBeanFound |= annot.getType().getValue().equals("javax.faces.bean.ManagedBean");
- if(managedBeanFound) {
+ if (managedBeanFound) {
break;
}
}
Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy-taglib.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy-taglib.xml?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy-taglib.xml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy-taglib.xml Mon Oct 19 09:47:23 2009
@@ -23,4 +23,19 @@
<renderer-type>org.apache.myfaces.groovyloader.test.Test</renderer-type>
</component>
</tag>
+ <tag>
+ <tag-name>testcomponent2</tag-name>
+ <component>
+ <component-type>at.irian.JavaTestComponent</component-type>
+ <renderer-type>at.irian.JavaTestRenderer</renderer-type>
+ </component>
+ </tag>
+ <tag>
+ <tag-name>testcomponent3</tag-name>
+ <component>
+ <component-type>at.irian.JavaTestComponent</component-type>
+ <renderer-type>at.irian.JavaTestRenderer</renderer-type>
+ </component>
+ </tag>
+
</facelet-taglib>
Copied: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestValidator.java (from r826618, myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java)
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestValidator.java?p2=myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestValidator.java&p1=myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java&r1=826618&r2=826619&rev=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/test/java/org/apache/myfaces/scripting/Probe.java (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestValidator.java Mon Oct 19 09:47:23 2009
@@ -16,25 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.myfaces.scripting;
-
-import org.junit.Ignore;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
+package org.apache.myfaces.javaloader.test;
/**
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
- *
- * Testprobe for the qdox evaluation testbed
*/
-@ManagedBean(name = "TestProbe")
-@SessionScoped
-@Ignore
-public class Probe {
-
-
-
+@Val
+public class TestValidator {
}
Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml?rev=826619&r1=826618&r2=826619&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml Mon Oct 19 09:47:23 2009
@@ -22,7 +22,7 @@
<h:outputFormat value = "#{testbean.xxx}" />
<h:outputFormat value = "#{javatestbean.sayHello}" />
<h:commandButton value = "Press me dynamic" action = "#{testbean.doit}" />
-
+ <grv:testcomponent2 />
</h:panelGrid>
</h:form>
</ui:define>