-
1. Re: reRender in a4j:commandLink is not working
ilya_shaikovsky Nov 6, 2009 5:28 AM (in response to sonya_ling1947)This will work only using a4j data iteration components. tomahawk UIData just not provides any mechanisms to update them partially.
-
2. Re: reRender in a4j:commandLink is not working, resolved, bu
sonya_ling1947 Nov 9, 2009 10:00 PM (in response to sonya_ling1947)I get partial render work beautifully by replacing <t:dataList> in both outer loop and inner loop with <rich:dataList> and also add ajaxKeys in both <rich:dataList>.
However, I get into new bug after I switch to <rich:dataList> . Dashboard view render well when I display the first time. When I switch date and re-fetch data and display the second time, I got
java.lang.IllegalStateException: duplicate Id for a component dashboardForm:productList:subProfileList:j_id61
org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:418)
org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:440)
org.ajax4jsf.application.AjaxStateManager.buildSerializedView(AjaxStateManager.java:328)
org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:312)
javax.faces.application.StateManager.saveView(StateManager.java:166)
com.sun.faces.application.ViewHandlerImpl$WriteBehindStateWriter.flushToWriter(ViewHandlerImpl.java:925)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:205)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
I specify add whenever I can. I still got the same error. What should I do ?
The followings are codes excerpt<tbody> <!-- Start the product listing. --> <rich:dataList id="productList" value="#{Dashboard2Bean.productList}" var="product" rowKeyVar="row" rowClasses="even, odd" binding="#{Dashboard2Bean.selectedProduct}" ajaxKeys="#{Dashboard2Bean.productIndexToUpdate}" > <tr id="dashboardRow"> <td class="wrpFirst"> <h:commandLink action="#{Dashboard2Bean.productClick}" immediate="true"> <h:outputText value="#{product.productName}" /> </h:commandLink> </td> <td> <h:outputText value="#{product.id}" /> </td> <rich:dataList id="subProfileList" var="profileAssoc" value="#{product.dashboardProfileAssocs}" binding="#{Dashboard2Bean.selectedProfile}" ajaxKeys="#{Dashboard2Bean.profileIndexToUpdate}" > <td id="dashboardColumn"> <a4j:outputPanel id="dashboardPanel"> <t:outputText rendered="#{profileAssoc.compositeStatus == 1}"> <a id="dashboardPeningAnchor"> <img src="/panda/images/dashboard/icon_status_mini_pending.png" alt="Pending" /> </a> <a4j:commandLink id="dashboardPublishAnchor" reRender="dashboardPanel" action="#{Dashboard2Bean.publish}" limitToList="true" ajaxSingle="true" value="publish"> <img src="/panda/images/dashboard/icon_menu_publish.png" </a4j:commandLink> <a id="dashboardPendingExportAnchor" href="javascript:exportDirect('<h:outputText value="#{product.id}" />', '<h:outputText value="#{profileAssoc.profile.id}" />')"> <img src="/panda/images/dashboard/icon_menu_export.png" />export </a> </t:outputText> <t:outputText rendered="#{profileAssoc.compositeStatus == 2}"> <a id="dashboardPublishedAnchor" > <img src="/panda/images/dashboard/icon_status_mini_published.png" alt="Published" /> </a> <a id="dashboardPublishedExportAnchor" href="javascript:exportDirect('<h:outputText value="#{product.id}" />', '<h:outputText value="#{profileAssoc.profile.id}" />')"> <img src="/panda/images/dashboard/icon_menu_export.png" />export </a> </t:outputText> <t:outputText rendered="#{profileAssoc.compositeStatus == 3}"> <a id="dashboardExpiredAnchor" > <img src="/panda/images/dashboard/icon_status_mini_expired.png" alt="Expired" /> </a> <a id="dashboardExpiredExportAnchor" href="javascript:exportDirect('<h:outputText value="#{product.id}" />', '<h:outputText value="#{profileAssoc.profile.id}" />')"> <img src="/panda/images/dashboard/icon_menu_export.png" />export </a> </t:outputText> </a4j:outputPanel> </td> </rich:dataList> </tr> <%-- </t:outputText> --%> </rich:dataList> </tbody>
-
3. Re: reRender in a4j:commandLink is not working
ilya_shaikovsky Nov 10, 2009 4:46 AM (in response to sonya_ling1947)seems you using session scoped binding. It will not works fine in JSF in general.
-
4. Re: reRender in a4j:commandLink is not working
sonya_ling1947 Nov 10, 2009 2:01 PM (in response to sonya_ling1947)Yes. You are absolutely right. I took out the binding and replace ithem with passing parameters this morning. It's working now.
Thanks.