Chapter 8. JSF, Images, CSS, and JS

In this chapter, we will cover:

  • Injecting CSS in JSF
  • JSF, CSS, and tables
  • JSF and dynamic CSS
  • Integrating JavaScript and JSF
  • Getting a JSF inputText value from JavaScript
  • Working with JSF hidden fields from JavaScript
  • Passing parameters from JS to JSF (client to server)
  • Passing parameters from JSF to JS (server to client)
  • Opening a pop-up window using JSF and JS
  • Passing parameters with HTTP GET within the URL
  • Communicating between parent pop-up windows
  • Populating a JS load function with JSF values
  • Dynamic images with PrimeFaces
  • Cropping images with PrimeFaces
  • Working with rss4jsf project
  • Using resource handlers

Introduction

These days every website contains images, CSS, and/or JavaScript code. Apparently, there is no relation between them, but when put together in the same website, they provide great design oppurtuinities, amazing effects, powerful navigability between pages, and so on (notice that I didn't even mention AJAX!). If we top this cocktail with JSF, then we have the perfect combination for creating a big impression on our users.

In this chapter, we will see a set of recipes that will periodically discuss integrating images with JSF, CSS with JSF and, obviously, JS with JSF.

Starting from the presented recipes, you can then extrapolate them to obtain more complex solutions for your own websites. We have tried to put on the line the main aspects of integrating JSF with images, CSS, and JS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset