Duplicate Id exception for a a4j:commandLink
antoine_h May 22, 2008 3:03 AMHi,
I have noticed a problem with the commandLink.
I solved it, but would like to help debug this ... or to set some documentation to avoid the problem later...
may be create a Jira later ?
is it a Bridge problem, or a RichFaces problem ?
the problem is similar to the one in this Jira :
http://jira.jboss.com/jira/browse/RF-1964
I use a commandLink in a table.
In a regular JSF RichFaces file.
The commandLink call a view that is in a kind of "template file". A file that include another "sub file" for the detail of the content.
The table is in the "sub file", that is included (<ui:include ...) in the "template file".
when I click on the commandLink : it is not working : the page comes again, but with no change.
If I try then to refresh the page : sometimes it goes to the result page, most of the times it throws an exception of Duplicate Id, etc...
In the code, the id is defined, and not duplicated.
this problem is on several forum post. It is not really a problem of the Id written in the code.
************
I had solved the problem, by struggling with the config, the way to write the code ... well it was working. no more error.
I worked on many other thing, ... the commandLink worked fine.
Once, I changed many things in my code, ... I don't remember all that I changed, nor where... but the exception was thrown again !
*************
solution :
struggling again... I solved it finally, with just replacing the commandLink with a commandButton :
It was :
<a4j:commandLink action="#{dataRefMngtBKBMain.viewStandardDtRefTable}"> <h:outputText value="View the records" /> <f:param name="actNav" value="viewStd_DTRefTable" /> <f:param name="currentEntityClass" value="#{varItem_main.name}" /> </a4j:commandLink>
it is now :
<a4j:commandButton value="View the records" action="#{dataRefMngtBKBMain.viewStandardDtRefTable}"> <f:param name="actNav" value="viewStd_DTRefTable" /> <f:param name="currentEntityClass" value="#{varItem_main.name}" /> </a4j:commandButton>
**********
It now works perfectly again.
I noticed also that the response is executed much faster.
I had some delay in the response : now, it is instant response of the server...
*********
so :
I don't know if it worth open a jira on that.
where to open it ?
or is there an explaination why the "quite same code" of a commandLink does not work, and with a commandButton it works ?
Thanks,