Using jQuery with Seam

If you are using RichFaces with your Seam application then jQuery is already there and ready to use. The only thing to remember is to use jQuery() function to refer to jQuery rather than using $(). $() is used to refer to prototype.js functions which RichFaces uses heavily.

Below is an example you can use to test jQuery. This should pop up a box on your page.

1
2
3
4
5
<script type="text/javascript" >
  jQuery(document).ready(function() {
      alert("hello seam: " + jQuery(window).height());
  });
</script >

For more information on jQuery and RichFaces check out the RichFaces Live Demo page.



Comments

No comments yet.

Add Yours

  • Author Avatar

    YOU


Comment Arrow



About Author

Brian

Brian Abston is an IT Manager in Oklahoma that also still gets his hands dirty and writes Seam code. He also dabbles in Ruby and Rails. He loves to code and hates to manage. Jack of all trades and master of some.