the hack i found to work was to set the focus to somewhere in the panel after the a4j:commandLink link was clicked.
<a4j:commandLinkCDD_quatityInput is the id of an element in the panel i am showing when the link is clicked.
value="#{detail.action}"
id="editlink"
ajaxSingle="true"
action="#{myBean.myAction}"
reRender="detailsPanel"
rendered="#{detail.actionEdit and myBean.isBuyer}"
oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('detailsPanel')}.show();#{rich:element('CDD_quatityInput')}.focus();">
<f:setPropertyActionListener
value="#{detail}"
target="#{myBean.currentDtlItem}" />
<f:setPropertyActionListener
value="#{row}"
target="#{myBean.currentRow}" />
</a4j:commandLink>
i saw an example today where the author also put "event.stopPropagation(); event.preventDefault();" into the handler attribute, but i havent seen the need for it yet.
No comments:
Post a Comment