Results 1 to 1 of 1
- 01-02-2012, 12:20 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 1
- Rep Power
- 0
Run the MethodeBean & display the fields that corresponds to selectMenu
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>
Similar Threads
-
trying to display month corresponds with temperature in Array type program
By leoshiner in forum New To JavaReplies: 6Last Post: 05-01-2011, 10:42 PM -
Display only certain contents of text file and edit display
By blkshrk81 in forum New To JavaReplies: 1Last Post: 12-01-2010, 06:35 PM -
What is the different between Text format display on web browser and display on midle
By Basit781 in forum CLDC and MIDPReplies: 1Last Post: 05-31-2010, 08:46 AM -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL
By habibiwalla in forum JDBCReplies: 2Last Post: 08-31-2009, 02:50 PM -
How to display a list of items and on click display subitems?
By mandyj in forum New To JavaReplies: 8Last Post: 12-29-2008, 07:12 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks