Author: pete.muir(a)jboss.org
Date: 2010-06-16 10:40:09 -0400 (Wed, 16 Jun 2010)
New Revision: 6445
Added:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java
Modified:
examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml
examples/trunk/jsf/pastecode/src/main/webapp/home.xhtml
Log:
fix lang conversion
Added:
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
(rev 0)
+++
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java 2010-06-16
14:40:09 UTC (rev 6445)
@@ -0,0 +1,13 @@
+package org.jboss.weld.examples.pastecode.jsf;
+
+import javax.faces.convert.EnumConverter;
+
+import org.jboss.weld.examples.pastecode.model.Language;
+
+public class LanguageConverter extends EnumConverter
+{
+ public LanguageConverter()
+ {
+ super(Language.class);
+ }
+}
Property changes on:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/jsf/LanguageConverter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
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-16
13:52:37 UTC (rev 6444)
+++ examples/trunk/jsf/pastecode/src/main/webapp/WEB-INF/faces-config.xml 2010-06-16
14:40:09 UTC (rev 6445)
@@ -19,5 +19,10 @@
<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>
</faces-config>
Modified: examples/trunk/jsf/pastecode/src/main/webapp/home.xhtml
===================================================================
--- examples/trunk/jsf/pastecode/src/main/webapp/home.xhtml 2010-06-16 13:52:37 UTC (rev
6444)
+++ examples/trunk/jsf/pastecode/src/main/webapp/home.xhtml 2010-06-16 14:40:09 UTC (rev
6445)
@@ -24,7 +24,7 @@
<h:panelGroup>
<h:outputLabel for="language" value="Language: "/>
<h:selectOneMenu id="language"
value="#{code.language}">
- <f:selectItems value="#{languages}" var="language"
itemLabel="#{language.name}" itemValue="#{language.extension}" />
+ <f:selectItems value="#{languages}" var="language"
itemLabel="#{language.name}" itemValue="#{language}" />
</h:selectOneMenu>
</h:panelGroup>
<h:panelGroup style="text-align:right;">