Thursday, February 15, 2018

ADF - Code Snippets

Extract the value from the text input component

Write the below method in the managed bean.

    public Object cb1_action() {
        // Add event code here...
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
            UIViewRoot root = facesContext.getViewRoot();
            RichInputText inputText = (RichInputText)root.findComponent("it1");
            String val = (String)inputText.getValue();
            System.out.println("Entered Value -->"+ val);
        return null;

    }

No comments: