Recuperation une valeur d'un UIInput créer apartir d'une backing bean
bonjour à tous,
je veux créer de composants graphique dans une page jsf à partir d'une classe bean ,par exemple une zone de saisie d'un texte (de type uiinput) mai j'ai pas réussi à récupérer la valeur saisie.
voici une portion de code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
public UIComponent getGridPanel() {
gridPanel = (UIComponent) FacesContext.getCurrentInstance().getViewRoot().findComponent("form1:gridPanel1");
//gridPanel.g
UIOutput tf2 = new UIOutput();
tf2.setValue("Nom");
UIInput tf1 = new UIInput();
boutton = new UICommand();
boutton.setValue("Executer");
tf1.setId("nom");
FacesContext.getCurrentInstance().getViewRoot().getChildren().add(tf2);
FacesContext.getCurrentInstance().getViewRoot().getChildren().add(tf1);
FacesContext.getCurrentInstance().getViewRoot().getChildren().add(boutton);
return gridPanel; |
je veux récupérer la valeur saisie par l'utilisateur dans le tf1(type UIInput) lors du clic sur le bouton executer.
je vous remercie d'avance.