I seem to be a little confused about the ordering for a JSF Backing Bean. I know that I have the getters and the setters for the different methods that correspond to the different components on the page. Now the confusing part, if I am trying to incorporate ajax into the mix .. how or where do I add the code to perform the server-side processing for this Backing Bean. As an example, suppose I have a page connected to a backing bean. And lets suppose that I would like ajax to validate as the user typed information into the textbox component. As the request is sent to the "action" for this page .. I would imagine the logic for determining if an error occured and sending the appropriate message back to the user would have to go somewhere in the backing bean so it could get called. I know usually this logic would go into an event that is connected to a button or other component on the page, but this seems to be a little bit different for ajax based apps. Should this all occur in the constructor for the backing bean or is there another place this code should go? Any examples or code snippets would be greatly appreciated as I am thoroughly confused on this one.
James Clinton
Ranch Hand
Joined: Jun 23, 2003
Posts: 190
posted
0
I know nothing about this...but Apache has a Ajax Input Suggest box...source is as always open to all...you might want to check out their implementation..
rajani varma
Ranch Hand
Joined: Dec 21, 2006
Posts: 30
posted
0
We are using Ajax components in our jsf pages. For Eg:
In the above example, we used the a4j:support component, to reRender only some particular fields in the page(to avoid submitting the whole page) and the action method, "changeUsage()" is defined in the backing bean.
Hope this is what you are looking for
Thanks Rajani
rajani varma
Ranch Hand
Joined: Dec 21, 2006
Posts: 30
posted
0
Or you can check this link for Ajax for JSF developer guide