[seam-commits] Seam SVN: r9169 - trunk/ui/src/main/java/org/jboss/seam/ui/component.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Oct 1 23:47:46 EDT 2008


Author: shane.bryzak at jboss.com
Date: 2008-10-01 23:47:46 -0400 (Wed, 01 Oct 2008)
New Revision: 9169

Modified:
   trunk/ui/src/main/java/org/jboss/seam/ui/component/UIConversationName.java
Log:
embed the natural conversation id instead of the name

Modified: trunk/ui/src/main/java/org/jboss/seam/ui/component/UIConversationName.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/UIConversationName.java	2008-10-02 03:46:37 UTC (rev 9168)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/UIConversationName.java	2008-10-02 03:47:46 UTC (rev 9169)
@@ -1,32 +1,15 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
 package org.jboss.seam.ui.component;
 
 import javax.faces.component.UIParameter;
 import javax.faces.context.FacesContext;
 
+import org.jboss.seam.navigation.ConversationIdParameter;
+import org.jboss.seam.navigation.Pages;
+
 /**
- * JSF component class
+ * Embeds the natural conversation ID into the request.
  *
+ * @author Shane Bryzak
  */
 public abstract class UIConversationName extends UIParameter {
 	
@@ -38,6 +21,13 @@
       return "conversationName";
    }
    
+   @Override
+   public Object getValue()
+   {
+      ConversationIdParameter param = Pages.instance().getConversationIdParameter(super.getValue().toString());      
+      return param != null ? param.getConversationId() : null;
+   }
+   
    public static UIConversationName newInstance() {
       return (UIConversationName) FacesContext.getCurrentInstance().getApplication().createComponent(COMPONENT_TYPE);
    }




More information about the seam-commits mailing list