문제

I am using JSF 1.2 and Richfaces 3.3.3 , I've tried

<a4j:region>
 <t:selectOneMenu id="comp1" value="#{bB.selectedTeam}" style="width: 200px">
    <t:selectItems value="#{bB.teams}" var="team" itemLabel="#{team.desc}" itemValue="#{team.code}"/>
        <a4j:support event="onchange" reRender="comp2"/>
  </t:selectOneMenu>

but didn't work. comp1 is a Dojo combobox component and it doesn't do anything when onchange event happens.

도움이 되었습니까?

해결책 2

it turned out the html object rendered by <t:selectItems> was transformed to a dijit component when page loads, that conversion to dojo in javascript side does that the user won't interact with the object we indicated to do ajax call in the event onchange through

<a4j:support event="onchange" reRender="comp2"/>

so the solution was to use in order to attach the event to the dojo component in javascript browser side.

다른 팁

JSF doesn't keep track of plain HTML. If you want to be able to rerender something it has to be wrapped in a component, like <a4j:outputPanel> and then you have to rerender that component.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top