January 21, 2021
Hot Topics:

Implementing AJAX Components in the JWL Framework

  • By Aleksey Shevchenko
  • Send Email »
  • More Articles »
  1. Open ajaxExternalRequestExample.jsp in Source mode.
  2. In Pane "Palette", click "Enhanced Faces Components" (make sure you are in a Web perspective).
  3. Figure 18: View of the "Palette" Pane

  4. Drag and drop the Panel Group component from the palette to the page.
  5. Drag and drop the Text Output component from the palette to the panel that you added in Step 5. Set the value of the component to "External Page will be loaded here."
  6. Select the Panel Group and click Properties → AJAX. Click on "Allow Ajax Updates" and set Ajax request to "External".

  7. Click here for a larger image.

    Figure 19: View of AJAX Properties

  8. Click the <hx:ajaxExternalRequest> tag that was added in Step 7 and click Properties. Type "externalPage.faces" in the URL field.

  9. Click here for a larger image.

    Figure 20: AjaxExternalRequest Properties

  10. Run this page on the server (make sure you are running under Websphere 6.1 or higher).
  11. Test your code.
  12. Figure 21: AjaxExternalRequest Example Output

Listing 8 is the full source code of what you have just gone through. You can find full source code as an attachment at the end of this article.

Listing 8: AjaxExternalRequest Full Source Code

   <hx:scriptCollector id="scriptCollector1">
      <h:form id="form1" styleClass="form">

      <hx:commandExButton type="submit"
         <hx:behavior event="onclick"
      <h:panelGroup id="group1" styleClass="panelGroup">
         <h:outputText id="text2"
                       value="External Page will be loaded here!">
         <hx:ajaxExternalRequest id="ajaxExternalRequest1"

Download Source Code Here



IBM: http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/ com.ibm.etools.jsf.doc/topics/rjsfcompAjax.html

About the Author

Aleksey Shevchenko has been working with object-oriented languages for eight years. For the past four years, he has served as a technical lead and a project manager. Aleksey has been implementing Enterprise IT solutions for Wall Street and the manufacturing and publishing industries.

Page 6 of 6

This article was originally published on April 17, 2008

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