wood burning stoves 2.0*
The moose likes JSF and the fly likes Questions (1) accessing managed bean directly and (2) using jQuery ajax functionality in my JSF page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Questions (1) accessing managed bean directly and (2) using jQuery ajax functionality in my JSF page" Watch "Questions (1) accessing managed bean directly and (2) using jQuery ajax functionality in my JSF page" New topic
Author

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

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Questions (1) accessing managed bean directly and (2) using jQuery ajax functionality in my JSF page