1

ポータルで遅すぎるルーチンを変更する必要があります。これは私の.xhtmlファイルです:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jstl/core">
    <ui:composition>
    <a4j:outputPanel id="pending">
        <rich:panel

        style="border:none;background:transparent; width:100%; height:100%; padding:0px; margin:0px;"
        rendered="#{dataTableBean.noItemFound}" id="noItemFoundPanel">
        <ui:include src="/templates/message/noItemFound.xhtml" />
    </rich:panel>

    <rich:panel
        style="border:none;background:transparent; width:100%; height:100%; padding:0px; margin:0px;"
        rendered="#{detectTreeSelectedNode.hasNoSelectedNode}" id="noItemSelectedPanel">
        <ui:include src="/templates/message/noItemSelected.xhtml" />
    </rich:panel>

    <rich:panel
        style="border:none;background:transparent; width:100%; height:50%; padding:0px; margin:0px;position:absolute;overflow:auto;"
        panelTable>
    </rich:panel>

    <a4j:outputPanel ajaxRendered="true" layout="block"
        style="border:none;background:transparent; position:absolute; bottom:0px; left:0px; right:0px; height:50%; overflow:auto;"
        id="panelDetail">
            <div id="panelDetailContents" style="width:100%; height:100%;"><f:verbatim>#{htmlContentService.content}</f:verbatim></div>
        </a4j:outputPanel>
    </a4j:outputPanel>
</ui:composition>
</html>

ID が であるパネルは、次のように Java コードで をpanelTable受け取ります。org.richfaces.component.html.HtmlDataTable

public void updatePanelTable() {

    detectTreeSelectedNode.setHasNoSelectedNode(false);
    //mount the dynamic datatable
    HtmlDataTable dataTable = getHtmlDatatable();
    SelectedDocuments.clear();

    HTMLContentService service = SessionUtils.findBean("htmlContentService");
    service.updateContent(null);

    UIComponent panel = (UIComponent) FacesContext.getCurrentInstance().getViewRoot()
            .findComponent("principal:panelTable");

    panel.getChildren().clear();
    panel.getChildren().add(dataTable);

    panel = (UIComponent) FacesContext.getCurrentInstance().getViewRoot().findComponent("principal:panelDetail");
    panel.getChildren().clear();        
}

実際には、これには各セルのリスナーがありますが、HtmlDataTable私の意見では間違った方法です。リスナーなしでイベント行選択を取得し、行選択を処理するメソッドを呼び出したいのですが、どうすれば、.xhtmlパネルの子に入ることができますか彼のイベントを取得しますか?

pom.xmlご参考までに:

<dependency>
 <groupId>javax.faces</groupId>
 <artifactId>jsf-api</artifactId>
 <version>1.2_12</version>
 <scope>provided</scope>
</dependency>
<dependency>
 <groupId>javax.faces</groupId>
 <artifactId>jsf-impl</artifactId>
 <version>1.2_12</version>
 <scope>provided</scope>
</dependency>
<dependency>
 <groupId>com.sun.facelets</groupId>
 <artifactId>jsf-facelets</artifactId>
 <version>1.1.14</version>
 <scope>compile</scope>
</dependency>
<dependency>
 <groupId>org.richfaces.framework</groupId>
 <artifactId>richfaces-impl</artifactId>
 <version>3.3.1.GA</version>
</dependency>
<dependency>
 <groupId>org.richfaces.framework</groupId>
 <artifactId>richfaces-api</artifactId>
 <version>3.3.1.GA</version>
</dependency>
<dependency>
 <groupId>org.richfaces.ui</groupId>
 <artifactId>richfaces-ui</artifactId>
 <version>3.3.1.GA</version>
</dependency>

前もって感謝します。

4

1 に答える 1