Try to use an ajax form <a4j:form> instead of the standard jsf-form. Not sure but that might just do the trick.
Thanks for the response, but using <a4j:form> doesn't behave any differently. Looks like I am going to have to debug with the source code... bummer, but i guess that will definitely help me learn Ajax4JSF
Actually, I think that this can be a bug in the components. Try to search the forum for similar cases.
As I recall it, it can have something to do with your combination of ajax and jsf versions..
Check to make sure that you are using a supported JSF runtime. I had this exact problem using IBM's runtime, and the problem disappeared when I switched to MyFaces.
I am using Sun JSF 1.1 which is supported by Ajax4jsf. I plan on looking further into this soon, but currently have at least a temporary work around.
While debugging this issue in the Ajax4jsf code, I saw that Ajax4jsf was using a different id and component instance (HTMLForm) during the same request for what should be the same form. I haven't looked at this for a number of days so I don't remember the details... I will look more carefully at this when I have the time and can provide a better description of exactly what is happening.
Anyway, my current workaround is to specify an id on each of the jsf components in my page (on the h:form and on the h:input) rather than allowing jsf to pick the ids; this makes things work consistently.
<< my current workaround is to specify an id on each of the jsf components in my page >>
That seems like an easy enough fix...
You're right about JSF RI 1.1 being supported, but I think A4J has some lifecycle problems with it. I found that both the jsf-ibm.jar (IBM's RI 1.1-based implementation) and the vanilla RI 1.1 in Java 1.4 exhibited the same weird behavior you're seeing. So, I went to MyFaces core 1.1.5--NOT an RI distribution with extensions, but an entirely different JSR 127 AND JSR 252 (JSF 1.2) supporting framework.
I would bet that by default WebLogic's JSF runtime uses an RI 1.1 distribution with BEA proprietary extensions, like what IBM does.
Maybe this is too broad a solution for you, but you could probably try using RI 1.2 or another framework that implements the JSF 1.2 spec. I chose MyFaces 1.1.5 because it was built primarily for Java 1.4, not Java 5 like most of the other JSF 1.2 implementations.
In my case the behavior I saw was an <a4j:support> tag on an <h:selectOneMenu> that would fire ajax requests correctly every time, but only after the second AJAX request (from the third request on) would I get the correct AJAX responses from the faces lifecycle. Seems to be the same problem you're having...
Thanks for your thoughts. Yesterday, I went ahead and changed from using the Sun implementation to use MyFaces 1.1.5. As soon as I do that, my problems disappear; I no longer need an id specified on my components and a couple other oddities I was noticing (but didn't mention on the foum) disappeared as well.
We have been thinking of moving over to a MyFaces implementation anyway so this encourages it further.