You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/07/07 12:30:49 UTC
svn commit: r209583 - in /myfaces: api/trunk/src/java/javax/faces/component/
examples/trunk/simple/
tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/
tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/
tomahawk/trunk/tld/
Author: mmarinschek
Date: Thu Jul 7 03:30:46 2005
New Revision: 209583
URL: http://svn.apache.org/viewcvs?rev=209583&view=rev
Log:
added forceId to dataList, fixed bug with dataList not rendering its ID
Modified:
myfaces/api/trunk/src/java/javax/faces/component/UIData.java
myfaces/examples/trunk/simple/dataList.jsp
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/HtmlListRenderer.java
myfaces/tomahawk/trunk/tld/myfaces_ext.tld
Modified: myfaces/api/trunk/src/java/javax/faces/component/UIData.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/UIData.java?rev=209583&r1=209582&r2=209583&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/UIData.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/UIData.java Thu Jul 7 03:30:46 2005
@@ -15,6 +15,8 @@
*/
package javax.faces.component;
+import org.apache.myfaces.component.html.util.HtmlComponentUtils;
+
import java.io.IOException;
import java.io.Serializable;
import java.sql.ResultSet;
@@ -226,9 +228,13 @@
super.setValueBinding(name, binding);
}
- public String getClientId(FacesContext context)
- {
- String clientId = super.getClientId(context);
+ public String getClientId(FacesContext context)
+ {
+ String clientId = HtmlComponentUtils.getClientId(this, getRenderer(context), context);
+
+ if(clientId == null)
+ clientId = super.getClientId(context);
+
int rowIndex = getRowIndex();
if (rowIndex == -1)
{
Modified: myfaces/examples/trunk/simple/dataList.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/dataList.jsp?rev=209583&r1=209582&r2=209583&view=diff
==============================================================================
Binary files - no diff available.
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java?rev=209583&r1=209582&r2=209583&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java Thu Jul 7 03:30:46 2005
@@ -15,12 +15,11 @@
*/
package org.apache.myfaces.application.jsp;
-import org.apache.myfaces.webapp.webxml.ServletMapping;
-import org.apache.myfaces.webapp.webxml.WebXml;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.tiles.*;
+import org.apache.myfaces.webapp.webxml.WebXml;
+import org.apache.myfaces.webapp.webxml.ServletMapping;
import javax.faces.FacesException;
import javax.faces.application.ViewHandler;
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/HtmlListRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/HtmlListRenderer.java?rev=209583&r1=209582&r2=209583&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/HtmlListRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datalist/HtmlListRenderer.java Thu Jul 7 03:30:46 2005
@@ -57,12 +57,18 @@
if (layout.equals(LAYOUT_UL))
{
writer.startElement(HTML.UL_ELEM, uiComponent);
+
+ writer.writeAttribute(HTML.ID_ATTR, uiComponent.getClientId(facesContext),null);
+
HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
HTML.COMMON_PASSTROUGH_ATTRIBUTES);
}
else if (layout.equals(LAYOUT_OL))
{
writer.startElement(HTML.OL_ELEM, uiComponent);
+
+ writer.writeAttribute(HTML.ID_ATTR, uiComponent.getClientId(facesContext),null);
+
HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
HTML.COMMON_PASSTROUGH_ATTRIBUTES);
}
Modified: myfaces/tomahawk/trunk/tld/myfaces_ext.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tld/myfaces_ext.tld?rev=209583&r1=209582&r2=209583&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tld/myfaces_ext.tld (original)
+++ myfaces/tomahawk/trunk/tld/myfaces_ext.tld Thu Jul 7 03:30:46 2005
@@ -867,6 +867,7 @@
&ui_panel_attributes;
&html_universal_attributes;
&html_event_handler_attributes;
+ &ext_forceId_attribute;
<!-- UIData attributes -->
<attribute>
<name>value</name>