Author: pete.muir(a)jboss.org
Date: 2008-04-01 08:39:05 -0400 (Tue, 01 Apr 2008)
New Revision: 7785
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationNameRendererBase.java
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationPropagationRendererBase.java
Log:
Minor, get parameter name from component
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java
===================================================================
---
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java 2008-04-01
12:21:31 UTC (rev 7784)
+++
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/CommandButtonParameterRendererBase.java 2008-04-01
12:39:05 UTC (rev 7785)
@@ -26,7 +26,7 @@
protected abstract LogProvider getLog();
- protected abstract String getParameterName();
+ protected abstract String getParameterName(UIComponent component);
@Override
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component)
@@ -56,13 +56,13 @@
"if (document.all)" +
"{ " + // what follows should work with NN6 but doesn't
in M14"
"input.type = 'hidden';" +
- "input.name = '" + getParameterName() +
"';" +
+ "input.name = '" + getParameterName(component) +
"';" +
"input.value = '" + parameter.getValue() +
"';" +
"}" +
"else if (document.getElementById) " +
"{" + // so here is theNN6 workaround
"input.setAttribute('type', 'hidden');" +
- "input.setAttribute('name', '" +
getParameterName() + "');" +
+ "input.setAttribute('name', '" +
getParameterName(component) + "');" +
"input.setAttribute('value', '" +
parameter.getValue() + "');" +
"}" +
"form.appendChild(input);" +
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationNameRendererBase.java
===================================================================
---
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationNameRendererBase.java 2008-04-01
12:21:31 UTC (rev 7784)
+++
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationNameRendererBase.java 2008-04-01
12:39:05 UTC (rev 7785)
@@ -1,5 +1,7 @@
package org.jboss.seam.ui.renderkit;
+import javax.faces.component.UIComponent;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.ui.component.UIConversationName;
@@ -12,7 +14,7 @@
{
private static LogProvider log =
Logging.getLogProvider(ConversationNameRendererBase.class);
- private static final String PARAMETER_NAME = "conversationName";
+
@Override
protected LogProvider getLog()
@@ -21,9 +23,9 @@
}
@Override
- protected String getParameterName()
+ protected String getParameterName(UIComponent component)
{
- return PARAMETER_NAME;
+ return ((UIConversationName) component).getName();
}
@Override
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationPropagationRendererBase.java
===================================================================
---
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationPropagationRendererBase.java 2008-04-01
12:21:31 UTC (rev 7784)
+++
trunk/ui/src/main/java/org/jboss/seam/ui/renderkit/ConversationPropagationRendererBase.java 2008-04-01
12:39:05 UTC (rev 7785)
@@ -3,6 +3,8 @@
+import javax.faces.component.UIComponent;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.ui.component.UIConversationPropagation;
@@ -13,8 +15,8 @@
*/
public class ConversationPropagationRendererBase extends
CommandButtonParameterRendererBase
{
+
private static LogProvider log =
Logging.getLogProvider(ConversationPropagationRendererBase.class);
- private static final String PARAMETER_NAME = "conversationPropagation";
@Override
protected Class getComponentClass()
@@ -29,8 +31,8 @@
}
@Override
- protected String getParameterName()
+ protected String getParameterName(UIComponent component)
{
- return PARAMETER_NAME;
+ return ((UIConversationPropagation) component).getName();
}
}
\ No newline at end of file
Show replies by date