dcsimg
July 18, 2018
Hot Topics:

Implementing AJAX Components in the JWL Framework

  • April 17, 2008
  • By Aleksey Shevchenko
  • Send Email »
  • More Articles »
  1. Create a new Java class ThreeStringsConcatenatorBean.java with three variables: text1, text2, text3.


  2. Click here for a larger image.

    Figure 11: Create New Java Class—ThreeStringsConcatenatorBean.java

  3. In ThreeStringsConcatenatorBean.java, generate getter and setter methods for the variables. Add a new getConcatenateThreeFields() method that will concatenate text1, text2, and text3 and return the result.
  4. Listing 6: Implementation Of getConcatenateThreeFields() Method

    public String getConcatenateThreeFields() {
    
       return text1 + text2 + text3;
    
    }
    
  5. Select ajaxRefreshSubmitExample.jsp. Under the Page Data view, select Faces Managed Beans → New → Faces Managed Bean.
  6. Figure 12: Create a New Faces Managed Bean

  7. Register the ThreeStringsConcatenatorBean JavaBean in faces-config.xml.


  8. Click here for a larger image.

    Figure 13: Register a New Faces Managed Bean

  9. Map fields in the JavaBean with fields in the JSP page by dragging fields from the bean onto the page.


  10. Click here for a larger image.

    Figure 14: Map Bean Fields to Input Field on the Page





Page 4 of 6



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date