【发布时间】:2018-10-10 13:52:50
【问题描述】:
在基于 Seam 2.2、jsf 1.2 和 Richfaces 3.3 的旧版应用程序中,我遇到了 Internet Explorer 问题:
我有一个带有可点击行的数据表。单击一行将打开该项目的详细视图。 最后一列包含一个垃圾桶图标。单击该图标时,将出现一个确认对话框。如果未确认,则不会发生其他任何事情。这在 Google Chrome 上运行良好。
它不适用于 Internet Explorer(在版本 11 上测试)。在这里,执行默认操作action="#{myAction.select(k)}"。
我尝试将event.preventDefault(); 添加到event.stopPropagation();,但这没有帮助。
我怎样才能让它在 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>
【问题讨论】:
标签: java internet-explorer richfaces seam ajax4jsf