Hi guys...
I have this problem of confirming in JSF. Here's my code:
<h:commandLink id="batchUpdateSpecial" action="{SpecialOrderBean.batchUpdateSelectedOrders}"
onmouseup="if (!confirm('Are you sure you want to update the selected record[s]?')) return false">
<h:outputText id="txtBatchUpdate" styleClass="outputText" value="Perform Batch Update"></h:outputText>
</h:commandLink>
But what happens is that if i click on OK or CANCEL, nothing happens. Isn't it supposed to be that if the return value is true it will go on to the "action" attribute?
Please help!
I have this problem of confirming in JSF. Here's my code:
<h:commandLink id="batchUpdateSpecial" action="{SpecialOrderBean.batchUpdateSelectedOrders}"
onmouseup="if (!confirm('Are you sure you want to update the selected record[s]?')) return false">
<h:outputText id="txtBatchUpdate" styleClass="outputText" value="Perform Batch Update"></h:outputText>
</h:commandLink>
But what happens is that if i click on OK or CANCEL, nothing happens. Isn't it supposed to be that if the return value is true it will go on to the "action" attribute?
Please help!