Author: andrei_exadel
Date: 2009-02-25 12:11:38 -0500 (Wed, 25 Feb 2009)
New Revision: 12746
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/SexConverter.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
Removed:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/main.xhtml
Log:
Users prefs
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/SexConverter.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/SexConverter.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/SexConverter.java 2009-02-25
17:11:38 UTC (rev 12746)
@@ -0,0 +1,34 @@
+/**
+ *
+ */
+package org.richfaces.realworld.user;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.faces.Converter;
+import org.richfaces.realworld.domain.Sex;
+
+/**
+ * @author Andrey Markavtsov
+ *
+ */
+@Name("sexConverter")
+@Converter
+public class SexConverter implements javax.faces.convert.Converter {
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ return Sex.valueOf(value);
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ return value.toString();
+ }
+
+}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-25
17:11:28 UTC (rev 12745)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-25
17:11:38 UTC (rev 12746)
@@ -301,4 +301,8 @@
public void setSelectedShelf(Shelf selectedShelf) {
this.selectedShelf = selectedShelf;
}
+
+ public User getUser() {
+ return user;
+ }
}
Copied:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
(from rev 12735,
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml)
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/main.xhtml
===================================================================
(Binary files differ)
Show replies by date