Duplicate ID exception in extendedDataTable with PARTIAL_STATE_SAVING set to false
marcelbihr Dec 5, 2012 5:38 AMI played around with the extendedDataTable to find out whether it suits our needs. However I always get 'JSF1007: Doppelte Komponenten-ID topform:artefactTable:j_idt5 in Ansicht gefunden.' [which means duplicate component id found...] on postbacks (either via action button or also on sroll). When I set javax.faces.PARTIAL_STATE_SAVING to true, it works fine, when set to false the exception happens. The duplicate id happens on the column in the table. Assigning the column an id does not make any difference.
The bean providing the DataModel is Request-Scoped, but the exception also happens when I set it to SessionScoped.
In our project we need to set partial-state-saving to false in order for the viewscope (used otherwise heavily) to work correctly, just enabling parital-state-saving is thus not an option.
Facelet Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
</h:head>
<h:body>
<h:form id="topform">
<h:panelGroup id="fulltext" layout="block">
<h:inputText autocomplete="on" placeholder="Suche" value="#{tableBean.search}" id="fulltextSearchBox">
<f:ajax event="change" render="topform:artefactTable"/>
</h:inputText>
<h:commandButton value="Suchen">
<f:ajax event="click" render="topform:artefactTable"/>
</h:commandButton>
</h:panelGroup>
<rich:extendedDataTable id="artefactTable" style="height:200px; width:300px;" clientRows="20" value="#{tableBean.tableModel}" var="artefact" >
<rich:column >
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
#{artefact.salutation.label} #{artefact.lastname}, #{artefact.firstname}
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Firma" />
</f:facet>
#{personsBean.getOrganisationInfo(artefact)}
</rich:column>
</rich:extendedDataTable>
</h:form>
</h:body>
</html>
Any hints what the problem or a potential solution could be?
Regards
Marcel