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 2009/11/20 23:28:23 UTC
svn commit: r882743 - in /myfaces/core/trunk/api/src/main/java/javax/faces:
component/ component/html/ convert/ validator/
Author: lu4242
Date: Fri Nov 20 22:28:21 2009
New Revision: 882743
URL: http://svn.apache.org/viewvc?rev=882743&view=rev
Log:
MYFACES-2411 Update api to match latest signature
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UINamingContainer.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessage.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessages.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItem.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItems.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlColumn.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlGraphicImage.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutputLink.java
myfaces/core/trunk/api/src/main/java/javax/faces/convert/NumberConverter.java
myfaces/core/trunk/api/src/main/java/javax/faces/validator/DoubleRangeValidator.java
myfaces/core/trunk/api/src/main/java/javax/faces/validator/LengthValidator.java
myfaces/core/trunk/api/src/main/java/javax/faces/validator/LongRangeValidator.java
myfaces/core/trunk/api/src/main/java/javax/faces/validator/RequiredValidator.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UINamingContainer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UINamingContainer.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UINamingContainer.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UINamingContainer.java Fri Nov 20 22:28:21 2009
@@ -23,6 +23,7 @@
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
* Base class for components that provide a new "namespace" for the ids of their
@@ -110,6 +111,13 @@
}
}
+ @JSFProperty(deferredValueType="java.lang.Boolean")
+ @Override
+ public boolean isRendered()
+ {
+ return super.isRendered();
+ }
+
enum PropertyKeys
{
uniqueIdCounter
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java Fri Nov 20 22:28:21 2009
@@ -20,7 +20,9 @@
import javax.el.ValueExpression;
import javax.faces.el.ValueBinding;
+
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
* A component that allows the user to select or unselect an object.
@@ -139,4 +141,10 @@
super.setValueExpression(name, binding);
}
}
+
+ @JSFProperty(deferredValueType="java.lang.Boolean")
+ public Object getValue()
+ {
+ return super.getValue();
+ }
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java Fri Nov 20 22:28:21 2009
@@ -35,6 +35,9 @@
import javax.faces.render.Renderer;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperties;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
* Base class for the various component classes that allow a user to select zero or more options from a set.
@@ -50,6 +53,12 @@
* </p>
*/
@JSFComponent(defaultRendererType = "javax.faces.Listbox")
+@JSFJspProperties
+(properties={
+ @JSFJspProperty(name="hideNoSelectionOption", returnType="boolean"),
+ @JSFJspProperty(name="collectionType", returnType="java.lang.String")
+}
+)
public class UISelectMany extends UIInput
{
public static final String COMPONENT_TYPE = "javax.faces.SelectMany";
@@ -67,7 +76,7 @@
{
return COMPONENT_FAMILY;
}
-
+
public Object[] getSelectedValues()
{
return (Object[]) getValue();
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectOne.java Fri Nov 20 22:28:21 2009
@@ -19,7 +19,10 @@
package javax.faces.component;
import javax.faces.context.FacesContext;
+
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
* Component for choosing one option out of a set of possibilities.
@@ -33,6 +36,7 @@
* </p>
*/
@JSFComponent(defaultRendererType = "javax.faces.Menu")
+@JSFJspProperty(name="hideNoSelectionOption", returnType="boolean")
public class UISelectOne extends UIInput
{
public static final String COMPONENT_TYPE = "javax.faces.SelectOne";
@@ -50,7 +54,7 @@
{
return COMPONENT_FAMILY;
}
-
+
/**
* Verify that the result of converting the newly submitted value is <i>equal</i> to the value property of one of
* the child SelectItem objects. If this is not true, a validation error is reported.
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java Fri Nov 20 22:28:21 2009
@@ -31,6 +31,8 @@
import javax.faces.render.Renderer;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
*
@@ -44,7 +46,9 @@
*
* @since 2.0
*/
-@JSFComponent(name = "f:viewParam", bodyContent = "JSP")
+@JSFComponent(name = "f:viewParam", bodyContent = "JSP",
+ tagClass = "org.apache.myfaces.taglib.core.ParamTag")
+@JSFJspProperty(name = "maxlength", returnType = "int", longDesc = "The max number or characters allowed for this param")
public class UIViewParameter extends UIInput
{
public static final String COMPONENT_FAMILY = "javax.faces.ViewParameter";
@@ -77,6 +81,9 @@
@Override
public void encodeAll(FacesContext context) throws IOException
{
+ if (context == null) {
+ throw new NullPointerException();
+ }
setSubmittedValue(getStringValue(context));
}
@@ -147,12 +154,20 @@
return (String)super.getSubmittedValue();
}
+ @JSFProperty(tagExcluded=true)
@Override
public boolean isImmediate()
{
return false;
}
-
+
+ @JSFProperty(tagExcluded=true)
+ @Override
+ public boolean isRendered()
+ {
+ return super.isRendered();
+ }
+
@Override
public void processValidators(FacesContext context)
{
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessage.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessage.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessage.java Fri Nov 20 22:28:21 2009
@@ -79,6 +79,6 @@
* @return
*/
@JSFProperty
- (defaultValue = "true")
+ (defaultValue = "true", tagExcluded=true)
public abstract boolean isRedisplay();
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessages.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessages.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessages.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/_UIMessages.java Fri Nov 20 22:28:21 2009
@@ -77,7 +77,7 @@
* @return
*/
@JSFProperty
- (defaultValue = "true")
+ (defaultValue = "true", tagExcluded=true)
public abstract boolean isRedisplay();
/**
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItem.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItem.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItem.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItem.java Fri Nov 20 22:28:21 2009
@@ -59,7 +59,7 @@
*
* @return the new value value
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="javax.faces.model.SelectItem")
public abstract Object getValue();
/**
@@ -68,7 +68,7 @@
*
* @return the new itemDisabled value
*/
- @JSFProperty(defaultValue = "false")
+ @JSFProperty(defaultValue = "false", deferredValueType="java.lang.Boolean")
public abstract boolean isItemDisabled();
/**
@@ -76,7 +76,7 @@
*
* @return the new itemEscaped value
*/
- @JSFProperty(defaultValue = "false", jspName = "escape")
+ @JSFProperty(defaultValue = "false", jspName = "escape", deferredValueType="java.lang.String")
public abstract boolean isItemEscaped();
/**
@@ -111,6 +111,6 @@
* @return is the component represent no select option
*/
@JSFProperty
- (defaultValue="false")
+ (defaultValue="false", deferredValueType="java.lang.Boolean")
public abstract boolean isNoSelectionOption();
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItems.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItems.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItems.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/_UISelectItems.java Fri Nov 20 22:28:21 2009
@@ -129,7 +129,7 @@
* @return
*/
@JSFExclude
- @JSFProperty(defaultValue = "false")
+ @JSFProperty(defaultValue = "false", deferredValueType="java.lang.Boolean")
public boolean isItemDisabled() {
return false;
}
@@ -142,7 +142,7 @@
* @return
*/
@JSFExclude
- @JSFProperty(defaultValue = "true")
+ @JSFProperty(defaultValue = "true", deferredValueType="java.lang.Boolean")
public boolean isItemLabelEscaped() {
return true;
}
@@ -157,10 +157,10 @@
* @since 2.0
* @return
*/
- @JSFExclude
- @JSFProperty
- public Object getNoSelectionValue() {
- return null;
- }
+ //@JSFExclude
+ //@JSFProperty
+ //public Object getNoSelectionValue() {
+ // return null;
+ //}
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlColumn.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlColumn.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlColumn.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlColumn.java Fri Nov 20 22:28:21 2009
@@ -21,6 +21,7 @@
import javax.faces.component.UIColumn;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFExclude;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
@@ -71,4 +72,12 @@
*/
@JSFProperty (defaultValue="false")
public abstract boolean isRowHeader();
+
+ @JSFProperty(deferredValueType="java.lang.Boolean")
+ @JSFExclude
+ @Override
+ public boolean isRendered()
+ {
+ return super.isRendered();
+ }
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlGraphicImage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlGraphicImage.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlGraphicImage.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlGraphicImage.java Fri Nov 20 22:28:21 2009
@@ -21,6 +21,7 @@
import javax.faces.component.UIGraphic;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFExclude;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
/**
@@ -82,4 +83,25 @@
@JSFProperty
public abstract String getWidth();
+ /**
+ *
+ * @return
+ */
+ @JSFProperty
+ @JSFExclude
+ public String getLibrary()
+ {
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ */
+ @JSFProperty
+ @JSFExclude
+ public String getName()
+ {
+ return null;
+ }
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutputLink.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutputLink.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutputLink.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutputLink.java Fri Nov 20 22:28:21 2009
@@ -51,6 +51,6 @@
*
* @return
*/
- @JSFProperty
+ @JSFProperty(tagExcluded=true)
public abstract String getFragment();
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/convert/NumberConverter.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/convert/NumberConverter.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/convert/NumberConverter.java Fri Nov 20 22:28:21 2009
@@ -357,7 +357,7 @@
* Specifies whether output will contain grouping separators. Default: true.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Boolean")
public boolean isGroupingUsed()
{
return _groupingUsed;
@@ -373,7 +373,7 @@
* Specifies whether only the integer part of the input will be parsed. Default: false.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Boolean")
public boolean isIntegerOnly()
{
return _integerOnly;
@@ -390,7 +390,7 @@
* specified in the faces configuration file.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Object")
public Locale getLocale()
{
if (_locale != null) return _locale;
@@ -408,7 +408,7 @@
* The maximum number of digits in the fractional portion of the number.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMaxFractionDigits()
{
return _maxFractionDigits;
@@ -425,7 +425,7 @@
* The maximum number of digits in the integer portion of the number.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMaxIntegerDigits()
{
return _maxIntegerDigits;
@@ -442,7 +442,7 @@
* The minimum number of digits in the fractional portion of the number.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMinFractionDigits()
{
return _minFractionDigits;
@@ -459,7 +459,7 @@
* The minimum number of digits in the integer portion of the number.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMinIntegerDigits()
{
return _minIntegerDigits;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/validator/DoubleRangeValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/validator/DoubleRangeValidator.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/validator/DoubleRangeValidator.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/validator/DoubleRangeValidator.java Fri Nov 20 22:28:21 2009
@@ -149,7 +149,7 @@
* The largest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Double")
public double getMaximum()
{
return _maximum != null ? _maximum.doubleValue() : Double.MAX_VALUE;
@@ -165,7 +165,7 @@
* The smallest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Double")
public double getMinimum()
{
return _minimum != null ? _minimum.doubleValue() : Double.MIN_VALUE;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/validator/LengthValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/validator/LengthValidator.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/validator/LengthValidator.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/validator/LengthValidator.java Fri Nov 20 22:28:21 2009
@@ -122,7 +122,7 @@
* The largest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMaximum()
{
return _maximum != null ? _maximum.intValue() : 0;
@@ -138,7 +138,7 @@
* The smallest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Integer")
public int getMinimum()
{
return _minimum != null ? _minimum.intValue() : 0;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/validator/LongRangeValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/validator/LongRangeValidator.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/validator/LongRangeValidator.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/validator/LongRangeValidator.java Fri Nov 20 22:28:21 2009
@@ -149,7 +149,7 @@
* The largest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Long")
public long getMaximum()
{
return _maximum != null ? _maximum.longValue() : Long.MAX_VALUE;
@@ -165,7 +165,7 @@
* The smallest value that should be considered valid.
*
*/
- @JSFProperty
+ @JSFProperty(deferredValueType="java.lang.Long")
public long getMinimum()
{
return _minimum != null ? _minimum.longValue() : Long.MIN_VALUE;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/validator/RequiredValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/validator/RequiredValidator.java?rev=882743&r1=882742&r2=882743&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/validator/RequiredValidator.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/validator/RequiredValidator.java Fri Nov 20 22:28:21 2009
@@ -35,8 +35,7 @@
* @since 2.0
*/
@JSFValidator(name = "f:validateRequired",
- bodyContent = "empty",
- tagClass = "org.apache.myfaces.taglib.core.ValidateRequiredTag")
+ bodyContent = "empty")
@JSFJspProperty(name = "binding",
returnType = "javax.faces.validator.RequiredValidator",
longDesc = "A ValueExpression that evaluates to a RequiredValidator.")