Author: alexsmirnov
Date: 2007-04-30 13:31:18 -0400 (Mon, 30 Apr 2007)
New Revision: 140
Added:
trunk/samples/createProject.bat
trunk/samples/createProject.sh
trunk/samples/tomahawkCompability/
trunk/samples/tomahawkCompability/.exadelproject
trunk/samples/tomahawkCompability/pom.xml
trunk/samples/tomahawkCompability/src/
trunk/samples/tomahawkCompability/src/main/
trunk/samples/tomahawkCompability/src/main/java/
trunk/samples/tomahawkCompability/src/main/java/org/
trunk/samples/tomahawkCompability/src/main/java/org/ajax4jsf/
trunk/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
trunk/samples/tomahawkCompability/src/main/resources/
trunk/samples/tomahawkCompability/src/main/webapp/
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
trunk/samples/tomahawkCompability/src/main/webapp/index.jsp
trunk/samples/tomahawkCompability/src/main/webapp/pages/
trunk/samples/tomahawkCompability/src/main/webapp/pages/index.jsp
trunk/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
trunk/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
trunk/samples/tomahawkCompability/src/test/
trunk/samples/tomahawkCompability/src/test/java/
trunk/samples/tomahawkCompability/src/test/java/org/
trunk/samples/tomahawkCompability/src/test/java/org/ajax4jsf/
trunk/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
trunk/samples/useCases/
trunk/samples/useCases/.exadelproject
trunk/samples/useCases/pom.xml
trunk/samples/useCases/src/
trunk/samples/useCases/src/main/
trunk/samples/useCases/src/main/java/
trunk/samples/useCases/src/main/java/logging.properties
trunk/samples/useCases/src/main/java/org/
trunk/samples/useCases/src/main/java/org/ajax4jsf/
trunk/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
trunk/samples/useCases/src/main/resources/
trunk/samples/useCases/src/main/webapp/
trunk/samples/useCases/src/main/webapp/WEB-INF/
trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml
trunk/samples/useCases/src/main/webapp/index.jsp
trunk/samples/useCases/src/main/webapp/pages/
trunk/samples/useCases/src/main/webapp/pages/index.jsp
trunk/samples/useCases/src/main/webapp/pages/index.xhtml
trunk/samples/useCases/src/main/webapp/pages/prependId.xhtml
trunk/samples/useCases/src/test/
trunk/samples/useCases/src/test/java/
trunk/samples/useCases/src/test/java/org/
trunk/samples/useCases/src/test/java/org/ajax4jsf/
trunk/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
Modified:
trunk/a4j-portlet/src/main/resources/META-INF/faces-config.xml
trunk/cdk/generator/pom.xml
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
trunk/cdk/generator/src/main/resources/META-INF/templates/converter.vm
trunk/cdk/generator/src/main/resources/META-INF/templates/validator.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/converter.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/validator.vm
trunk/cdk/pom.xml
trunk/framework/pom.xml
trunk/framework/src/main/config/faces/original-faces-config.xml
trunk/framework/src/main/config/faces/original-faces-config.xml.l4t
trunk/framework/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
trunk/framework/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/samples/ajaxPortlet/pom.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
trunk/samples/pom.xml
Log:
applied patces from AJSF-12.
create sample projects for a framework use-cases
AjaxContext instance for a a4j-portlet library moved to jar from a application
faces-config.xml
fixed AJSF-53
Modified: trunk/a4j-portlet/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/a4j-portlet/src/main/resources/META-INF/faces-config.xml 2007-04-27 17:56:16 UTC
(rev 139)
+++ trunk/a4j-portlet/src/main/resources/META-INF/faces-config.xml 2007-04-30 17:31:18 UTC
(rev 140)
@@ -9,6 +9,13 @@
<factory>
<faces-context-factory>org.ajax4jsf.portlet.context.FacesContextFactoryImpl</faces-context-factory>
</factory>
+
+ <managed-bean>
+ <managed-bean-name>ajaxContext</managed-bean-name>
+
<managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
<render-kit>
<renderer>
Modified: trunk/cdk/generator/pom.xml
===================================================================
--- trunk/cdk/generator/pom.xml 2007-04-27 17:56:16 UTC (rev 139)
+++ trunk/cdk/generator/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -52,9 +52,13 @@
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_03</version>
- <scope>test</scope>
</dependency>
<dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
<groupId>qdox</groupId>
<artifactId>qdox</artifactId>
<version>1.6</version>
Modified:
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java 2007-04-27
17:56:16 UTC (rev 139)
+++
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -8,6 +8,8 @@
import java.util.HashMap;
import java.util.Map;
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
import javax.naming.ConfigurationException;
import org.apache.commons.beanutils.PropertyUtils;
@@ -275,4 +277,95 @@
return false;
}
+ public boolean isStateHolderRequired() {
+ getLog().info("isStateHolderRequired");
+ for (PropertyBean propertyBean : getProperties())
+ {
+ getLog().info("Property " + propertyBean.getName() + "/"
+ propertyBean.isTransient());
+ if (!propertyBean.isTransient())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isSuperclassImplementsStateHolder()
+ {
+ try {
+ Class superClass = getLoader().loadClass(getSuperclass());
+ return (StateHolder.class.isAssignableFrom(superClass));
+ } catch (ClassNotFoundException e) {
+ getLog().error("superclass not found for tag "+getTag().getName(),
e);
+ return false;
+ }
+ }
+
+ public boolean isSuperSaveStateMethodExists()
+ {
+ try {
+ Class superClass = getLoader().loadClass(getSuperclass());
+ Class[] signature = {FacesContext.class};
+ try {
+ Method m = superClass.getMethod("saveState", signature);
+ return !Modifier.isAbstract(m.getModifiers());
+ } catch (NoSuchMethodException e) {
+ return false;
+ }
+ } catch (ClassNotFoundException e) {
+ getLog().error("superclass not found for tag "+getTag().getName(),
e);
+ return false;
+ }
+ }
+
+ public boolean isSuperRestoreStateMethodExists()
+ {
+ try {
+ Class superClass = getLoader().loadClass(getSuperclass());
+ Class[] signature = {FacesContext.class, Object.class};
+ try {
+ Method m = superClass.getMethod("restoreState", signature);
+ return !Modifier.isAbstract(m.getModifiers());
+ } catch (NoSuchMethodException e) {
+ return false;
+ }
+ } catch (ClassNotFoundException e) {
+ getLog().error("superclass not found for tag "+getTag().getName(),
e);
+ return false;
+ }
+ }
+
+ public boolean isSuperIsTransientMethodExists()
+ {
+ try {
+ Class superClass = getLoader().loadClass(getSuperclass());
+ Class[] signature = new Class[0];
+ try {
+ Method m = superClass.getMethod("isTransient", signature);
+ return !Modifier.isAbstract(m.getModifiers());
+ } catch (NoSuchMethodException e) {
+ return false;
+ }
+ } catch (ClassNotFoundException e) {
+ getLog().error("superclass not found for tag "+getTag().getName(),
e);
+ return false;
+ }
+ }
+
+ public boolean isSuperSetTransientMethodExists()
+ {
+ try {
+ Class superClass = getLoader().loadClass(getSuperclass());
+ Class[] signature = {boolean.class};
+ try {
+ Method m = superClass.getMethod("setTransient", signature);
+ return !Modifier.isAbstract(m.getModifiers());
+ } catch (NoSuchMethodException e) {
+ return false;
+ }
+ } catch (ClassNotFoundException e) {
+ getLog().error("superclass not found for tag "+getTag().getName(),
e);
+ return false;
+ }
+ }
}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/converter.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/converter.vm 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/converter.vm 2007-04-30
17:31:18 UTC (rev 140)
@@ -1,204 +1,204 @@
-package $package;
-
-#foreach($import in $imports)
-import $import ;
-#end
-
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import java.io.IOException;
-import javax.faces.FacesException;
-import javax.faces.component.StateHolder;
-
-/**
- * Converter-Id ${converter.id}
- * ${converter.xmlEncodedDescription}
- */
-public class $converter.simpleClassName extends $converter.superclass implements
StateHolder
-{
-
- public static final String CONVERTER_ID = "${converter.id}";
-
- /**
- * Default no-args contstructor
- */
- public $converter.simpleClassName ()
- {
- }
-
-// Conveter properties fields
-#set( $fiedCounter = 0 )
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- /**
- * $prop.name
- * ${prop.xmlEncodedDescription}
- */
- #if($prop.simpleType)
- private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
- /**
- * Flag indicated that $prop.name is set.
- */
- private boolean _${prop.name}Set = false;
- #set( $fiedCounter = $fiedCounter+2)
- #else
- private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
- #set( $fiedCounter = $fiedCounter+1)
- #end
- #end
-#end
-
-// Getters and setters
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- /**
- * ${prop.xmlEncodedDescription}
- * Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- #if($prop.simpleType)
- this._${prop.name}Set = true;
- #end
- }
-
- /**
- * ${prop.xmlEncodedDescription}
- * Getter for $prop.name
- * @return $prop.name value from local variable or value binding
- */
- public $prop.simpleClassName ${prop.getterName}()
- {
- ValueBinding vb = getValueBinding("${prop.name}");
- #if($prop.simpleType)
- if(this._${prop.name}Set)
- {
- return this._${prop.name};
- }
- if (vb != null)
- {
- ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
- if (null == value)
- {
- return this._${prop.name};
- }
- //return (value.${prop.classname}Value());
- } else
- {
- return (this._${prop.name});
- }
- }
- #else
- if (null != this._${prop.name})
- {
- return this._${prop.name};
- }
- #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
- else if (null != vb)
- {
- return (${prop.simpleClassName})vb.getValue(getFacesContext());
- }
- #end
- else
- {
- return ${prop.defaultvalue};
- }
- #end
- }
- #if($prop.raw)
- /**
- * ${prop.xmlEncodedDescription}
- * Raw Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- }
- /*
- * ${prop.xmlEncodedDescription}
- * Raw ( bypadd bindings ) Getter for $prop.name
- * @return $prop.name value from local variable
- */
- public $prop.simpleClassName ${prop.getterName}Raw()
- {
- return this._${prop.name};
- }
- #end
- #end
-#end
-
-// Save state
-// ----------------------------------------------------- StateHolder Methods
-
-
- public Object saveState(FacesContext context) {
- Object values[] = new Object[${fiedCounter}];
- //values[0] = super.saveState(context);
-#set($currentField = 0)
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
- #set( $currentField = $currentField+1)
- values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
- #set( $currentField = $currentField+1)
- #else
- #if(!${prop.attachedstate} )
- values[${currentField}] = _$prop.name;
- #else
- values[${currentField}] = saveAttachedState(context, _$prop.name );
- #end
- #set( $currentField = $currentField+1)
- #end
- #end
-#end
- return values;
- }
-
-
- public void restoreState(FacesContext context, Object state) {
- Object values[] = (Object[]) state;
- //super.restoreState(context, values[0]);
-#set($currentField = 0)
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
- #set( $currentField = $currentField+1)
- _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
- #set( $currentField = $currentField+1)
- #else
- #if( !${prop.attachedstate} )
- _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
- #else
- _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
- #end
- #end
- #set( $currentField = $currentField+1)
- #end
-#end
-
-
- }
-// Utilites
-
- public boolean isTransient() {
- return false;
- }
-
- public void setTransient(boolean newTransientValue){
- }
-
-
- private FacesContext getFacesContext() {
- return FacesContext.getCurrentInstance();
- }
-
- private ValueBinding getValueBinding(String name) {
- return getFacesContext().getApplication().createValueBinding(name);
- }
-
-}
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.component.StateHolder;
+
+/**
+ * Converter-Id ${converter.id}
+ * ${converter.xmlEncodedDescription}
+ */
+public class $converter.simpleClassName extends $converter.superclass implements
StateHolder
+{
+
+ public static final String CONVERTER_ID = "${converter.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $converter.simpleClassName ()
+ {
+ }
+
+// Conveter properties fields
+#set( $fiedCounter = 0 )
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+ #if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+ #set( $fiedCounter = $fiedCounter+2)
+ #else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+ #set( $fiedCounter = $fiedCounter+1)
+ #end
+ #end
+#end
+
+// Getters and setters
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+ this._${prop.name}Set = true;
+#end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding("${prop.name}");
+#if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+ #else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+ #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+ #end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ #end
+ }
+ #if($prop.raw)
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+ #end
+ #end
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[${fiedCounter}];
+ //values[0] = super.saveState(context);
+#set($currentField = 0)
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+ #set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+ #set( $currentField = $currentField+1)
+ #else
+ #if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+ #else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+ #end
+#end
+ return values;
+ }
+
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ //super.restoreState(context, values[0]);
+#set($currentField = 0)
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+ #set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+ #set( $currentField = $currentField+1)
+ #else
+ #if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+ #else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+ #end
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+#end
+
+
+ }
+// Utilites
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void setTransient(boolean newTransientValue){
+ }
+
+
+ private FacesContext getFacesContext() {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name) {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/validator.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/validator.vm 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/validator.vm 2007-04-30
17:31:18 UTC (rev 140)
@@ -1,202 +1,434 @@
-package $package;
-
-#foreach($import in $imports)
-import $import ;
-#end
-
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import java.io.IOException;
-import javax.faces.FacesException;
-import javax.faces.component.StateHolder;
-
-/**
- * Validator-Id ${validator.id}
- * ${validator.xmlEncodedDescription}
- */
-public class $validator.simpleClassName extends $validator.superclass implements
StateHolder {
-
- public static final String VALIDATOR_ID = "${validator.id}";
-
- /**
- * Default no-args contstructor
- */
- public $validator.simpleClassName () {
- }
-
-// Validator properties fields
-#set( $fiedCounter = 0 )
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- /**
- * $prop.name
- * ${prop.xmlEncodedDescription}
- */
- #if($prop.simpleType)
- private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
- /**
- * Flag indicated that $prop.name is set.
- */
- private boolean _${prop.name}Set = false;
- #set( $fiedCounter = $fiedCounter+2)
- #else
- private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
- #set( $fiedCounter = $fiedCounter+1)
- #end
- #end
-#end
-
-// Getters and setters
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- /**
- * ${prop.xmlEncodedDescription}
- * Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- #if($prop.simpleType)
- this._${prop.name}Set = true;
- #end
- }
-
- /**
- * ${prop.xmlEncodedDescription}
- * Getter for $prop.name
- * @return $prop.name value from local variable or value binding
- */
- public $prop.simpleClassName ${prop.getterName}()
- {
- ValueBinding vb = getValueBinding("${prop.name}");
- #if($prop.simpleType)
- if(this._${prop.name}Set)
- {
- return this._${prop.name};
- }
- if (vb != null)
- {
- ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
- if (null == value)
- {
- return this._${prop.name};
- }
- //return (value.${prop.classname}Value());
- } else
- {
- return (this._${prop.name});
- }
- }
- #else
- if (null != this._${prop.name})
- {
- return this._${prop.name};
- }
- #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
- else if (null != vb)
- {
- return (${prop.simpleClassName})vb.getValue(getFacesContext());
- }
- #end
- else
- {
- return ${prop.defaultvalue};
- }
- #end
- }
- #if($prop.raw)
-
- /**
- * ${prop.xmlEncodedDescription}
- * Raw Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- }
- /*
- * ${prop.xmlEncodedDescription}
- * Raw ( bypadd bindings ) Getter for $prop.name
- * @return $prop.name value from local variable
- */
- public $prop.simpleClassName ${prop.getterName}Raw()
- {
- return this._${prop.name};
- }
- #end
- #end
-#end
-
-// Save state
-// ----------------------------------------------------- StateHolder Methods
-
-
- public Object saveState(FacesContext context) {
- Object values[] = new Object[${fiedCounter}];
-// values[0] = super.saveState(context);
-#set($currentField = 0)
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
- #set( $currentField = $currentField+1)
- values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
- #set( $currentField = $currentField+1)
- #else
- #if(!${prop.attachedstate} )
- values[${currentField}] = _$prop.name;
- #else
- values[${currentField}] = saveAttachedState(context, _$prop.name );
- #end
- #set( $currentField = $currentField+1)
- #end
- #end
-#end
- return values;
- }
-
-
- public void restoreState(FacesContext context, Object state) {
- Object values[] = (Object[]) state;
-// super.restoreState(context, values[0]);
-#set($currentField = 0)
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
- #set( $currentField = $currentField+1)
- _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
- #set( $currentField = $currentField+1)
- #else
- #if( !${prop.attachedstate} )
- _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
- #else
- _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
- #end
- #end
- #set( $currentField = $currentField+1)
- #end
-#end
-
- }
-
- public boolean isTransient() {
- return false;
- }
-
- public void setTransient(boolean newTransientValue){
- }
-
- // Utilites
-
- private FacesContext getFacesContext() {
- return FacesContext.getCurrentInstance();
- }
-
- private ValueBinding getValueBinding(String name) {
- return getFacesContext().getApplication().createValueBinding(name);
- }
-
-}
+package $package;
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass
#if(${validator.stateHolderRequired} &&
!${validator.superclassImplementsStateHolder})implements StateHolder#end
+{
+
+ public static final String VALIDATOR_ID = "${validator.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $validator.simpleClassName ()
+ {
+ }
+
+// Validator properties fields
+#set( $fieldCounter = 0 )
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+#if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+#set( $fieldCounter = $fieldCounter+2)
+#else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+#end
+#end
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+ this._${prop.name}Set = true;
+#end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding(_${prop.name});
+#if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+#else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+#end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ }
+#end
+#if($prop.raw)
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+#end
+#end
+#end
+
+
+#if($validator.stateHolderRequired)
+
+ // Save state
+ // ----------------------------------------------------- StateHolder Methods
+
+ private boolean _transient;
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#set( $fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+ public Object saveState(FacesContext context) {
+#if(${validator.superSaveStateMethodExists})
+ Object values[] = new Object[${fieldCounter}];
+ values[0] = super.saveState(context);
+#else
+ Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+#else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+#end
+#set( $currentField = $currentField+1)
+#end
+#end
+#end
+ return values;
+ }
+
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+ public void restoreState(FacesContext context, Object state) {
+#if(${validator.superRestoreStateMethodExists})
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+#else
+ Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+#end
+#set( $currentField = $currentField+1)
+#end
+
+#end
+#end
+ }
+
+#if(!$validator.superIsTransientMethodExists)
+ public boolean isTransient()
+ {
+ return _transient;
+ }
+#end
+
+#if(!$validator.superSetTransientMethodExists)
+ public void setTransient(boolean newTransientValue)
+ {
+ this._transient = newTransientValue;
+ }
+#end
+
+#end
+
+
+// Utilites
+
+ private FacesContext getFacesContext()
+ {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name)
+ {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass implements
StateHolder {
+
+ public static final String VALIDATOR_ID = "${validator.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $validator.simpleClassName () {
+ }
+
+// Validator properties fields
+#set( $fiedCounter = 0 )
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+ #if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+ #set( $fiedCounter = $fiedCounter+2)
+ #else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+ #set( $fiedCounter = $fiedCounter+1)
+ #end
+ #end
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ #if($prop.simpleType)
+ this._${prop.name}Set = true;
+ #end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding("${prop.name}");
+ #if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+ #else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+ #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+ #end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ #end
+ }
+ #if($prop.raw)
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+ #end
+ #end
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[${fiedCounter}];
+// values[0] = super.saveState(context);
+#set($currentField = 0)
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+ #set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+ #set( $currentField = $currentField+1)
+ #else
+ #if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+ #else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+ #end
+#end
+ return values;
+ }
+
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+// super.restoreState(context, values[0]);
+#set($currentField = 0)
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+ #set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+ #set( $currentField = $currentField+1)
+ #else
+ #if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+ #else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+ #end
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+#end
+
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void setTransient(boolean newTransientValue){
+ }
+
+ // Utilites
+
+ private FacesContext getFacesContext() {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name) {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/converter.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/converter.vm 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/converter.vm 2007-04-30
17:31:18 UTC (rev 140)
@@ -1,204 +1,204 @@
-package $package;
-
-#foreach($import in $imports)
-import $import ;
-#end
-
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import java.io.IOException;
-import javax.faces.FacesException;
-import javax.faces.component.StateHolder;
-
-/**
- * Converter-Id ${converter.id}
- * ${converter.xmlEncodedDescription}
- */
-public class $converter.simpleClassName extends $converter.superclass implements
StateHolder
-{
-
- public static final String CONVERTER_ID = "${converter.id}";
-
- /**
- * Default no-args contstructor
- */
- public $converter.simpleClassName ()
- {
- }
-
-// Conveter properties fields
-#set( $fiedCounter = 0 )
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- /**
- * $prop.name
- * ${prop.xmlEncodedDescription}
- */
- #if($prop.simpleType)
- private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
- /**
- * Flag indicated that $prop.name is set.
- */
- private boolean _${prop.name}Set = false;
- #set( $fiedCounter = $fiedCounter+2)
- #else
- private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
- #set( $fiedCounter = $fiedCounter+1)
- #end
- #end
-#end
-
-// Getters and setters
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- /**
- * ${prop.xmlEncodedDescription}
- * Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- #if($prop.simpleType)
- this._${prop.name}Set = true;
- #end
- }
-
- /**
- * ${prop.xmlEncodedDescription}
- * Getter for $prop.name
- * @return $prop.name value from local variable or value binding
- */
- public $prop.simpleClassName ${prop.getterName}()
- {
- ValueBinding vb = getValueBinding("${prop.name}");
- #if($prop.simpleType)
- if(this._${prop.name}Set)
- {
- return this._${prop.name};
- }
- if (vb != null)
- {
- ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
- if (null == value)
- {
- return this._${prop.name};
- }
- //return (value.${prop.classname}Value());
- } else
- {
- return (this._${prop.name});
- }
- }
- #else
- if (null != this._${prop.name})
- {
- return this._${prop.name};
- }
- #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
- else if (null != vb)
- {
- return (${prop.simpleClassName})vb.getValue(getFacesContext());
- }
- #end
- else
- {
- return ${prop.defaultvalue};
- }
- #end
- }
- #if($prop.raw)
- /**
- * ${prop.xmlEncodedDescription}
- * Raw Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- }
- /*
- * ${prop.xmlEncodedDescription}
- * Raw ( bypadd bindings ) Getter for $prop.name
- * @return $prop.name value from local variable
- */
- public $prop.simpleClassName ${prop.getterName}Raw()
- {
- return this._${prop.name};
- }
- #end
- #end
-#end
-
-// Save state
-// ----------------------------------------------------- StateHolder Methods
-
-
- public Object saveState(FacesContext context) {
- Object values[] = new Object[${fiedCounter}];
- //values[0] = super.saveState(context);
-#set($currentField = 0)
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
- #set( $currentField = $currentField+1)
- values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
- #set( $currentField = $currentField+1)
- #else
- #if(!${prop.attachedstate} )
- values[${currentField}] = _$prop.name;
- #else
- values[${currentField}] = saveAttachedState(context, _$prop.name );
- #end
- #set( $currentField = $currentField+1)
- #end
- #end
-#end
- return values;
- }
-
-
- public void restoreState(FacesContext context, Object state) {
- Object values[] = (Object[]) state;
- //super.restoreState(context, values[0]);
-#set($currentField = 0)
-#foreach( $prop in $converter.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
- #set( $currentField = $currentField+1)
- _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
- #set( $currentField = $currentField+1)
- #else
- #if( !${prop.attachedstate} )
- _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
- #else
- _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
- #end
- #end
- #set( $currentField = $currentField+1)
- #end
-#end
-
-
- }
-// Utilites
-
- public boolean isTransient() {
- return false;
- }
-
- public void setTransient(boolean newTransientValue){
- }
-
-
- private FacesContext getFacesContext() {
- return FacesContext.getCurrentInstance();
- }
-
- private ValueBinding getValueBinding(String name) {
- return getFacesContext().getApplication().createValueBinding(name);
- }
-
-}
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.component.StateHolder;
+
+/**
+ * Converter-Id ${converter.id}
+ * ${converter.xmlEncodedDescription}
+ */
+public class $converter.simpleClassName extends $converter.superclass implements
StateHolder
+{
+
+ public static final String CONVERTER_ID = "${converter.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $converter.simpleClassName ()
+ {
+ }
+
+// Conveter properties fields
+#set( $fiedCounter = 0 )
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+ #if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+ #set( $fiedCounter = $fiedCounter+2)
+ #else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+ #set( $fiedCounter = $fiedCounter+1)
+ #end
+ #end
+#end
+
+// Getters and setters
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+ this._${prop.name}Set = true;
+#end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding("${prop.name}");
+#if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+ #else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+ #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+ #end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ #end
+ }
+ #if($prop.raw)
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+ #end
+ #end
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[${fiedCounter}];
+ //values[0] = super.saveState(context);
+#set($currentField = 0)
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+ #set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+ #set( $currentField = $currentField+1)
+ #else
+ #if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+ #else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+ #end
+#end
+ return values;
+ }
+
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ //super.restoreState(context, values[0]);
+#set($currentField = 0)
+#foreach( $prop in $converter.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+ #set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+ #set( $currentField = $currentField+1)
+ #else
+ #if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+ #else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+ #end
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+#end
+
+
+ }
+// Utilites
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void setTransient(boolean newTransientValue){
+ }
+
+
+ private FacesContext getFacesContext() {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name) {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/validator.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/validator.vm 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/validator.vm 2007-04-30
17:31:18 UTC (rev 140)
@@ -1,202 +1,434 @@
-package $package;
-
-#foreach($import in $imports)
-import $import ;
-#end
-
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import java.io.IOException;
-import javax.faces.FacesException;
-import javax.faces.component.StateHolder;
-
-/**
- * Validator-Id ${validator.id}
- * ${validator.xmlEncodedDescription}
- */
-public class $validator.simpleClassName extends $validator.superclass implements
StateHolder {
-
- public static final String VALIDATOR_ID = "${validator.id}";
-
- /**
- * Default no-args contstructor
- */
- public $validator.simpleClassName () {
- }
-
-// Validator properties fields
-#set( $fiedCounter = 0 )
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- /**
- * $prop.name
- * ${prop.xmlEncodedDescription}
- */
- #if($prop.simpleType)
- private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
- /**
- * Flag indicated that $prop.name is set.
- */
- private boolean _${prop.name}Set = false;
- #set( $fiedCounter = $fiedCounter+2)
- #else
- private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
- #set( $fiedCounter = $fiedCounter+1)
- #end
- #end
-#end
-
-// Getters and setters
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- /**
- * ${prop.xmlEncodedDescription}
- * Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- #if($prop.simpleType)
- this._${prop.name}Set = true;
- #end
- }
-
- /**
- * ${prop.xmlEncodedDescription}
- * Getter for $prop.name
- * @return $prop.name value from local variable or value binding
- */
- public $prop.simpleClassName ${prop.getterName}()
- {
- ValueBinding vb = getValueBinding("${prop.name}");
- #if($prop.simpleType)
- if(this._${prop.name}Set)
- {
- return this._${prop.name};
- }
- if (vb != null)
- {
- ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
- if (null == value)
- {
- return this._${prop.name};
- }
- //return (value.${prop.classname}Value());
- } else
- {
- return (this._${prop.name});
- }
- }
- #else
- if (null != this._${prop.name})
- {
- return this._${prop.name};
- }
- #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
- else if (null != vb)
- {
- return (${prop.simpleClassName})vb.getValue(getFacesContext());
- }
- #end
- else
- {
- return ${prop.defaultvalue};
- }
- #end
- }
- #if($prop.raw)
-
- /**
- * ${prop.xmlEncodedDescription}
- * Raw Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
- {
- this._${prop.name} = __$prop.name;
- }
- /*
- * ${prop.xmlEncodedDescription}
- * Raw ( bypadd bindings ) Getter for $prop.name
- * @return $prop.name value from local variable
- */
- public $prop.simpleClassName ${prop.getterName}Raw()
- {
- return this._${prop.name};
- }
- #end
- #end
-#end
-
-// Save state
-// ----------------------------------------------------- StateHolder Methods
-
-
- public Object saveState(FacesContext context) {
- Object values[] = new Object[${fiedCounter}];
-// values[0] = super.saveState(context);
-#set($currentField = 0)
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
- #set( $currentField = $currentField+1)
- values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
- #set( $currentField = $currentField+1)
- #else
- #if(!${prop.attachedstate} )
- values[${currentField}] = _$prop.name;
- #else
- values[${currentField}] = saveAttachedState(context, _$prop.name );
- #end
- #set( $currentField = $currentField+1)
- #end
- #end
-#end
- return values;
- }
-
-
- public void restoreState(FacesContext context, Object state) {
- Object values[] = (Object[]) state;
-// super.restoreState(context, values[0]);
-#set($currentField = 0)
-#foreach( $prop in $validator.properties )
- #if( !$prop.exist )
- #if($prop.simpleType)
- _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
- #set( $currentField = $currentField+1)
- _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
- #set( $currentField = $currentField+1)
- #else
- #if( !${prop.attachedstate} )
- _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
- #else
- _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
- #end
- #end
- #set( $currentField = $currentField+1)
- #end
-#end
-
- }
-
- public boolean isTransient() {
- return false;
- }
-
- public void setTransient(boolean newTransientValue){
- }
-
- // Utilites
-
- private FacesContext getFacesContext() {
- return FacesContext.getCurrentInstance();
- }
-
- private ValueBinding getValueBinding(String name) {
- return getFacesContext().getApplication().createValueBinding(name);
- }
-
-}
+package $package;
+package $package;
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass
#if(${validator.stateHolderRequired} &&
!${validator.superclassImplementsStateHolder})implements StateHolder#end
+{
+
+ public static final String VALIDATOR_ID = "${validator.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $validator.simpleClassName ()
+ {
+ }
+
+// Validator properties fields
+#set( $fieldCounter = 0 )
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+#if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+#set( $fieldCounter = $fieldCounter+2)
+#else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+#set( $fieldCounter = $fieldCounter+1)
+#end
+#end
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+#if($prop.simpleType)
+ this._${prop.name}Set = true;
+#end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding(_${prop.name});
+#if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+#else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+#if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+#end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ }
+#end
+#if($prop.raw)
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+#end
+#end
+#end
+
+
+#if($validator.stateHolderRequired)
+
+ // Save state
+ // ----------------------------------------------------- StateHolder Methods
+
+ private boolean _transient;
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#set( $fieldCounter = $fieldCounter+1)
+#else
+#set($currentField=0)
+#end
+ public Object saveState(FacesContext context) {
+#if(${validator.superSaveStateMethodExists})
+ Object values[] = new Object[${fieldCounter}];
+ values[0] = super.saveState(context);
+#else
+ Object values[] = new Object[${fieldCounter}];
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+#set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+#set( $currentField = $currentField+1)
+#else
+#if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+#else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+#end
+#set( $currentField = $currentField+1)
+#end
+#end
+#end
+ return values;
+ }
+
+#if(${validator.superclassImplementsStateHolder})
+#set($currentField=1)
+#else
+#set($currentField=0)
+#end
+ public void restoreState(FacesContext context, Object state) {
+#if(${validator.superRestoreStateMethodExists})
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+#else
+ Object values[] = (Object[]) state;
+#end
+#foreach( $prop in $validator.properties )
+#if( !$prop.exist )
+#if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+#set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+#set( $currentField = $currentField+1)
+#else
+#if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+#else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+#end
+#set( $currentField = $currentField+1)
+#end
+
+#end
+#end
+ }
+
+#if(!$validator.superIsTransientMethodExists)
+ public boolean isTransient()
+ {
+ return _transient;
+ }
+#end
+
+#if(!$validator.superSetTransientMethodExists)
+ public void setTransient(boolean newTransientValue)
+ {
+ this._transient = newTransientValue;
+ }
+#end
+
+#end
+
+
+// Utilites
+
+ private FacesContext getFacesContext()
+ {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name)
+ {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
+
+#foreach($import in $imports)
+import $import ;
+#end
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import java.io.IOException;
+import javax.faces.FacesException;
+import javax.faces.component.StateHolder;
+
+/**
+ * Validator-Id ${validator.id}
+ * ${validator.xmlEncodedDescription}
+ */
+public class $validator.simpleClassName extends $validator.superclass implements
StateHolder {
+
+ public static final String VALIDATOR_ID = "${validator.id}";
+
+ /**
+ * Default no-args contstructor
+ */
+ public $validator.simpleClassName () {
+ }
+
+// Validator properties fields
+#set( $fiedCounter = 0 )
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ /**
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+ #if($prop.simpleType)
+ private $prop.simpleClassName _$prop.name = ${prop.defaultvalue};
+ /**
+ * Flag indicated that $prop.name is set.
+ */
+ private boolean _${prop.name}Set = false;
+ #set( $fiedCounter = $fiedCounter+2)
+ #else
+ private $prop.simpleClassName _$prop.name = null; /* Default is
${prop.defaultvalue}*/
+ #set( $fiedCounter = $fiedCounter+1)
+ #end
+ #end
+#end
+
+// Getters and setters
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ #if($prop.simpleType)
+ this._${prop.name}Set = true;
+ #end
+ }
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Getter for $prop.name
+ * @return $prop.name value from local variable or value binding
+ */
+ public $prop.simpleClassName ${prop.getterName}()
+ {
+ ValueBinding vb = getValueBinding("${prop.name}");
+ #if($prop.simpleType)
+ if(this._${prop.name}Set)
+ {
+ return this._${prop.name};
+ }
+ if (vb != null)
+ {
+ ${prop.boxingClass} value = (${prop.boxingClass}) vb.getValue(getFacesContext());
+ if (null == value)
+ {
+ return this._${prop.name};
+ }
+ //return (value.${prop.classname}Value());
+ } else
+ {
+ return (this._${prop.name});
+ }
+ }
+ #else
+ if (null != this._${prop.name})
+ {
+ return this._${prop.name};
+ }
+ #if( !$prop.isInstanceof("javax.faces.el.MethodBinding") &&
!$prop.isInstanceof("javax.faces.el.ValueBinding"))
+ else if (null != vb)
+ {
+ return (${prop.simpleClassName})vb.getValue(getFacesContext());
+ }
+ #end
+ else
+ {
+ return ${prop.defaultvalue};
+ }
+ #end
+ }
+ #if($prop.raw)
+
+ /**
+ * ${prop.xmlEncodedDescription}
+ * Raw Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}Raw( $prop.simpleClassName __$prop.name )
+ {
+ this._${prop.name} = __$prop.name;
+ }
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Raw ( bypadd bindings ) Getter for $prop.name
+ * @return $prop.name value from local variable
+ */
+ public $prop.simpleClassName ${prop.getterName}Raw()
+ {
+ return this._${prop.name};
+ }
+ #end
+ #end
+#end
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[${fiedCounter}];
+// values[0] = super.saveState(context);
+#set($currentField = 0)
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ values[${currentField}] = new ${prop.boxingClass}(_$prop.name);
+ #set( $currentField = $currentField+1)
+ values[${currentField}] = Boolean.valueOf(_${prop.name}Set);
+ #set( $currentField = $currentField+1)
+ #else
+ #if(!${prop.attachedstate} )
+ values[${currentField}] = _$prop.name;
+ #else
+ values[${currentField}] = saveAttachedState(context, _$prop.name );
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+ #end
+#end
+ return values;
+ }
+
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+// super.restoreState(context, values[0]);
+#set($currentField = 0)
+#foreach( $prop in $validator.properties )
+ #if( !$prop.exist )
+ #if($prop.simpleType)
+ _$prop.name =
((${prop.boxingClass})values[${currentField}]).${prop.classname}Value();
+ #set( $currentField = $currentField+1)
+ _${prop.name}Set = ((Boolean)values[${currentField}]).booleanValue();
+ #set( $currentField = $currentField+1)
+ #else
+ #if( !${prop.attachedstate} )
+ _$prop.name = (${prop.simpleClassName})values[${currentField}] ;
+ #else
+ _$prop.name =
(${prop.simpleClassName})restoreAttachedState(context,values[${currentField}] );
+ #end
+ #end
+ #set( $currentField = $currentField+1)
+ #end
+#end
+
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void setTransient(boolean newTransientValue){
+ }
+
+ // Utilites
+
+ private FacesContext getFacesContext() {
+ return FacesContext.getCurrentInstance();
+ }
+
+ private ValueBinding getValueBinding(String name) {
+ return getFacesContext().getApplication().createValueBinding(name);
+ }
+
+}
Modified: trunk/cdk/pom.xml
===================================================================
--- trunk/cdk/pom.xml 2007-04-27 17:56:16 UTC (rev 139)
+++ trunk/cdk/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -1,37 +1,38 @@
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>master</artifactId>
- <groupId>org.ajax4jsf</groupId>
- <version>1.1.1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>cdk</artifactId>
- <packaging>pom</packaging>
- <name>JSF Components Development kit</name>
- <version>1.1.1-SNAPSHOT</version>
- <
url>http://labs.jboss.com/wiki/Ajax4jsf/cdk</url>
- <dependencies />
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <modules>
- <module>maven-cdk-plugin</module>
- <module>compiler</module>
- <module>generator</module>
- <module>maven-archetype-jsf-component</module>
- <module>maven-archetype-jsfwebapp</module>
- </modules>
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>master</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>cdk</artifactId>
+ <packaging>pom</packaging>
+ <name>JSF Components Development kit</name>
+ <version>1.1.1-SNAPSHOT</version>
+ <
url>http://labs.jboss.com/wiki/Ajax4jsf/cdk</url>
+ <dependencies/>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <modules>
+ <module>maven-cdk-plugin</module>
+ <module>compiler</module>
+ <module>generator</module>
+ <module>maven-archetype-jsf-component</module>
+ <module>maven-archetype-jsfwebapp</module>
+ </modules>
</project>
\ No newline at end of file
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2007-04-27 17:56:16 UTC (rev 139)
+++ trunk/framework/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -140,17 +140,17 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
- <version>1.6</version>
+ <version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
- <version>1.5</version>
+ <version>1.8</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>2.1</version>
+ <version>3.2</version>
</dependency>
</dependencies>
<profiles>
Modified: trunk/framework/src/main/config/faces/original-faces-config.xml
===================================================================
--- trunk/framework/src/main/config/faces/original-faces-config.xml 2007-04-27 17:56:16
UTC (rev 139)
+++ trunk/framework/src/main/config/faces/original-faces-config.xml 2007-04-30 17:31:18
UTC (rev 140)
@@ -30,12 +30,14 @@
<managed-bean-name>a4jSkin</managed-bean-name>
<managed-bean-class>org.ajax4jsf.framework.skin.SkinBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
+ </managed-bean>
+ <!--
<managed-bean>
<managed-bean-name>ajaxContext</managed-bean-name>
<managed-bean-class>org.ajax4jsf.framework.ajax.AjaxContext</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
+ </managed-bean>
+ -->
<component>
<component-type>javax.faces.ViewRoot</component-type>
Modified: trunk/framework/src/main/config/faces/original-faces-config.xml.l4t
===================================================================
--- trunk/framework/src/main/config/faces/original-faces-config.xml.l4t 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/framework/src/main/config/faces/original-faces-config.xml.l4t 2007-04-30
17:31:18 UTC (rev 140)
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS ENTITY="JSFProcess"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Modified: trunk/framework/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
===================================================================
--- trunk/framework/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-04-27 17:56:16
UTC (rev 139)
+++ trunk/framework/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-04-30 17:31:18
UTC (rev 140)
@@ -109,11 +109,11 @@
*/
private boolean mustProcessed(FacesContext context)
{
- if ( !AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
+// if ( !AjaxContext.getCurrentInstance(context).isAjaxRequest(context)) {
if (!isSubmitted() ) {
return false;
}
- }
+// }
return true;
}
Modified: trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
===================================================================
--- trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -29,6 +29,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -114,7 +115,7 @@
ViewIdHolder viewIdHolder = null;
Map responseDataMap = new HashMap();
-
+
Map commonAjaxParameters = new HashMap();
static {
@@ -154,6 +155,12 @@
AjaxContext ajaxContext = (AjaxContext) context.getApplication()
.getVariableResolver().resolveVariable(context,
AJAX_CONTEXT_KEY);
+ if (null == ajaxContext) {
+ // Create default implementation.
+ ajaxContext = new AjaxContext();
+ context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
+ ajaxContext);
+ }
return ajaxContext;
}
@@ -404,10 +411,10 @@
.getViewHandler().getResourceURL(context,
styleSheetUri);
// TODO - some resources can be non-session aware, we
- // must
+ // must
// skip encoding for this case ?
// But, in common case - static links not need session
- // info,
+ // info,
// and dynamic resources perform encodings if nessesary
// resourceURL =
// context.getExternalContext().encodeResourceURL(resourceURL);
@@ -554,6 +561,30 @@
return this.ajaxAreasToRender;
}
+ /**
+ * Add affected regions's ID to ajaxView component.
+ *
+ * @param component
+ */
+ public void addRegionsFromComponent(UIComponent component) {
+ // First step - find parent ajax view
+ Set ajaxRegions = AjaxRendererUtils.getAjaxAreas(component);
+ // if (ajaxRegions == null){
+ // FacesContext context = FacesContext.getCurrentInstance();
+ // ajaxRegions = AjaxRendererUtils.getAbsoluteId(context,component);
+ // }
+ if (log.isDebugEnabled()) {
+ log.debug(Messages.getMessage(Messages.INVOKE_AJAX_REGION_LISTENER,
+ component.getId()));
+ }
+ if (ajaxRegions != null) {
+ for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
+ String id = iter.next().toString();
+ ajaxAreasToRender.add(convertId(component, id));
+ }
+ }
+ }
+
public void addComponentToAjaxRender(UIComponent component) {
this.ajaxAreasToRender.add(AjaxRendererUtils.getAbsoluteId(component));
}
@@ -563,6 +594,68 @@
}
/**
+ * Test for relative id of target components. Attempt convert to
+ * absolute. For use as argument for
+ * {@link UIComponent#findComponent(java.lang.String)}
+ *
+ * @param component
+ * @param id
+ * @return
+ */
+ private String convertId(UIComponent component, String id) {
+ if (id.charAt(0) == NamingContainer.SEPARATOR_CHAR) {
+ return id;
+ }
+ if (null == component) {
+ throw new NullPointerException(
+ "Base component for search re-rendered compnnent is null");
+ }
+ UIComponent target = null;
+ UIComponent parent = component;
+ UIComponent root = component;
+ while (null == target && null != parent) {
+ target = parent.findComponent(id);
+ root = parent;
+ parent = parent.getParent();
+ }
+ if (null == target) {
+ target = findUIComponentBelow(root, id);
+ }
+ if (null != target) {
+ return AjaxRendererUtils.getAbsoluteId(target);
+ }
+ log.warn("Target component for id "+id+" not found");
+ return id;
+ }
+
+ private UIComponent findUIComponentBelow(UIComponent root,
+ String id) {
+
+ UIComponent target = null;
+ for (Iterator iter = root.getFacetsAndChildren(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if (child instanceof NamingContainer) {
+ try {
+ target = child.findComponent(id);
+ } catch (IllegalArgumentException iae) {
+ continue;
+ }
+ }
+ if (target == null) {
+ if (child.getChildCount() > 0) {
+ target = findUIComponentBelow(child, id);
+ }
+ }
+
+ if (target != null) {
+ break;
+ }
+
+ }
+ return target;
+ }
+
+ /**
* @return Returns the ajaxRenderedAreas.
*/
public Set getAjaxRenderedAreas() {
@@ -677,81 +770,40 @@
return writer;
}
- /**
- * Add affected regions's ID to ajaxView component.
- *
- * @param component
- */
- public void addRegionsFromComponent(UIComponent component) {
- // First step - find parent ajax view
- Set ajaxRegions = AjaxRendererUtils.getAjaxAreas(component);
- // if (ajaxRegions == null){
- // FacesContext context = FacesContext.getCurrentInstance();
- // ajaxRegions = AjaxRendererUtils.getAbsoluteId(context,component);
- // }
- if (log.isDebugEnabled()) {
- log.debug(Messages.getMessage(Messages.INVOKE_AJAX_REGION_LISTENER,
- component.getId()));
- }
- if (ajaxRegions != null) {
- for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
- String id = iter.next().toString();
- ajaxAreasToRender.add(convertId(component, id));
- }
- }
- }
-
- /**
- * Test for relative id of target components. Attempt convert to
- * absolute. For use as argument for
- * {@link UIComponent#findComponent(java.lang.String)}
- *
- * @param component
- * @param id
- * @return
- */
- private String convertId(UIComponent component, String id) {
- if (id.charAt(0) == NamingContainer.SEPARATOR_CHAR) {
- return id;
- }
- if (null != component) {
- UIComponent target = component.findComponent(id);
- if (null != target) {
- return AjaxRendererUtils.getAbsoluteId(target);
- }
- }
- return id;
- }
-
public String getAjaxActionURL() {
return getAjaxActionURL(FacesContext.getCurrentInstance());
}
public String getAjaxActionURL(FacesContext context) {
// Check arguments
- if(null == context){
- throw new NullPointerException("Faces context for build AJAX Action URL is
null");
+ if (null == context) {
+ throw new NullPointerException(
+ "Faces context for build AJAX Action URL is null");
}
UIViewRoot viewRoot = context.getViewRoot();
- if(null == viewRoot){
- throw new NullPointerException("Faces view tree for build AJAX Action URL is
null");
+ if (null == viewRoot) {
+ throw new NullPointerException(
+ "Faces view tree for build AJAX Action URL is null");
}
String viewId = viewRoot.getViewId();
- if(null == viewId){
- throw new NullPointerException("View id for build AJAX Action URL is
null");
+ if (null == viewId) {
+ throw new NullPointerException(
+ "View id for build AJAX Action URL is null");
}
- if(!viewId.startsWith("/")){
- throw new IllegalArgumentException("Illegal view Id for build AJAX Action URL:
"+viewId);
- }
+ if (!viewId.startsWith("/")) {
+ throw new IllegalArgumentException(
+ "Illegal view Id for build AJAX Action URL: " + viewId);
+ }
ViewHandler viewHandler = context.getApplication().getViewHandler();
- return context.getExternalContext().encodeActionURL(viewHandler.getActionURL(context,
viewId));
+ return context.getExternalContext().encodeActionURL(
+ viewHandler.getActionURL(context, viewId));
}
/**
- * @return the commonAjaxParameters
- */
+ * @return the commonAjaxParameters
+ */
public Map getCommonAjaxParameters() {
- return commonAjaxParameters;
+ return commonAjaxParameters;
}
}
\ No newline at end of file
Modified:
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
===================================================================
---
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java 2007-04-27
17:56:16 UTC (rev 139)
+++
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -31,151 +31,176 @@
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.util.message.Messages;
-
/**
* Inner class for build event string for parent component.
+ *
* @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:38 $
- * Disadvantages - not rebuild event string setted as EL expression.
- * TODO - save expressions for build event string at render phase.
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:38 $ Disadvantages -
+ * not rebuild event string setted as EL expression. TODO - save
+ * expressions for build event string at render phase.
*/
public class EventValueBinding extends ValueBinding implements StateHolder {
-
+
/**
- *
- */
+ *
+ */
private static final long serialVersionUID = -6583167387542332290L;
+
private String _componentId;
-
-
+
/**
- * current update component. transient since saved state as component.
- */
+ * current update component. transient since saved state as component.
+ */
transient private AjaxSupport _component = null;
-
+
/**
- * Default constructor for restoreState.
- */
+ * Default constructor for restoreState.
+ */
public EventValueBinding() {
-
+
}
/**
- * Constructor for build from AjaxComponent.
- * @param update
- */
- public EventValueBinding(AjaxSupport update)
- {
- _component = update;
-// _componentId = string;
+ * Constructor for build from AjaxComponent.
+ *
+ * @param update
+ */
+ public EventValueBinding(AjaxSupport update) {
+ _component = update;
+ // _componentId = string;
}
- /* (non-Javadoc)
- * @see javax.faces.el.ValueBinding#getType(javax.faces.context.FacesContext)
- */
- public Class getType(FacesContext facesContext) throws EvaluationException,
PropertyNotFoundException
- {
-
- return String.class;
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.el.ValueBinding#getType(javax.faces.context.FacesContext)
+ */
+ public Class getType(FacesContext facesContext) throws EvaluationException,
+ PropertyNotFoundException {
+
+ return String.class;
}
- /* (non-Javadoc)
- * @see javax.faces.el.ValueBinding#getValue(javax.faces.context.FacesContext)
- */
- public Object getValue(FacesContext facesContext) throws EvaluationException,
PropertyNotFoundException
- {
- return getComponent(facesContext).getEventString();
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.el.ValueBinding#getValue(javax.faces.context.FacesContext)
+ */
+ public Object getValue(FacesContext facesContext)
+ throws EvaluationException, PropertyNotFoundException {
+ if (((UIComponent) getComponent(facesContext)).isRendered()) {
+ return getComponent(facesContext).getEventString();
+
+ } else {
+ return null;
+ }
}
-
- private AjaxSupport getComponent(FacesContext facesContext) throws
EvaluationException {
- if (_component == null)
- {
- UIComponent uiComponent =
facesContext.getViewRoot().findComponent(_componentId);
- if (null != uiComponent && uiComponent instanceof AjaxComponent)
- {
- _component = (AjaxSupport) uiComponent;
- } else {
- throw new
EvaluationException(Messages.getMessage(Messages.COMPONENT_NOT_FOUND, _componentId));
- }
-
- }
+ private AjaxSupport getComponent(FacesContext facesContext)
+ throws EvaluationException {
- return _component;
+ if (_component == null) {
+ UIComponent uiComponent = facesContext.getViewRoot().findComponent(
+ _componentId);
+ if (null != uiComponent && uiComponent instanceof AjaxComponent) {
+ _component = (AjaxSupport) uiComponent;
+ } else {
+ throw new EvaluationException(Messages.getMessage(
+ Messages.COMPONENT_NOT_FOUND, _componentId));
+ }
+
+ }
+
+ return _component;
}
/**
- * @param component the component to set
- */
- public void setComponent(AjaxSupport component) {
- _component = component;
- }
+ * @param component
+ * the component to set
+ */
+ public void setComponent(AjaxSupport component) {
+ _component = component;
+ }
- /* (non-Javadoc)
- * @see javax.faces.el.ValueBinding#isReadOnly(javax.faces.context.FacesContext)
- */
- public boolean isReadOnly(FacesContext facesContext) throws EvaluationException,
PropertyNotFoundException
- {
- // TODO Auto-generated method stub
- return true;
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.el.ValueBinding#isReadOnly(javax.faces.context.FacesContext)
+ */
+ public boolean isReadOnly(FacesContext facesContext)
+ throws EvaluationException, PropertyNotFoundException {
+ // TODO Auto-generated method stub
+ return true;
}
- /* (non-Javadoc)
- * @see javax.faces.el.ValueBinding#setValue(javax.faces.context.FacesContext,
java.lang.Object)
- */
- public void setValue(FacesContext facesContext, Object value) throws
EvaluationException, PropertyNotFoundException
- {
- throw new EvaluationException(Messages.getMessage(Messages.EVENT_IS_READ_ONLY));
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.el.ValueBinding#setValue(javax.faces.context.FacesContext,
+ * java.lang.Object)
+ */
+ public void setValue(FacesContext facesContext, Object value)
+ throws EvaluationException, PropertyNotFoundException {
+ throw new EvaluationException(Messages
+ .getMessage(Messages.EVENT_IS_READ_ONLY));
+
}
- /* (non-Javadoc)
- * @see
javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
- */
- public Object saveState(FacesContext context)
- {
- if(null == _component){
- return _componentId;
- } else {
- return AjaxRendererUtils.getAbsoluteId((UIComponent) getComponent(context));
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see
javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+ */
+ public Object saveState(FacesContext context) {
+ if (null == _component) {
+ return _componentId;
+ } else {
+ return AjaxRendererUtils
+ .getAbsoluteId((UIComponent) getComponent(context));
+ }
}
- /* (non-Javadoc)
- * @see
javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
java.lang.Object)
- */
- public void restoreState(FacesContext context, Object state)
- {
- // TODO Auto-generated method stub
- _componentId = (String)state;
+ /*
+ * (non-Javadoc)
+ *
+ * @see
javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
+ * java.lang.Object)
+ */
+ public void restoreState(FacesContext context, Object state) {
+ // TODO Auto-generated method stub
+ _componentId = (String) state;
}
- /* (non-Javadoc)
- * @see javax.faces.component.StateHolder#isTransient()
- */
- public boolean isTransient()
- {
- // TODO Auto-generated method stub
- return false;
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.StateHolder#isTransient()
+ */
+ public boolean isTransient() {
+ // TODO Auto-generated method stub
+ return false;
}
- /* (non-Javadoc)
- * @see javax.faces.component.StateHolder#setTransient(boolean)
- */
- public void setTransient(boolean newTransientValue)
- {
- // TODO Auto-generated method stub
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.StateHolder#setTransient(boolean)
+ */
+ public void setTransient(boolean newTransientValue) {
+ // TODO Auto-generated method stub
+
}
- /* (non-Javadoc)
- * @see javax.faces.el.ValueBinding#getExpressionString()
- */
- public String getExpressionString() {
-// FacesContext context = FacesContext.getCurrentInstance();
-// UIComponent component = (UIComponent) getComponent(context);
-// return "#{ajaxSupport["+component.getClientId(context)+"]}";
- return null;
- }
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.el.ValueBinding#getExpressionString()
+ */
+ public String getExpressionString() {
+ // FacesContext context = FacesContext.getCurrentInstance();
+ // UIComponent component = (UIComponent) getComponent(context);
+ // return "#{ajaxSupport["+component.getClientId(context)+"]}";
+ return null;
+ }
+
}
\ No newline at end of file
Modified: trunk/framework/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
===================================================================
---
trunk/framework/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-04-27
17:56:16 UTC (rev 139)
+++
trunk/framework/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -228,7 +228,7 @@
Set formParams) throws IOException {
for (Iterator it = formParams.iterator(); it.hasNext();) {
Object name = it.next();
- renderHiddenInputField(writer, name, null);
+ renderHiddenInputField(writer, name, "");
}
}
@@ -237,9 +237,7 @@
writer.startElement(HTML.INPUT_ELEM, null);
writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
writer.writeAttribute(HTML.NAME_ATTRIBUTE, name, null);
- if (value != null) {
- writer.writeAttribute(HTML.value_ATTRIBUTE, value, null);
- }
+ writer.writeAttribute(HTML.value_ATTRIBUTE, value != null?value:"", null);
writer.endElement(HTML.INPUT_ELEM);
}
@@ -298,14 +296,17 @@
}
script.append(");");
script.append("\n}");
-
- // Just to be sure we call this clear method on each load.
- // Otherwise in the case, that someone submits a form by pressing Enter
- // within a text input, the hidden inputs won't be cleared!
script.append("\n");
script.append("function
").append("clearFormHiddenParams_").append(
getValidJavascriptName(formName));
script.append("(){").append(functionName).append("();}\n");
+ // MyFaces 1.1.5 clear form function name
+ script.append("function
").append("clearFormHiddenParams_").append(
+ formName.replace("-", "$_").replace(':', '_'));
+ script.append("(){").append(functionName).append("();}\n");
+ // Just to be sure we call this clear method on each load.
+ // Otherwise in the case, that someone submits a form by pressing Enter
+ // within a text input, the hidden inputs won't be cleared!
script.append(functionName);
script.append("();");
@@ -329,7 +330,7 @@
for (int i = 0, len = s.length(); i < len; i++) {
char c = s.charAt(i);
- if (Character.isLetterOrDigit(c)) {
+ if (Character.isLetterOrDigit(c)||c=='_' ) {
// allowed char
if (buf != null)
buf.append(c);
Modified: trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-04-27 17:56:16 UTC (rev
139)
+++ trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-04-30 17:31:18 UTC (rev
140)
@@ -1040,12 +1040,15 @@
_value_query : function(control){
- this.appendParameter(control.name, control.value);
+ LOG.debug("Append "+control.type+" control "+control.name+"
with value ["+control.value+"] and value attribute
["+control.getAttribute('value')+"]");
+ if(null != control.value){
+ this.appendParameter(control.name, control.value);
+ }
},
_check_query : function(control){
if( control.checked ) {
- this.appendParameter(control.name, control.value?control.value:"on");
+ this.appendParameter(control.name, control.value?control.value:"on");
}
},
Modified: trunk/samples/ajaxPortlet/pom.xml
===================================================================
--- trunk/samples/ajaxPortlet/pom.xml 2007-04-27 17:56:16 UTC (rev 139)
+++ trunk/samples/ajaxPortlet/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -2,49 +2,39 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>ajaxPortlet</groupId>
- <artifactId>ajaxPortlet</artifactId>
- <packaging>war</packaging>
- <version>0.0.1</version>
- <description>Ajax JSF sample portlet</description>
- <build>
- <defaultGoal>package</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-maven-plugin</artifactId>
- <configuration>
- <jbossHome>${env.JBOSS_HOME}</jbossHome>
- <hostName>${jboss_host}</hostName>
- <port>8080</port>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>a4j-portlet</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <exclusions>
- <exclusion>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>portalAjaxSample</artifactId>
+ <packaging>war</packaging>
+ <version>0.0.1</version>
+ <description>Ajax JSF sample portlet</description>
+ <build>
+ <defaultGoal>package</defaultGoal>
+ <finalName>portalAjaxSample</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>a4j-portlet</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_04</version>
@@ -56,6 +46,6 @@
<version>1.2_04</version>
<scope>provided</scope>
</dependency>
- </dependencies>
+ </dependencies>
</project>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2007-04-27
17:56:16 UTC (rev 139)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2007-04-30
17:31:18 UTC (rev 140)
@@ -30,10 +30,8 @@
</page>
</deployment>
<deployment>
- <parent-ref>default</parent-ref>
- <if-exists>overwrite</if-exists>
- <page>
- <page-name>otherAjaxPortlet</page-name>
+ <if-exists>overwrite</if-exists>
+ <parent-ref>default.default</parent-ref>
<window>
<window-name>otherAjaxportletWindow</window-name>
<instance-ref>AjaxPortletInstance</instance-ref>
@@ -41,7 +39,6 @@
<region>center</region>
<height>0</height>
</window>
- </page>
</deployment>
<deployment>
<parent-ref>default</parent-ref>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2007-04-27 17:56:16
UTC (rev 139)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2007-04-30 17:31:18
UTC (rev 140)
@@ -3,11 +3,6 @@
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
- <managed-bean-name>ajaxContext</managed-bean-name>
-
<managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
<managed-bean-name>bean</managed-bean-name>
<managed-bean-class>portal.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-04-27 17:56:16 UTC
(rev 139)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-04-30 17:31:18 UTC
(rev 140)
@@ -8,6 +8,7 @@
<name>default-view</name>
<value>/jsf/start.xhtml</value>
</init-param>
+ <!--
<init-param>
<name>default-edit</name>
<value>/jsf/start-edit.xhtml</value>
@@ -16,6 +17,7 @@
<name>default-help</name>
<value>/jsf/start-help.xhtml</value>
</init-param>
+ -->
<expiration-cache>-0</expiration-cache>
<portlet-info>
<title>Ajax Portlet</title>
@@ -23,8 +25,10 @@
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
+ <!--
<portlet-mode>EDIT</portlet-mode>
<portlet-mode>HELP</portlet-mode>
+ -->
</supports>
</portlet>
</portlet-app>
Added: trunk/samples/createProject.bat
===================================================================
--- trunk/samples/createProject.bat (rev 0)
+++ trunk/samples/createProject.bat 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1 @@
+mvn archetype:create -DarchetypeGroupId=org.ajax4jsf.cdk
-DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=1.1.1-SNAPSHOT
-DgroupId=org.richfaces -DartifactId=%1
\ No newline at end of file
Added: trunk/samples/createProject.sh
===================================================================
--- trunk/samples/createProject.sh (rev 0)
+++ trunk/samples/createProject.sh 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,2 @@
+#!/bin/sh
+mvn archetype:create -e -DarchetypeGroupId=org.ajax4jsf.cdk
-DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=1.1.1-SNAPSHOT
-DartifactId=${1}
\ No newline at end of file
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-04-27 17:56:16 UTC (rev 139)
+++ trunk/samples/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -1,19 +1,219 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <!--parent>
- <artifactId>master</artifactId>
- <groupId>org.ajax4jsf</groupId>
- <version>1.1.0-SNAPSHOT</version>
- </parent-->
- <groupId>org.ajax4jsf</groupId>
- <artifactId>samples</artifactId>
- <packaging>pom</packaging>
- <name>Ajax4jsf examples</name>
- <version>1.1.1-SNAPSHOT</version>
- <url>https://ajax4jsf.dev.java.net</url>
- <dependencies/>
- <modules>
- <module>cdk</module>
- </modules>
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>master</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>samples</artifactId>
+ <packaging>pom</packaging>
+ <name>Ajax4jsf examples</name>
+ <modules>
+ <module>ajaxPortlet</module>
+ <module>tomahawkCompability</module>
+ <module>useCases</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.1</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8080</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>ajax4jsf</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.12</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>jsf1_1</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>jsfVersion</name>
+ <value>1.1</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>jsf1_2</id>
+ <properties>
+ <jsfVersion>1.2_04</jsfVersion>
+ </properties>
+ <build>
+ <defaultGoal>jetty:run</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsfVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsfVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>myfaces</id>
+ <properties>
+ <myfaces>1.1.5</myfaces>
+ <tomahawk>1.1.5</tomahawk>
+ </properties>
+ <build>
+ <plugins/>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>ajax4jsf</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${myfaces}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
</project>
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/.exadelproject
===================================================================
--- trunk/samples/tomahawkCompability/.exadelproject (rev 0)
+++ trunk/samples/tomahawkCompability/.exadelproject 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="tomahawkCompability"
ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../../target/classes"
NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.eclipse.project%"
NAME="tomahawkCompability"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml"
SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT"
SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: trunk/samples/tomahawkCompability/pom.xml
===================================================================
--- trunk/samples/tomahawkCompability/pom.xml (rev 0)
+++ trunk/samples/tomahawkCompability/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<project>
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>tomahawkCompability</artifactId>
+ <packaging>war</packaging>
+ <name>tomahawkCompability Maven Webapp</name>
+ <properties>
+ <tomahawk>1.1.5</tomahawk>
+ </properties>
+ <build>
+ <finalName>tomahawkCompability</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk</artifactId>
+ <version>${tomahawk}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- trunk/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/java/org/ajax4jsf/Bean.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+ private int counter;
+
+ /**
+ * @return the counter
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * @param counter the counter to set
+ */
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public String inc() {
+ counter++;
+ return null;
+ }
+ public String dec() {
+ counter--;
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>beanB</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <render-kit>
+ <renderer>
+ <component-family>javax.faces.Form</component-family>
+ <renderer-type>javax.faces.Form</renderer-type>
+
<renderer-class>org.ajax4jsf.renderkit.html.AjaxFormRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>javax.faces.Command</component-family>
+ <renderer-type>javax.faces.Link</renderer-type>
+
<renderer-class>org.ajax4jsf.renderkit.html.HtmlCommandLinkRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
Added: trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++
trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added: trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/jboss-web.xml 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,10 @@
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>
+ org.ajax4jsf:loader=tomahawkCompability
+ <loader-repository-config>
+ java2ParentDelegation=false
+ </loader-repository-config>
+ </loader-repository>
+ </class-loading>
+</jboss-web>
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/WEB-INF/web.xml 2007-04-30 17:31:18
UTC (rev 140)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
+ <init-param>
+ <param-name>maxFileSize</param-name>
+ <param-value>20m</param-value>
+ </init-param>
+ </filter>
+ <!-- extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages -->
+ <filter-mapping>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+ <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry
-->
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <!-- extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.) -->
+<filter-mapping>
+ <filter-name>MyFacesExtensionsFilter</filter-name>
+ <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
+</filter-mapping><filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/samples/tomahawkCompability/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/index.jsp
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/index.jsp 2007-04-30 17:31:18 UTC
(rev 140)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/faces/pages/index.jsp" />
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/pages/index.jsp
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/pages/index.jsp 2007-04-30 17:31:18
UTC (rev 140)
@@ -0,0 +1,46 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+<%@ taglib
uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
+<html>
+<head>
+<title>A4J form sample page</title>
+</head>
+<body>
+<h1>Ajax submitted form with Tomahawk components</h1>
+<f:view>
+ <a4j:form id="ajaxform-with-defis" ajaxSubmit="true"
reRender="tabs,counter">
+ <h:panelGrid columns="2" border="1">
+ <h:commandButton action="#{bean.inc}" value="Increment" />
+ <h:commandLink value="Decrement"
action="#{bean.dec}"></h:commandLink>
+ <h:outputText value="Counter:" />
+ <h:outputText id="counter" value="#{bean.counter}" />
+ </h:panelGrid>
+ <h:panelGroup id="tabs">
+ <t:panelTabbedPane serverSideTabSwitch="true">
+ <t:panelTab label="A">
+ <h:inputText id="a" value="First" />
+ <h:outputLabel value="First tab input"
for="a"></h:outputLabel>
+ </t:panelTab>
+ <t:panelTab label="B">
+ <h:inputText id="b" value="First" />
+ <h:outputLabel value="Second tab input"
for="b"></h:outputLabel>
+ </t:panelTab>
+ </t:panelTabbedPane>
+ </h:panelGroup>
+ </a4j:form>
+ <h2>Same form without user-provided ID</h2>
+ <f:subview id="subview">
+ <a4j:form ajaxSubmit="true" reRender="counterB">
+ <h:panelGrid columns="2" border="1">
+ <h:commandButton action="#{beanB.inc}" value="Increment" />
+ <h:commandLink value="Decrement"
action="#{beanB.dec}"></h:commandLink>
+ <h:outputText value="Counter:" />
+ <h:outputText id="counterB" value="#{beanB.counter}" />
+ </h:panelGrid>
+ </a4j:form>
+ </f:subview>
+ <a4j:log hotkey="M"/>
+</f:view>
+</body>
+</html>
Added: trunk/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/pages/index.xhtml 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: trunk/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
===================================================================
--- trunk/samples/tomahawkCompability/src/main/webapp/pages/response.jsp
(rev 0)
+++ trunk/samples/tomahawkCompability/src/main/webapp/pages/response.jsp 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,13 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"
%>
+<html>
+ <head>
+ <title>Response page</title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added: trunk/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- trunk/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java
(rev 0)
+++ trunk/samples/tomahawkCompability/src/test/java/org/ajax4jsf/BeanTest.java 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Added: trunk/samples/useCases/.exadelproject
===================================================================
--- trunk/samples/useCases/.exadelproject (rev 0)
+++ trunk/samples/useCases/.exadelproject 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="useCases" ENTITY="FileSystems"
+ VERSION="8.0.4" WORKSPACE_HOME="./src/main/webapp/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%exadel.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../java" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../resources" NAME="src2"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../test/java" NAME="src3"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.workspace%/../../../../target/classes"
NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%exadel.eclipse.project%" NAME="useCases"/>
+ <WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml"
SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" ROOT="WEB-ROOT"
SRC="src,src2,src3" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: trunk/samples/useCases/pom.xml
===================================================================
--- trunk/samples/useCases/pom.xml (rev 0)
+++ trunk/samples/useCases/pom.xml 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.ajax4jsf</groupId>
+ <version>1.1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>useCases</artifactId>
+ <packaging>war</packaging>
+ <name>useCases Maven Webapp</name>
+ <build>
+ <finalName>useCases</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>com.uwyn</groupId>
+ <artifactId>jhighlight</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/samples/useCases/src/main/java/logging.properties
===================================================================
--- trunk/samples/useCases/src/main/java/logging.properties (rev
0)
+++ trunk/samples/useCases/src/main/java/logging.properties 2007-04-30 17:31:18 UTC (rev
140)
@@ -0,0 +1,21 @@
+handlers org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level ALL
+org.apache.juli.FileHandler.directory ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix ajax4jsf.
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+facelets.level=ALL
+com.sun.faces.level=ALL
+org.apache.myfaces.level=ALL
+org.ajax4jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=ALL
+com.exadel.level=ALL
+
\ No newline at end of file
Added: trunk/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- trunk/samples/useCases/src/main/java/org/ajax4jsf/Bean.java
(rev 0)
+++ trunk/samples/useCases/src/main/java/org/ajax4jsf/Bean.java 2007-04-30 17:31:18 UTC
(rev 140)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+ private java.lang.String text;
+
+ public java.lang.String getText() {
+ return text;
+ }
+
+ public void setText(java.lang.String text) {
+ this.text = text;
+ }
+
+ public String ok(){
+ System.out.println("Button pressed");
+ return null;
+ }
+
+}
\ No newline at end of file
Added: trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml 2007-04-30 17:31:18
UTC (rev 140)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>text</property-name>
+ <property-class>java.lang.String</property-class>
+ <null-value/>
+ </managed-property>
+ </managed-bean>
+</faces-config>
Added: trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++ trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-04-30
17:31:18 UTC (rev 140)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Added: trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml (rev
0)
+++ trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml 2007-04-30 17:31:18 UTC (rev
140)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/samples/useCases/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/useCases/src/main/webapp/index.jsp (rev 0)
+++ trunk/samples/useCases/src/main/webapp/index.jsp 2007-04-30 17:31:18 UTC (rev 140)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/faces/pages/index.jsp" />
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/samples/useCases/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/index.jsp (rev
0)
+++ trunk/samples/useCases/src/main/webapp/pages/index.jsp 2007-04-30 17:31:18 UTC (rev
140)
@@ -0,0 +1,12 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added: trunk/samples/useCases/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/index.xhtml (rev
0)
+++ trunk/samples/useCases/src/main/webapp/pages/index.xhtml 2007-04-30 17:31:18 UTC (rev
140)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: trunk/samples/useCases/src/main/webapp/pages/prependId.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/prependId.xhtml
(rev 0)
+++ trunk/samples/useCases/src/main/webapp/pages/prependId.xhtml 2007-04-30 17:31:18 UTC
(rev 140)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+ <body>
+
+ <h:form id="rgForm2" prependId="false">
+
+ <h:inputText value="#{bean.text}">
+ <a4j:support event="onkeyup" reRender="repeater"
requestDelay="100"/>
+ </h:inputText>
+ <h:outputText id="repeater" value="#{bean.text}"
/>
+ <h:commandButton action="#{bean.ok}"
value="Ok"></h:commandButton>
+ </h:form>
+ <a4j:log hotkey="M"></a4j:log>
+ </body>
+ </html>
\ No newline at end of file
Added: trunk/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
===================================================================
--- trunk/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java
(rev 0)
+++ trunk/samples/useCases/src/test/java/org/ajax4jsf/BeanTest.java 2007-04-30 17:31:18
UTC (rev 140)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}