You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by fischman_98 <mf...@powerconsultantsinc.com> on 2006/07/13 18:17:03 UTC

component binding causing duplicate ids on browser refresh - t:datatable

Using MyFaces 1.1.3 and Tomahawk 1.1.3...

I have a t:datatable and have implemented t:datascroller in the
header/footer facet.

When I add component binding to the dataTable....the page is rendered
fine...but when I hit refresh on the browser, I receive the following
error...

javax.servlet.ServletException: Client-id : _idJsp63first is duplicated in
the faces tree. Component : _idJsp45:data:_idJsp63first, path:
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId:
/explore/explore.jsp][Class: org.apache.myfaces.custom.div.Div,Id:
wrapper][Class: org.apache.myfaces.custom.div.Div,Id: contentTop][Class:
org.apache.myfaces.custom.div.Div,Id: searchResults][Class:
javax.faces.component.html.HtmlForm,Id: _idJsp45][Class:
org.apache.myfaces.component.html.ext.HtmlDataTable,Id: data][Class:
org.apache.myfaces.custom.datascroller.HtmlDataScroller,Id: _idJsp63][Class:
javax.faces.component.html.HtmlCommandLink,Id: _idJsp63first]}

The managed bean is sessionScope.

Any thoughts?

Code snippet is below...
JSP
				<h:form style="margin: 0; padding: 0; width: 521px;">
					<t:dataTable var="rows" value="#{exploreBean.rows}"
						rows="#{exploreBean.rowsPerPage}" id="data" headerClass="header"
						styleClass="imageTable" footerClass="footer"
						binding="#{exploreBean.resultsTable}"
						columnClasses="imageCol1,imageCol2,imageCol3">
						<f:facet name="header">
							<t:dataScroller displayedRowsCountVar="dispCount"
								firstRowIndexVar="rowFirst" for="data" lastRowIndexVar="rowLast"
								pageCountVar="pageCount" pageIndexVar="pageIndex"
								paginator="true" paginatorMaxPages="10"
								renderFacetsIfSinglePage="false" styleClass="scrollerTable"
								paginatorActiveColumnClass="scollerActive">
								<f:facet name="first">
									<t:graphicImage url="#{bundle.imagePath}arrow-first.gif"
										border="0" />
								</f:facet>
.
.
.
sessionScope managedBean
	private UIData resultsTable;
.
.
.
	/**
	 * @return Returns the resultsTable.
	 */
	public UIData getResultsTable() {
		return resultsTable;
	}

	/**
	 * @param resultsTable
	 *            The resultsTable to set.
	 */
	public void setResultsTable(UIData resultsTable) {
		this.resultsTable = resultsTable;
	}

-- 
View this message in context: http://www.nabble.com/component-binding-causing-duplicate-ids-on-browser-refresh---t%3Adatatable-tf1938349.html#a5311480
Sent from the My Faces - Dev forum at Nabble.com.