You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/08/28 23:34:41 UTC
svn commit: r689999 - in
/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces:
component/html/ext/HtmlDataTableHack.java
custom/datalist/AbstractHtmlDataList.java
Author: lu4242
Date: Thu Aug 28 14:34:41 2008
New Revision: 689999
URL: http://svn.apache.org/viewvc?rev=689999&view=rev
Log:
TOMAHAWK-542 forceId does not work on dataTable
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTableHack.java
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTableHack.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTableHack.java?rev=689999&r1=689998&r2=689999&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTableHack.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTableHack.java Thu Aug 28 14:34:41 2008
@@ -42,6 +42,7 @@
import javax.servlet.jsp.jstl.sql.Result;
import org.apache.myfaces.component.ForceIdAware;
+import org.apache.myfaces.component.html.util.HtmlComponentUtils;
import org.apache.myfaces.custom.ExtendedComponentBase;
/**
@@ -106,7 +107,11 @@
*/
public String getClientId(FacesContext context)
{
- String clientId = super.getClientId(context);
+ String clientId = HtmlComponentUtils.getClientId(this, getRenderer(context), context);
+ if (clientId == null)
+ {
+ clientId = super.getClientId(context);
+ }
int rowIndex = getRowIndex();
if (rowIndex == -1)
{
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java?rev=689999&r1=689998&r2=689999&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java Thu Aug 28 14:34:41 2008
@@ -21,6 +21,7 @@
import java.util.Iterator;
import java.util.Map;
+import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -172,29 +173,6 @@
}
}
- public String getClientId(FacesContext context)
- {
- String clientId = HtmlComponentUtils.getClientId(
- this,getRenderer(context),context);
-
- if(clientId==null)
- {
- return super.getClientId(context);
- }
- else
- {
- int rowIndex = getRowIndex();
- if (rowIndex == -1)
- {
- return clientId;
- }
- else
- {
- return clientId + "_" + rowIndex;
- }
- }
- }
-
public void setRowIndex(int rowIndex)
{
super.setRowIndex(rowIndex);