Author: maksimkaszynski
Date: 2007-11-30 09:53:50 -0500 (Fri, 30 Nov 2007)
New Revision: 4391
Modified:
branches/3.1.x/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1355
backported to 3.1.x branch
Modified:
branches/3.1.x/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
===================================================================
---
branches/3.1.x/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java 2007-11-30
14:47:13 UTC (rev 4390)
+++
branches/3.1.x/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java 2007-11-30
14:53:50 UTC (rev 4391)
@@ -61,7 +61,7 @@
protected void doDecode(FacesContext context, UIComponent component) {
UIForm form = getUtils().getNestingForm(context,component);
if(null != form){
- String hiddenFieldId =
form.getClientId(context)+AjaxFormRenderer.HIDDEN_FIELD_SUFFIX;
+ String hiddenFieldId = getHiddenFieldId(context, form, component);
Object hiddenFieldValue;
if(null !=
(hiddenFieldValue=context.getExternalContext().getRequestParameterMap().get(hiddenFieldId))){
if(component.getClientId(context).equals(hiddenFieldValue)){
@@ -87,6 +87,10 @@
}
}
+ private String getHiddenFieldId(FacesContext context, UIForm form, UIComponent
component) {
+ return form.getClientId(context)+AjaxFormRenderer.HIDDEN_FIELD_SUFFIX;
+ }
+
protected void doEncodeActiveBegin(ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException{
writer.startElement(HTML.a_ELEMENT,component);
getUtils().encodeId(context,component);
@@ -119,6 +123,9 @@
parameters.put(param.getName(),param.getValue());
}
}
+
+ parameters.put(getHiddenFieldId(context, form, component),
component.getClientId(context));
+
submit.addParameter(parameters);
onclick.append("return ");
submit.appendScript(onclick);