Accessing a bean through Ajax
Hi,
We are building an application using JSF and Ajax.
In the JSP page contaiing the Ajax code, the user can choose a menu and according to that menu we need to make a database call and show the data.
Currently this is the flow that we are looking at
JSF Page A(Has Ajaxcode) -> calls JSF Page B-> which calls a Bean (Bean C) to get data from database-> returns data to JSF page B.
I am able to get the data from the database as follows:
JSF Page B->Bean C-> returns data to JSF Page B
No problem there.
What i would like to know is, Is there a way that I can invoke the Bean (Bean C) to get get the data directly through a call from the Ajax code?
By using the FacesContext or something like that?
So that i don't need to have an intermediate JSF Page. That way I can do away with Page B and call the bean directly from Page A, like:
Page A-> call to bean-> get data from bean in Page A through Ajax
Any help is greatly appreciated.
PS: I haven't built any of the Ajax code - I have built the JSF Page B and the Bean C.
Thanks.

