Frage

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.

War es hilfreich?

Lösung 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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top