You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/11/14 00:33:31 UTC
svn commit: r1034909 - in /myfaces/commons/branches/jsf_20:
myfaces-commons-components/
myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/
myfaces-commons-validators/
myfaces-commons-validators/src/main/java/org/apache/myfac...
Author: lu4242
Date: Sat Nov 13 23:33:31 2010
New Revision: 1034909
URL: http://svn.apache.org/viewvc?rev=1034909&view=rev
Log:
MFCOMMONS-25 Add Facelets Support to myfaces commons (and fix _DeltaStateHelper)
Modified:
myfaces/commons/branches/jsf_20/myfaces-commons-components/pom.xml
myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/_DeltaStateHelper.java
myfaces/commons/branches/jsf_20/myfaces-commons-validators/pom.xml
myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/_DeltaStateHelper.java
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/pom.xml?rev=1034909&r1=1034908&r2=1034909&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/pom.xml (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/pom.xml Sat Nov 13 23:33:31 2010
@@ -63,7 +63,7 @@
<execution>
<id>maketld</id>
<configuration>
- <xmlFile>META-INF/components.tld</xmlFile>
+ <xmlFile>META-INF/mc.tld</xmlFile>
<templateFile>tld-tomahawk20.vm</templateFile>
<params>
<shortname>mc</shortname>
@@ -79,7 +79,7 @@
<execution>
<id>makemcctaglib</id>
<configuration>
- <xmlFile>META-INF/components.taglib.xml</xmlFile>
+ <xmlFile>META-INF/mc.taglib.xml</xmlFile>
<xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
<templateFile>facelets-taglib20.vm</templateFile>
<params>
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/_DeltaStateHelper.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/_DeltaStateHelper.java?rev=1034909&r1=1034908&r2=1034909&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/_DeltaStateHelper.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/java/org/apache/myfaces/commons/converter/_DeltaStateHelper.java Sat Nov 13 23:33:31 2010
@@ -29,8 +29,6 @@ import java.util.Map;
import javax.el.ValueExpression;
import javax.faces.component.StateHelper;
import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
/**
@@ -114,13 +112,13 @@ import javax.faces.context.FacesContext;
* inside UIData share its state on all rows. There is no way to save
* delta per row.</li>
* <li>The map backed by method put(Serializable,String,Object) is
- * a replacement of UIComponentBase.attributesMap and UIComponent.bindings map.
+ * a replacement of ConverterBase.attributesMap and UIComponent.bindings map.
* Note that on jsf 1.2, instances saved on attributesMap should not be
* StateHolder, but on jsf 2.0 it is possible to have it. PartialStateHolder
* instances are not handled in this map, or in other words delta state is not
* handled in this classes (markInitialState and clearInitialState is not propagated).</li>
* <li>The list backed by method add(Serializable,Object) should be (is not) a
- * replacement of UIComponentBase.facesListeners, but note that StateHelper
+ * replacement of ConverterBase.facesListeners, but note that StateHelper
* does not implement PartialStateHolder, and facesListener could have instances
* of that class that needs to be notified when UIComponent.markInitialState or
* UIComponent.clearInitialState is called, or in other words facesListeners
@@ -546,7 +544,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- Object savedValue = UIComponentBase.saveAttachedState(context,
+ Object savedValue = ConverterBase.saveAttachedState(context,
value);
retArr[cnt + 1] = savedValue;
}
@@ -583,7 +581,7 @@ class _DeltaStateHelper implements State
else
{
//Save everything
- retArr[cnt + 1] = UIComponentBase.saveAttachedState(context, _fullState.get(key));
+ retArr[cnt + 1] = ConverterBase.saveAttachedState(context, _fullState.get(key));
}
cnt += 2;
}
@@ -612,7 +610,7 @@ class _DeltaStateHelper implements State
for (int cnt = 0; cnt < serializedState.length; cnt += 2)
{
Serializable key = (Serializable) serializedState[cnt];
- Object savedValue = UIComponentBase.restoreAttachedState(context,
+ Object savedValue = ConverterBase.restoreAttachedState(context,
serializedState[cnt + 1]);
if (isInitialStateMarked())
@@ -709,7 +707,7 @@ class _DeltaStateHelper implements State
Object[] listAsMap = (Object[]) state;
for (int cnt = 0; cnt < listAsMap.length; cnt += 2)
{
- this.put((K) listAsMap[cnt], (V) UIComponentBase
+ this.put((K) listAsMap[cnt], (V) ConverterBase
.restoreAttachedState(context, listAsMap[cnt + 1]));
}
}
@@ -727,7 +725,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- mapArr[cnt + 1] = UIComponentBase.saveAttachedState(context, value);
+ mapArr[cnt + 1] = ConverterBase.saveAttachedState(context, value);
}
else
{
@@ -799,7 +797,7 @@ class _DeltaStateHelper implements State
//we have to do it the hard way
for (Object elem : listAsArr)
{
- add((T) UIComponentBase.restoreAttachedState(context, elem));
+ add((T) ConverterBase.restoreAttachedState(context, elem));
}
}
@@ -814,7 +812,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- values[i] = UIComponentBase.saveAttachedState(context, value);
+ values[i] = ConverterBase.saveAttachedState(context, value);
}
else
{
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-validators/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-validators/pom.xml?rev=1034909&r1=1034908&r2=1034909&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-validators/pom.xml (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-validators/pom.xml Sat Nov 13 23:33:31 2010
@@ -99,7 +99,7 @@
<execution>
<id>makemcctaglib</id>
<configuration>
- <xmlFile>META-INF/mcc.taglib.xml</xmlFile>
+ <xmlFile>META-INF/mcv.taglib.xml</xmlFile>
<xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
<templateFile>facelets-taglib20.vm</templateFile>
<params>
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/_DeltaStateHelper.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/_DeltaStateHelper.java?rev=1034909&r1=1034908&r2=1034909&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/_DeltaStateHelper.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-validators/src/main/java/org/apache/myfaces/commons/validator/_DeltaStateHelper.java Sat Nov 13 23:33:31 2010
@@ -29,8 +29,6 @@ import java.util.Map;
import javax.el.ValueExpression;
import javax.faces.component.StateHelper;
import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
/**
@@ -546,7 +544,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- Object savedValue = UIComponentBase.saveAttachedState(context,
+ Object savedValue = ValidatorBase.saveAttachedState(context,
value);
retArr[cnt + 1] = savedValue;
}
@@ -583,7 +581,7 @@ class _DeltaStateHelper implements State
else
{
//Save everything
- retArr[cnt + 1] = UIComponentBase.saveAttachedState(context, _fullState.get(key));
+ retArr[cnt + 1] = ValidatorBase.saveAttachedState(context, _fullState.get(key));
}
cnt += 2;
}
@@ -612,7 +610,7 @@ class _DeltaStateHelper implements State
for (int cnt = 0; cnt < serializedState.length; cnt += 2)
{
Serializable key = (Serializable) serializedState[cnt];
- Object savedValue = UIComponentBase.restoreAttachedState(context,
+ Object savedValue = ValidatorBase.restoreAttachedState(context,
serializedState[cnt + 1]);
if (isInitialStateMarked())
@@ -709,7 +707,7 @@ class _DeltaStateHelper implements State
Object[] listAsMap = (Object[]) state;
for (int cnt = 0; cnt < listAsMap.length; cnt += 2)
{
- this.put((K) listAsMap[cnt], (V) UIComponentBase
+ this.put((K) listAsMap[cnt], (V) ValidatorBase
.restoreAttachedState(context, listAsMap[cnt + 1]));
}
}
@@ -727,7 +725,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- mapArr[cnt + 1] = UIComponentBase.saveAttachedState(context, value);
+ mapArr[cnt + 1] = ValidatorBase.saveAttachedState(context, value);
}
else
{
@@ -799,7 +797,7 @@ class _DeltaStateHelper implements State
//we have to do it the hard way
for (Object elem : listAsArr)
{
- add((T) UIComponentBase.restoreAttachedState(context, elem));
+ add((T) ValidatorBase.restoreAttachedState(context, elem));
}
}
@@ -814,7 +812,7 @@ class _DeltaStateHelper implements State
value instanceof List ||
!(value instanceof Serializable))
{
- values[i] = UIComponentBase.saveAttachedState(context, value);
+ values[i] = ValidatorBase.saveAttachedState(context, value);
}
else
{