Question

I'm new to JSF and want to make modifications in existing code. While the code is working fine, I have a problem with an A4J (Rich faces) onchange event.

My tech stack related here is JSF1.2, RichFaces 3.3

The code snippet is as below:

<h:selectOneMenu required="#{order.required}"
                 id="modelCBFS" label="Model" value="#{order.modelDTO}" converter="ModelConverter">
    <f:selectItem itemLabel="-Select-" itemValue =""/>
    <f:selectItems value="#{order.modelDropDown}" />
    <a:support ajaxSingle="false" limitToList="true"
               reRender="elevationCBFS"
               event="onchange"
               action="#{order.modelChanged}"
               onsubmit="onHourGlass()" oncomplete="offHourGlass()"/>
</h:selectOneMenu>

Now, when the above code is rendered on page, the ajax event is being fired, but the JSF page does not go thru 4th and 5th phases (Update Values and Invoke Application phases) ONLY for the first onchange event! It works correctly for the subsequent requests though. Also, the onchange a4j events for every other component works fine.

When I researched on net, the solution to debug the issue was to use FacesContext and use the debug messages from it. But this is not configured in the current app.

Can someone help me with a solution for debugging the issue? or any possible root causes is appreciated.

Was it helpful?

Solution

I found out the problem! I was enabling and disabling fields based on a master method where in the rule was conflicting in the child for a particular field..

Nevertheless it is absurd on the way I approached this problem by trial and error method...

If anyone have any thoughts on what could have happened technically, please shed some light!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top