In a legacy application based on Seam 2.2, jsf 1.2, and Richfaces 3.3, I am having a problem with Internet Explorer:
I have a datatable with clickable rows. Clicking on a row will open the detailed view of the item. The last column contains a trashbin icon. When clicking the icon a confirmation dialog appears. When not confirmed, nothing else should happen. This works fine on Google Chrome.
It doesn't work with Internet Explorer (testing on Version 11). Here, the default action action="#{myAction.select(k)}"
is executed.
I tried adding event.preventDefault();
to the event.stopPropagation();
but that did not help.
How can I get this to work on Internet Explorer?
<rich:dataTable id="myDatatable" value="#{list.model}" var="k"
headerClass="tableheader"
onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
rowClasses="clickableRow">
<a4j:support event="onRowClick" id="onRowClickEvent"
action="#{myAction.select(k)}"
reRender="myDatatable"/>
<rich:column>
<f:facet name="header">
<a4j:commandLink action="#{list.changeOrder('k.name')}"
value="Name #{list.orderColumn == 'k.name' ? (list.orderAscending ? '▲' : '▼') : ''}"
reRender="myDatatable" ajaxSingle="true" limitToList="true"/>
</f:facet>
<h:outputText value="#{k.name}"/>
</rich:column>
<rich:column style="text-align: center;">
<f:facet name="header">
<a4j:outputPanel layout="block">
<h:outputText value="Delete"/>
</a4j:outputPanel>
</f:facet>
<a4j:outputPanel onclick="event.preventDefault();event.stopPropagation();">
<s:graphicImage value="/img/bin_closed.gif" style="cursor: pointer;">
<a4j:support event="onclick"
action="#{myAction.delete(k)}"
ajaxSingle="true" limitToList="true"
onsubmit="if(!confirm('Are you sure?')) { return false; }" />
</s:graphicImage>
</a4j:outputPanel>
</rich:column>
</rich:dataTable>