Problem with ajax enabled h:selectOneMenu
visumagic Dec 13, 2008 2:31 AMHi ALL,
I'm trying to implement 4 linked comboboxes.
Example: http://www.partsallover.com.au/home
My code is :
registration.components.xml :
 <framework:restrictions>
           <value>college.university.id = #{ClassroomSearch.university.id}</value>
       </framework:restrictions>
    
   </framework:entity-query>
    <factory name="collegeListUnderUniversityList" value="#{collegeListUnderUniversityQuery.resultList}"  />
    And the jsf is ... 
<s:decorate template="../../layout/edit.xhtml">
                <ui:define name="label">University</ui:define>
                        <h:selectOneMenu  id="col1" value="#{ClassroomSearch.university}">
                         <s:selectItems 
                                 value="#{universityList.resultList}"  
                                 var="h" label="#{h.community.name}" 
                                 noSelectionLabel="None"
                                 />
                                 <s:convertEntity />
                                 
                                 <a4j:support event="onchange"  
                                 action="#{ClassroomSearch.classroomSearch}" 
                                reRender="collegeBox"  bypassUpdates="false" ajaxSingle="true"/>
                                
                                </h:selectOneMenu>
                
            </s:decorate>
      <s:decorate  template="../../layout/edit.xhtml">
        <a4j:outputPanel id="collegeBox" >
          
                <ui:define name="label">College</ui:define>
                        <h:selectOneMenu  id="col2" value="#{ClassroomSearch.college}" 
                        >
                         <s:convertEntity />
                        
                         <s:selectItems 
                                 value="#{collegeListUnderUniversityList}"  
                                 var="h" label="#{h.community.name}" 
                                 noSelectionLabel="None"
                                 />
                                  
                                 
                                 <a4j:support event="onchange" 
                                 action="#{ClassroomSearch.classroomSearch2}" 
                                 reRender="CourseBranch"/>
                                </h:selectOneMenu>
          
                  </a4j:outputPanel>
                        </s:decorate>here I'm getting 
07:00:37,562 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=user:atestForm:j_id151:col2[severity=(ERROR 2), summary=(value is not valid), detail=(value is not valid)]
In the query restrictions  ,if i replace ClassroomSearch.university.id
 to 1 (hard code a sample value) .. it's able to work fine.
But the dynamic population of query restrictions is not working. 
I have gone through several forums like this ,but of no use.. 
I tried my best to find the clue :(
plz help me ..
thanks
raghu
 
     
     
     
    