Author: andrei_exadel
Date: 2009-02-26 10:40:02 -0500 (Thu, 26 Feb 2009)
New Revision: 12759
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/UserPrefsBean.java
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
Log:
Userprefs
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/UserPrefsBean.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/UserPrefsBean.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/user/UserPrefsBean.java 2009-02-26
15:40:02 UTC (rev 12759)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.richfaces.realworld.user;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Sex;
+import org.richfaces.realworld.navigation.NavigationEnum;
+import org.richfaces.realworld.util.ConversationState;
+
+/**
+ * @author Andrey Markavtsov
+ *
+ */
+@Name("userPrefsBean")
+(a)Scope(ScopeType.CONVERSATION)
+public class UserPrefsBean {
+
+ @In(value="conversationState")
+ ConversationState conversationState;
+
+ static final SelectItem [] sexs = new SelectItem []
+ {
+ new SelectItem(Sex.MALE, "Male"),
+ new SelectItem(Sex.FEMALE, "Female")
+ };
+
+
+ public void clickUserListener(ActionEvent event) {
+ conversationState.setMainArea(NavigationEnum.USER_PREFS);
+ conversationState.setSelectedUser(conversationState.getUser());
+ }
+
+ public SelectItem [] getSexs () {
+ return sexs;
+ }
+}
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.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)
Show replies by thread