0

私は richfaces 3.2.3 を使用していますが、次の興味深いバグに直面しています。

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:s="http://jboss.com/products/seam/taglib"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
<f:subview>
    <a4j:outputPanel id="commentariesAjaxContainer" ajaxRendered="true">
        <rich:dataTable id="commentaries" var="commentary"
                        value="#{someBean.commentaries}" rows="10" rowClasses="odd-row, even-row"
                        styleClass="stable"
                        reRender="commentariesDS">
            <f:facet name="header">
                <h:outputText
                        value="#{messages['commentaries.title']}"/>
            </f:facet>

            ...
            <rich:column width="10%" styleClass="rich-grid-edit-column">
                <f:facet name="header">
                    <h:outputText
                            value="#{messages['historic.commentary.action']}"/>
                </f:facet>
                <h:panelGroup>
                    <h:commandButton id="commentaryactioneditLnk" styleClass="image-edit-copy-delete"
                                     image="/img/edit16x16px.png"
                                     value="#{messages['historic.commentary.action.edit']}"
                                     action="#{someBean.editCommentary()}"/>
                </h:panelGroup>
            </rich:column>
        </rich:dataTable>
        <rich:datascroller fastControls="hide"
                           id="commentariesDS" for="commentaries" renderIfSinglePage="false">
            <ui:include src="layout/rich-datascroller-facets.xhtml"/>
        </rich:datascroller>
    </a4j:outputPanel>

    <h:commandLink action="#{someBean.createCommentary()}">
        <h:panelGrid columns="2">
            <h:panelGroup>
                <h:outputText styleClass="image-link-label-medium"
                              value="#{messages['customerCare.historic.commentary.action.create']}"/>
            </h:panelGroup>
            <h:panelGroup>
                <h:graphicImage value="img/buttons/add_a_comment_icon-24x24.png"/>
            </h:panelGroup>
        </h:panelGrid>
    </h:commandLink>
</f:subview>
</ui:composition>

そのため、コマンド リンクは、ラベルとアイコンがネストされたリンクとして表示されます。ボタンをクリックするまで正常に動作しrich:datascrollerます-データテーブルがajaxリクエストを介して再レンダリングされた後、リンクが破損します-ネストされたすべての要素は子ではなく兄弟になります(したがって、リンクは空になります)。h:commandLinkrich:dataTable の子ではないため、さらに奇妙です!

これを解決するのを手伝ってもらえますか? そして、この問題の根本が何であるかを知ることは素晴らしいことです

4

1 に答える 1

0

「私が理解しているように」ページにいくつかの変更を加えているため、問題は oncomplete 呼び出しにあると思います。

<rich:datascroller oncomplete="_globalTsmModule.renderGlobalMessagesBlock();"...

次のように、このコンポーネントに ajax ステータスを使用できます。

<a4j:status id="a4jstatus" onstop="_globalTsmModule.renderGlobalMessagesBlock();"/>
于 2013-03-20T13:27:53.807 に答える