bonjour,
dans mon projet jsf, j'ai une page qui contient:

1 combobox qui contient 2 valeurs (lues a partir d'une classe Managed Bean)
1 bouton.
j'ai aussi 2 modal panel que je dois afficher suivant la selection sur le combobox.
Mon probleme est le suivant:
je n'arrive pas a afficher le modal panel adéquat (En faite rien ne se passe lorsque je clique sur le bouton).
Mon code est le suivant
<h:outputLabel value="Selectionnez le type de crédit:" />

<h:selectOneMenu id="types" value="#{typesBean.typecourant}" valueChangeListener="#{typesBean.typesChanged}">

<f:selectItems value="#{typesBean.types}" />

<a4j:support event="onchange" />

</h:selectOneMenu>
<a4j:commandButton value = "Ajouter" process="@this" oncomplete="#{typesBean.modalcourant}.show()" >

</a4j:commandButton>



<rich:modalPanel id="logedit" domElementAttachment="parent"
width="400" height="180"
binding="#{typesBean.modlog }">
.....
</rich:modalPanel>
<rich:modalPanel id="voitedit" domElementAttachment="parent"
width="400" height="180" binding="#{typesBean.voitlog }">
<h:panelGrid columns="2" id="editGridv">
</rich:modalPanel>
et le Managed Bean:
public class TypesBean {
private String typecourant="";
public List<SelectItem> types = new ArrayList<SelectItem>();

private UIComponent modalcourant;
private UIComponent modlog;
private UIComponent voitlog;

String current;

public TypesBean() {
SelectItem item = new SelectItem("log", "logement");

types.add(item);

item = new SelectItem("voiture", "Voiture");

types.add(item);
}
public void typesChanged(ValueChangeEvent event){

if (((String)event.getNewValue()).equals("log")) {
modalcourant = modlog;
modalcourant.setId(modlog.getId());
System.out.println(modalcourant);

}else if(((String)event.getNewValue()).equals("voiture")){
current = voitlog.getId();

modalcourant = voitlog;
modalcourant.setId(voitlog.getId());
System.out.println(modalcourant);}



}

public String getTypecourant() {
return typecourant;
}
public void setTypecourant(String typecourant) {
this.typecourant = typecourant;
}
public List<SelectItem> getTypes() {
return types;
}
public void setTypes(List<SelectItem> types) {
this.types = types;
}
public UIComponent getModlog() {
return modlog;
}
public void setModlog(UIComponent modlog) {
this.modlog = modlog;
}
public UIComponent getVoitlog() {
return voitlog;
}
public void setVoitlog(UIComponent voitlog) {
this.voitlog = voitlog;
}
public String getCurrent() {
return current;
}
public void setCurrent(String current) {
this.current = current;
}
public UIComponent getModalcourant() {
return modalcourant;
}
public void setModalcourant(UIComponent modalcourant) {
this.modalcourant = modalcourant;
}
}
le modal courant sert a connaitre le modal panel que je dois afficher.
Aidez moi svp a trouver le moyen de faire ça.
Merci.