I have a criteria box at the top of my screen which holds various inputs such as text box, combo boxes, etc. The components I need to create for this screen are given to me by a webservice. In the response it tells me which components to add to the criteria box panel. This panel is defined in my
jsp.
What I currently do is make a call to my web service in the constructor of my backing bean, then find the criteria box panel by id using findComponent, and then create and add the components. I use findComponent because if I try to bind the panel in the jsp to the backing bean, the reference is always NULL in the constructor. The backing bean is in request scope.
I have this logic in the constructor because these controls need to be in the panel before the page loads. Is there a more clean way of doing this? Anywhere else I can make the call to my web service and add the controls dynamically? I tried adding a phase listener but beforePhase() didn't get called on the first request, I guess because the listener was added, and then was called twice on subsequent requests.
[ February 25, 2007: Message edited by: joe black ]