开发者

reRendering is not happening in jsf using data table

开发者 https://www.devze.com 2022-12-29 10:53 出处:网络
Rerendering is not working in my code: <rich:simpleTogglePanel id=\"bookIncomeHeader1\" value=\"#{myBean.ftBoookIncomelst}\"

Rerendering is not working in my code:

<rich:simpleTogglePanel id="bookIncomeHeader1" value="#{myBean.ftBoookIncomelst}"
    label="BOOK INCOME" bodyClass="STP" style="ReptxtBold Reptxt_LtPad"
    switchType="server">
    <rich:dataTable id="bookIncome" value="#{myBean.ftBoookIncomelst}" var="item"
        rowKeyVar="row" first="0" width="100%">
        <rich:subTable id="subBookIncome"value="#{item.txIncome}" var="income"
            rowKeyVar="row">
            <rich:column id="descrtiptionColumn" width="30%">
                <h:outputText value="#{income.descriptionCell.value}"
                     rendered="#{!item.editableRow}" 
                     style="#{income.descriptionCell.boldClass}" />  
                <rich:inplaceInput layout="block" required="true" 
                     value="#{income.descriptionCell.value}" 
                     rendered="#{item.editableRow}" 
                     requiredMessage="Description at row #{row+1} wasn't filled."
                     changedHoverClass="hover" viewHoverClass="hover" 
                     viewClass="inplace" changedClass="inplace" 
                     selectOnEdit="true" editEvent="onclick" />
            </rich:column>

In the above code I have proper id for datatable and I'm calling my ajax call using:

<rich:menuItem value="Add Manual Adjustment" id="addmanualadjust">
    <a4j:support event="onclick" action="#{myBean.addNewDataItem}" 
        reRender="bookIncome">
        <f:param name="rowNum" value="#{item.serialNum}"><开发者_如何学C/f:param>
    </a4j:support>
</rich:menuItem>

It's hitting the server and calling proper method and updating the required list, but it's not showing any response. Why is it not rendering? It does not show any exception on console either.


  1. the a4j:support and the dataTable should be in the same <x:form>
  2. try adding immediate="true" to the a4j:support to bypass validation errors.


Does it work if you rerender bookIncomeHeader1?

Max
http://mkblog.exadel.com

0

精彩评论

暂无评论...
验证码 换一张
取 消