Hello,

I have a page .Xhtml, which contains a list of choices (Oracle, Teradata), I want :

1 - If the user chooses Oracle will display the fields (host, port, user, password, basename) will fill it, and calls the method connect in class ManagedBeanO.

2 - If the user selects Teradata, there will be just the fields (host, user, password) to complete, and calls the method connect in class ManagedBeanT to connect.

Choix.xhtml
Java Code:
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:ui="http://java.sun.com/jsf/facelets"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core">   
    
<ui:composition template="/WEB-INF/templates/BasicTemplate.xhtml">   
    <ui:define name="content">   
        <h:form>   
    
            <h:selectOneMenu id="ChoixBD" value="">   
              <f:selectItem id="item1" itemLabel="Oracle" itemValue="1" />   
              <f:selectItem id="item2" itemLabel="TeraData" itemValue="2" />   
              </h:selectOneMenu>   
    
            <h:panelGrid columns="2">   
                <h:outputText value="Host"></h:outputText>   
                <h:inputText value="#{ManagedBeanT.host}"></h:inputText>   
                <h:outputText value="Port"></h:outputText>   
                <h:inputText value="#{ManagedBeanT.port}"></h:inputText>   
                <h:outputText value="User"></h:outputText>   
                <h:inputText value="#{ManagedBeanT.user}"></h:inputText>   
                <h:outputText value="Password"></h:outputText>   
                <h:inputSecret value="#{ManagedBeanT.mdp}"></h:inputSecret>   
                <h:outputText value="Base Name"></h:outputText>   
                <h:inputText value="#{ManagedBeanT.baseName}"></h:inputText>   
    
            </h:panelGrid>   
    
    
            <h:commandButton value="Connect" action="Connect"></h:commandButton>   
        </h:form>   
    </ui:define>