You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pa...@apache.org on 2022/10/26 03:03:21 UTC
[myfaces] branch main updated: MYFACES-4444: Faces 4.0 component deprecations
This is an automated email from the ASF dual-hosted git repository.
paulnicolucci pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/main by this push:
new bdbcabe06 MYFACES-4444: Faces 4.0 component deprecations
new 34adb8943 Merge pull request #364 from pnicolucci/MYFACES-4444
bdbcabe06 is described below
commit bdbcabe06b7d2459998fb713c0298473651e0e48
Author: Paul Nicolucci <pn...@gmail.com>
AuthorDate: Mon Oct 24 22:32:13 2022 -0400
MYFACES-4444: Faces 4.0 component deprecations
---
.../main/resources/META-INF/componentClass20.vm | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/api/src/main/resources/META-INF/componentClass20.vm b/api/src/main/resources/META-INF/componentClass20.vm
index a43d761a5..55980f6df 100644
--- a/api/src/main/resources/META-INF/componentClass20.vm
+++ b/api/src/main/resources/META-INF/componentClass20.vm
@@ -158,8 +158,22 @@ $innersource
#end
#set ($propertyList = ${component.propertyComponentList})
+#set ($deprecatedInFaces40 = '@Deprecated(since = "4.0", forRemoval = true)')
#foreach( $property in $propertyList )
+#set ($htmlInputFileDeprecated = "false")
+#set ($htmlInputSecretDeprecated = "false")
+#if ($component.className.equals("jakarta.faces.component.html.HtmlInputFile") &&
+ ($property.name == "alt" ||
+ $property.name == "autocomplete" ||
+ $property.name == "maxlength" ||
+ $property.name == "readonly" ||
+ $property.name == "size"))
+ #set ($htmlInputFileDeprecated = "true")
+#elseif ($component.className.equals("jakarta.faces.component.html.HtmlInputSecret") &&
+ ($property.name == "alt"))
+ #set ($htmlInputSecretDeprecated = "true")
+#end
#set ($field = $property.fieldName)
#set ($type = $utils.getClassFromFullClass($property.className))
#if($utils.getDefaultValueField($property))
@@ -270,6 +284,9 @@ $innersource
#set ($field = $property.name)
#end
+#if ("true" == $htmlInputFileDeprecated || "true" == $htmlInputSecretDeprecated)
+ $deprecatedInFaces40
+#end
public $type $utils.getMethodReaderFromProperty($property.name, $type)()
{
#if ($property.isLiteralOnly())
@@ -292,6 +309,9 @@ $innersource
#end
}
+#if ("true" == $htmlInputFileDeprecated || "true" == $htmlInputSecretDeprecated)
+ $deprecatedInFaces40
+#end
public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
{
getStateHelper().put(PropertyKeys.$field, $utils.getVariableFromName($property.name) );
@@ -379,6 +399,19 @@ $innersource
#set ($comma = "")
#set ($addc = "false")
#foreach( $property in $propertyList )
+#set ($htmlInputFileDeprecated = "false")
+#set ($htmlInputSecretDeprecated = "false")
+#if ($component.className.equals("jakarta.faces.component.html.HtmlInputFile") &&
+ ($property.name == "alt" ||
+ $property.name == "autocomplete" ||
+ $property.name == "maxlength" ||
+ $property.name == "readonly" ||
+ $property.name == "size"))
+ #set ($htmlInputFileDeprecated = "true")
+#elseif ($component.className.equals("jakarta.faces.component.html.HtmlInputSecret") &&
+ ($property.name == "alt"))
+ #set ($htmlInputSecretDeprecated = "true")
+#end
#if ($property.name == "for")
#set ($addc = "true")
## To keep compatibility with RI, we should call it forVal
@@ -403,10 +436,14 @@ $innersource
#else
#if ($property.isPartialStateHolder())
$comma ${field}Set
+#else
+#if ("true" == $htmlInputFileDeprecated || "true" == $htmlInputSecretDeprecated)
+ $comma $deprecatedInFaces40 $field
#else
$comma $field
#end
#end
+#end
#set($comma = ",")
#end
#if ("true" == $addc)