I try to re-code my previous 2.0.2 code
Code: Select all
<p:commandButton value="#{resources.global_cancel}" tabIndex="999"
immediate="true" action="#{sellAdnimalBean.cancelSellAdnimal}" ajax="false">
<p:confirmDialog message="#{resources_member.member_sell_confirmCancelSellAdnimal}"
fixedCenter="true" severity="warn"
yesLabel="#{resources.global_yes}"
noLabel="#{resources.global_no}" modal="true" close="false" />
</p:commandButton>
to this
Code: Select all
<p:commandButton value="#{resources.global_cancel}" tabIndex="999"
immediate="true" onclick="confirmation.show()" />
<p:confirmDialog widgetVar="confirmation" message="#{resources_member.member_sell_confirmCancelSellAdnimal}"
fixedCenter="true" severity="alert" modal="true">
<p:commandButton value="#{resources.global_yes}" ajax="false"
oncomplete="confirmation.hide()" immediate="true"
action="#{sellAdnimalBean.cancelSellAdnimal}" />
<p:commandButton value="#{resources.global_no}"
onclick="confirmation.hide()" />
</p:confirmDialog>
while the backing bean action:
Code: Select all
public String cancelSellAdnimal() {
......
return "/pages/member/sell_index.jsf";
}
but it doesn't work. On 1st code (2.0.2), when I click "Yes" button, it will call the code and redirect page to sell_index.jsf, while on 2.1RC1 code, it didn't do anything
Any idea? thank you