This content has been marked as final.
Show 2 replies
-
1. Re: how to do a check before excute action?
timbooo Jun 15, 2009 5:41 AM (in response to stockinstore)"stockInStore" wrote:
I use the rich:extendedDataTable to display the resultList.
When clicked the <h:commandButton> or <a4j:commandButton> .
I want do a check,if the selected only one row data,then do action="/edit.xhtml",else display a rich:modalPanel.
<a4j:commandButton
action="/edit.xhtml"
javascript="if(#{tarUserList.selection.size()} != 1) #{rich:component('editPanel')}.show()"
/>
The problem is the action how to judge the check result?
hi,
you could bind the showWhenRendered attribute of the modalPanel to a bean. calling an actionListener from your button which sets the showWhenRendered of the modalPanel true, if s.th. is wrong and or otherwise to false and return a conditional string for your navigation rule.
tim -
2. Re: how to do a check before excute action?
stockinstore Jun 16, 2009 11:05 AM (in response to stockinstore)thx.