<context-param>
<param-name>org.apache.myfaces.CHECK_ID_PRODUCTION_MODE</param-name>
<param-value>false</param-value>
</context-param>
You can also not use a component binding or only bind to request-scoped beans.
was:
Set the following context parameter to prevent MyFaces from checking for duplicates:
<context-param>
<param-name>org.apache.myfaces.CHECK_ID_PRODUCTION_MODE</param-name>
<param-value>false</param-value>
</context-param>
Description:
When testing the DataTable Row State demo on Liferay 6 with MyFaces, I was able to get it to fail with a duplicate ID exception. Other Data Table examples also show this behaviour but I haven't test them all. It can be done in a couple of different ways:
1) Reload a page with the Data Table Row State example
or
1) Setup two different portal pages with a least one of them container a Data Table Row State.
2) Visit Page A - the portal page with the Row State portlet. Iinteraction with the portlet doesn't appear necessary from what I've seen so far.
3) Visit Page B
4) Go back to Page A.
You can also replicate this in a non-portlet environment. If you switch out the main DataTable example with one of the ones that uses a component binding (Find, Grouping, or Row State), load the example and then reload the page, the same problem occurs.
MyFaces: Ends up throwing a duplicate id exception
was:
When testing the DataTable Row State demo on Liferay 6 with MyFaces, I was able to get it to fail with a duplicate ID exception. Other Data Table examples also show this behaviour but I haven't test them all. It can be done in a couple of different ways:
1) Reload a page with the Data Table Row State example
or
1) Setup two different portal pages with a least one of them container a Data Table Row State.
2) Visit Page A - the portal page with the Row State portlet. Iinteraction with the portlet doesn't appear necessary from what I've seen so far.
3) Visit Page B
4) Go back to Page A.
MyFaces: Ends up throwing a duplicate id exception
Environment: ICEfaces 3 ACE MyFaces Datatable bindings (was: ICEfaces 3 ACE Liferay portlet MyFaces)
Adjusting the Summary, Description, and Workaround to reflect the following findings.
This is not particular to portlets. The regular showcase will show the same problem provided some adjustments are made. You need to make one of the examples that use
It turns out the only problematic examples are the DataTable examples that utilize component bindings (binding=). These are dataTableFind, dataTableGrouping, and dataTableRowState. The problem doesn't manifest if these are done via sub-examples because a page reload takes you back to the main example which avoids the issue. If you make one of the problematic examples the main datatable example (simply copy the h:form contents into datatable.xhtml), redeploy, load and then reload, the duplicate Id problem manifests.
By removing the binding (or changing the scope of the bean that holds the reference to the bound component to RequestScoped), the problem goes away. So at this point, it is more of an app issue related to MyFaces.
Screen snapshot show double table rendering and log of duplicate id exception.