Commit f1bb44f0 by Tuomas Riihimäki

Add onerror for bill paid button

1 parent 913fae87
......@@ -11,10 +11,10 @@
<h:outputText rendered="#{billListView.bills.rowCount le 0}" value="#{i18n['bills.noBills']}" />
<h:form rendered="#{billListView.canWriteBill}">
<p:commandButton ajax="false" action="#{billListView.showPayButtonsAction()}" value="#{i18n['bill.showPayButtons']}" />
<h:form rendered="#{billListView.canWriteBill}">
<p:commandButton ajax="false" action="#{billListView.showPayButtonsAction()}" value="#{i18n['bill.showPayButtons']}" />
</h:form>
<h:form rendered="#{billListView.bills.rowCount gt 0}">
......@@ -83,9 +83,7 @@
</h:link>
</p:column>
<p:column rendered="#{billListView.canWriteBill}">
<h:commandButton rendered="#{bill.paidDate == null and billListView.showPayButtons}" action="#{billListView.markPaid()}" value="#{i18n['bill.markPaid']}">
<f:ajax render="@form" />
</h:commandButton>
<p:commandButton onerror="location.reload(true)" rendered="#{bill.paidDate == null and billListView.showPayButtons}" action="#{billListView.markPaid()}" value="#{i18n['bill.markPaid']}" />
<h:outputText rendered="#{bill.paidDate != null}" value="#{i18n['bill.isPaid']}" />
</p:column>
<p:column rendered="#{!billListView.canWriteBill}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!