January 19, 2020
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

Enterprise Development Update

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

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