I have a modal panel that has a form inside. On clicking a button on the modal panel form, I need to display a message on the main panel (that invoked the modal). How do I do it. I have the following the form processing code.
if the main page (that invoked the modal) has rich:messages id="abc" and in the button processing code I call
FacesMessages.instance().addToControl("abc",
"Saved to DB");
will that work?
Any help is appreciated.
<a:form id="modalFooContent">
<rich:messages id="modalFooMessages" />
<rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
cellpadding="0" cellspacing="0"
border="0" var="fooList" value="#{foo.allFoo}">
<rich:column>
..........
</rich:column>
</rich:dataTable>
</a:form>