Hello,
I am using an ActioListener inside a a4j:support to reset some field values in my form and backing bean.
I found a working way of doing, I ask you: is that a right way of doing it?
Thank you
page:
....
<a4j:support event="onclick" ajaxSingle="true" action="#{affiliazione.datiAlboNazionaleChanged}" reRender="numeroIscrizioneAlbo,albo,dataIscrizioneAlbo"/>
...
backing bean:
public void datiAlboNazionaleChanged()
{
FacesContext ctx = FacesContext.getCurrentInstance();
UIInput cmp = (UIInput) ctx.getViewRoot().findComponent(getFormId() + ":numeroIscrizioneAlbo");
cmp.setSubmittedValue(null);
getModuloAffiliazione().getDatiAnagraficiFiscali().setNumeroIscrizioneAlbo(null);
cmp = (UIInput) ctx.getViewRoot().findComponent(getFormId() + ":albo");
cmp.setSubmittedValue(null);
getModuloAffiliazione().getDatiAnagraficiFiscali().setAlbo(null);
cmp = (UIInput) ctx.getViewRoot().findComponent(getFormId() + ":dataIscrizioneAlbo");
cmp.setSubmittedValue(null);
getModuloAffiliazione().getDatiAnagraficiFiscali().setDataIscrizioneAlbo(null);
}
sorry I have posted in the bad forum