Hello,
I have a project where I use method overloading with the following two methods:
public String showDocument(AlfrescoDocument alfrescoDocument, boolean uploaded, boolean newDocument) {
and
public String showDocument(SigiDocument document, boolean uploaded, boolean newDocument) {
this is called using a commandlink within a table:
<rich:extendedDataTable headerClass="tabletHeader" value="#{documentListFormBean.getListOfDocuments()}" var="document" filterVar="filter" rows="20" columnClasses="topAligned">
...
<rich:column width="30px">
<a4j:commandLink styleClass="imageLink" action="#{documentFormBean.showDocument(document, false, false)}">
<rich:tooltip value="Show" />
<h:graphicImage url="resources/images/edit.png" styleClass="imageLink" />
</a4j:commandLink>
</rich:column>
...
</rich:extendedDataTable>
where getListOfDocuments() gives back an array of "SigiDocuments".
Normally this works flawless but sometimes it returns me the following error:
10:28:50,513 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (default task-7) #{documentFormBean.showDocument(document, false, false)}:
java.lang.IllegalArgumentException: Cannot convert lu.etat.pch.docroom.ejb.utils.SigiDocument@1f08afab of type class lu.etat.pch.docroom.ejb.utils.Si
giDocument to interface org.alfresco.cmis.client.AlfrescoDocument: javax.faces.FacesException: #{documentFormBean.showDocument(document, false, false)
}: java.lang.IllegalArgumentException: Cannot convert lu.etat.pch.docroom.ejb.utils.SigiDocument@1f08afab of type class lu.etat.pch.docroom.ejb.utils.
SigiDocument to interface org.alfresco.cmis.client.AlfrescoDocument
It seems like method overloading is not working in this case...
Has anyone an idea why this isn't always working anymore?
Tanks in advance