myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r698369 - in /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate: ConvertSSNTag.java PasswordValidator.java SSNConverter.java ValidatePasswordTag.java
Date Tue, 23 Sep 2008 21:52:40 GMT
Author: matzew
Date: Tue Sep 23 14:52:40 2008
New Revision: 698369

URL: http://svn.apache.org/viewvc?rev=698369&view=rev
Log:
TRINIDAD-1214 - Trinidad Demo converters & validators use deprecated methods & classes

Modified:
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ConvertSSNTag.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/PasswordValidator.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/SSNConverter.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ValidatePasswordTag.java

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ConvertSSNTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ConvertSSNTag.java?rev=698369&r1=698368&r2=698369&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ConvertSSNTag.java
(original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ConvertSSNTag.java
Tue Sep 23 14:52:40 2008
@@ -18,34 +18,29 @@
  */
 package org.apache.myfaces.trinidaddemo.convertValidate;
 
+import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
-import javax.faces.webapp.ConverterTag;
+import javax.faces.webapp.ConverterELTag;
 
 import javax.servlet.jsp.JspException;
 
 
-public class ConvertSSNTag extends ConverterTag
+public class ConvertSSNTag extends ConverterELTag
 {
 
   public ConvertSSNTag()
   {
   }
 
-  @Override
-  public int doStartTag() throws JspException
-  {
-    super.setConverterId(SSNConverter.CONVERTER_ID);
-    return super.doStartTag();
-  }
-
   /**
    * 
    */
   @Override
   protected Converter createConverter() throws JspException
   {
-    SSNConverter converter =
-                              (SSNConverter)super.createConverter();
+    Application app = FacesContext.getCurrentInstance().getApplication();
+    SSNConverter converter = (SSNConverter)app.createConverter(SSNConverter.CONVERTER_ID);
     return converter;
   }
 }

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/PasswordValidator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/PasswordValidator.java?rev=698369&r1=698368&r2=698369&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/PasswordValidator.java
(original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/PasswordValidator.java
Tue Sep 23 14:52:40 2008
@@ -105,7 +105,7 @@
     {
       o = component.getAttributes().get("label");
       if (o == null)
-        o = component.getValueBinding("label");
+        o = component.getValueExpression("label");
     }
     return o;
   }

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/SSNConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/SSNConverter.java?rev=698369&r1=698368&r2=698369&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/SSNConverter.java
(original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/SSNConverter.java
Tue Sep 23 14:52:40 2008
@@ -161,7 +161,7 @@
       Object label = null;
       label = component.getAttributes().get("label");
       if (label == null)
-        label = component.getValueBinding("label");
+        label = component.getValueExpression("label");
       if (label != null)
         lfm.setLabel(label);
     }

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ValidatePasswordTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ValidatePasswordTag.java?rev=698369&r1=698368&r2=698369&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ValidatePasswordTag.java
(original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/convertValidate/ValidatePasswordTag.java
Tue Sep 23 14:52:40 2008
@@ -18,33 +18,29 @@
  */
 package org.apache.myfaces.trinidaddemo.convertValidate;
 
+import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
 import javax.faces.validator.Validator;
-import javax.faces.webapp.ValidatorTag;
+import javax.faces.webapp.ValidatorELTag;
 import javax.servlet.jsp.JspException;
 
 
-public class ValidatePasswordTag extends ValidatorTag
+public class ValidatePasswordTag extends ValidatorELTag
 {
 
   public ValidatePasswordTag()
   {
   }
 
-  @Override
-  public int doStartTag() throws JspException
-  {
-    super.setValidatorId(PasswordValidator.VALIDATOR_ID);
-    return super.doStartTag();
-  }
-
   /**
    * 
    */
   @Override
   protected Validator createValidator() throws JspException
   {
+    Application app = FacesContext.getCurrentInstance().getApplication();
     PasswordValidator validator =
-                              (PasswordValidator)super.createValidator();
+                (PasswordValidator)app.createValidator(PasswordValidator.VALIDATOR_ID);
     return validator;
   }
 }



Mime
View raw message