0

I have an issue with missing ajax fired events. I have tried as much as I can to resolve this with searches, reading and experimentation.

Can someone assist in providing guidance?

Here is the form part:

<h:form>   
...
    <h:outputLabel>Chart Category:</h:outputLabel> 
    <h:selectOneMenu  id="chartcategory" value="#{chartBean.category}" >
        <f:ajax event="change"  listener="#{chartBean.categoryChangedAJAX}"/>
        <f:selectItems value="#{chartBean.categories}"/>
    </h:selectOneMenu>
    <h:outputLabel>Chart Type:</h:outputLabel>
    <h:selectOneMenu  value="#{chartBean.type}">
        <f:selectItems id="charttypes" value="#{chartBean.types}"/>
    </h:selectOneMenu>
...
</h:form>

Here is the code:

public void categoryChangedAJAX(final AjaxBehaviorEvent ajaxBehaviorEvent) {
            System.out.println(" -------------------------------------- categoryChanged entered");
            setTypes(chartCategoryAndTypes.getChartTypesForCategory( getCategory() ));
            System.out.println("for Category: "+  getCategory() );
            Arrays.stream(getTypes()).forEach(System.out::println);
            setColumnVisibilities();
}
  • Guidance: read [ask]... The and see the part about 'documenting' what you searched and tried – Kukeltje Jul 21 '17 at 09:35
  • Have you checked if the browsers issues an Ajax request that hits the server or does the change event even not trigger that request? – siom Jul 21 '17 at 13:09
  • The event does not trigger at all .. I have print to trap it on the serve-side, infortunately, no cigar yet. – George Proost Jul 21 '17 at 16:17
  • The question was to see if the client sends anything. Check all this: http://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value/2120183#2120183 – Kukeltje Jul 21 '17 at 21:20

0 Answers0