This content has been marked as final.
Show 1 reply
-
1. Re: what link component to use to display modalPanel from dataTable in form?
niox.nikospara.yahoo.com Jul 14, 2009 12:05 PM (in response to asookazian)The way I have done this is with a simple HTML anchor element:
<rich:dataTable ...> ... <h:column> <a href="#" onclick=" delItem('#{item.name}',#{item.id}); #{rich:component('deleteDialog')}.show(); return false "> </h:column> ... </rich:dataTable>
(The delItem() JS function is irrelevant; it is used to customize the modalPanel, without roundtrips to the server.)
The modalPanel itself is declared as follows, in the same NamingContainer as the previous script:
<rich:modalPanel id="deleteConfDialog"> ... </rich:modalPanel>
I believe using Richfaces.showModalPanel('fooModalPanel') in the <a onclick="..."> would have the same effect, as long as fooModalPanel is the client id of the modalPanel.