Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions (1) accessing managed bean directly and (2) using jQuery ajax functionality in my JSF page

Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to get jQuery to work in my JSF page and have been working with David Newton and Gregg Bollinger in the HTML/Javascript forum.

1. David Newton had a question that I was not sure how to answer and it was suggested by Gregg to post here to see if I could get some help. Here is David's question:

Isn't there a way to have a managed bean "call through" to a service that could be exposed in a variety of ways? Or is just like any other facade/wrapper/etc. and it's just not designed to be used like that (accessed directly)?

2. Just for some background I have a very simple JSF page and what I'm trying to get jQuery to do is when I enter a value in a text field I and then tab to the next field I need to make an ajax call to a managed bean and have it return a value that I can use to select an option in a drop down field in the same form. I understand from someone on the jQuery form that I need to create yet another JSP page and call the managed bean from that JSP page and have it return a value there and then jQuery picks it up somehow(?). When I execute the jQuery code the alert in the code below only shows the rendered JSP form that I'm calling. I don't think I'm ever getting to my managed bean.

Here is my jQuery code:

The JSP that is being called within the jQuery code above is:

Any help or direction would be greatly appreciated. Regards.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic