You can use a4j within RichFaces to return a JSON structure through an assync method calling.
Regarding a4j you can use the a4:jsFunction like follows:
action: the method to call assync
data: a getter method defined at myBean (which returns the List parsed with JSONObject or JSONArray)
I hope you can use Richfaces on your project, or newer JSF versions.
Another way to use AJAX: take a look at DWR
Everybody's invited. Except this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss