简体   繁体   中英

JSF a4j:support Rerender on UI doesn't work

I am working on JSF a4j componenet.

<h:selectOneMenu id="sampleSelect" value="#{myBackingBean.id}"
    immediate="true">
    <f:selectItems value="#{myBackingBean.generateSampleList}"/>
    <h:outputLabel value="Sample List : " for="sampleSelect"></h:outputLabel>
    <a4j:support ajaxSingle="true" 
                 event="onchange" 
                 reRender="dataTable1, dataTable2, dataTable3"
                 oncomplete="setColorbox();" 
                 action = "#{myBackingBean.setSampleListForDatatables}">
    </a4j:support>  
    </h:selectOneMenu>  

And my datatable as

<h:panelGroup id="dataTable1">
    <h:dataTable value="#{myBackingBean.anotherBean.sampleList}" 
                 var="sampleList"
                 styleClass="table">
        <h:column>
            ....
        </h:column>
    </h:dataTable>
    </h:panelGroup>

I have multiple datatables like same which are changed on this ajax call and should be reRendered on complete of ajax call.

At server side data is changed perfectly but not modified on UI.

For checking purpose What I did is.... Used,

<h:column>
    <%=new java.util.Date()%>
</h:column>

in datatables that is not modified after my ajax call.

Can any one suggest any thing to me?

From some post I come to know I have to use immediate="true" that I already done. But no luck.

I got my answer

<h:dataTable value="#{myBackingBean.anotherBean.sampleList}" 
             var="sampleList"
             styleClass="table" 
             id="dataTable1">
    <h:column>
        ....
    </h:column>
</h:dataTable>

I removed h:panelGroup and put that id to h:datatable and that works. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM