ポップアップ パネルを開くリンクがあります。そのパネルを開く前に、ejb ステートレス Bean から何らかのアクションを実行し、ポップアップ パネルをレンダリングする必要があります。そのパネルを開いた後、Bean からアクションを実行してそのパネルを閉じる commandButton をクリックします。2 番目のアクションは実行されません。
最初の a4j:commandLink から「render」属性を削除すると、すべて問題ありません。
私が使用したのは、Richfaces 4.1.0.Final (4.2.3.Final と最新のものも試しました: 4.3.0.20121214-M3)、Seam 3.1.0.Final、JBoss 7.1.1.Final です。
my_page.xhtml:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.org/seam/faces"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head></h:head>
<h:body>
<h:form>
<a4j:commandLink action="#{myBean.init()}" render="myPopupPanel"
oncomplete="#{rich:component('myPopupPanel')}.show(); return false;">
Open panel
</a4j:commandLink>
</h:form>
<rich:popupPanel id="myPopupPanel" modal="false" autosized="true"
resizeable="false">
<h:form id="deviceInputEditForm">
<a4j:commandButton action="#{myBean.doAction()}" value="DoAction"
oncomplete="#{rich:component('myPopupPanel')}.hide();" />
</h:form>
</rich:popupPanel>
</h:body>
</html>
MyBean.java:
package com.hajdi.test;
import javax.ejb.Stateless;
import javax.inject.Named;
@Named
@Stateless
public class MyBean {
public void init() {
System.out.println("Init called.");
}
public void doAction() {
System.out.println("doAction called");
}
}