Author: pete.muir(a)jboss.org
Date: 2010-06-18 09:27:09 -0400 (Fri, 18 Jun 2010)
New Revision: 6486
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/TruncatingConverter.java
examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml
Log:
use jsf 2 :-)
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java
===================================================================
---
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java 2010-06-18
13:26:25 UTC (rev 6485)
+++
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java 2010-06-18
13:27:09 UTC (rev 6486)
@@ -1,9 +1,11 @@
package org.jboss.weld.examples.pastecode.jsf;
import javax.faces.convert.EnumConverter;
+import javax.faces.convert.FacesConverter;
import org.jboss.weld.examples.pastecode.model.Language;
+(a)FacesConverter(forClass=Language.class)
public class LanguageConverter extends EnumConverter
{
public LanguageConverter()
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/TruncatingConverter.java
===================================================================
---
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/TruncatingConverter.java 2010-06-18
13:26:25 UTC (rev 6485)
+++
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/TruncatingConverter.java 2010-06-18
13:27:09 UTC (rev 6486)
@@ -3,7 +3,9 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+@FacesConverter("truncatingConverter")
public class TruncatingConverter implements Converter
{
Modified: examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml 2010-06-18
13:26:25 UTC (rev 6485)
+++ examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml 2010-06-18
13:27:09 UTC (rev 6486)
@@ -21,15 +21,5 @@
<to-view-id>/history.xhtml?page=#{history.page}</to-view-id>
</navigation-case>
</navigation-rule>
-
- <converter>
-
<converter-for-class>org.jboss.weld.examples.pastecode.model.Language</converter-for-class>
-
<converter-class>org.jboss.weld.examples.pastecode.jsf.LanguageConverter</converter-class>
- </converter>
-
- <converter>
- <converter-id>truncatingConverter</converter-id>
-
<converter-class>org.jboss.weld.examples.pastecode.jsf.TruncatingConverter</converter-class>
- </converter>
</faces-config>
Show replies by date