我创建了这个测试用例来隔离我的问题。一旦轮询执行ajax更新,就不会执行a4j:commandLink操作。如果我们在poll的reRender之前关闭了modalPanel,它会被执行。a4j:command在reRender后停止工作
有什么建议吗?提前致谢。
test.xhtml:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fnc="http://eyeprevent.com/fnc">
<a4j:outputPanel id="testing">
<rich:modalPanel id="examinationPanel" autosized="true" width="450" rendered="#{test.condition2}">
<f:facet name="header">
<h:outputText value="View Examination Images" />
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:form>
<a4j:commandLink action="#{test.close}">
<h:graphicImage value="/images/modal/close.png" id="hideExaminationPanel" styleClass="hidelink" />
</a4j:commandLink>
</a4j:form>
<rich:componentControl for="examinationPanel" attachTo="hideExaminationPanel" operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<a4j:form>
<h:panelGrid columns="1" id="timeoutText">
<h:outputText id="remainingtime" value="condition1" rendered="#{test.condition1}" />
<h:outputText id="timer" value="condition2" rendered="#{test.condition2}" />
</h:panelGrid>
<a4j:poll id="poll" interval="5000" enabled="#{test.poll}" reRender="poll,timeoutText" />
</a4j:form>
</rich:modalPanel>
链接
TestBean.java
import org.apache.log4j.Logger;
public class TestBean {
private boolean condition1=false;
private boolean condition2=true;
private boolean poll=true;
public void close(){
Logger.getLogger("com.eyeprevent").info("here!");
poll=false;
condition1=true;
condition2=false;
}
public boolean isCondition1() {
return condition1;
}
public void setCondition1(boolean condition1) {
this.condition1 = condition1;
}
public boolean isCondition2() {
return condition2;
}
public void setCondition2(boolean condition2) {
this.condition2 = condition2;
}
public boolean isPoll() {
return poll;
}
public void setPoll(boolean poll) {
this.poll = poll;
}
}
testBean这个是会话范围。 Richfaces版本3.3.2.SR1
而且在Chrome 5.0.322.2开发中,modalPanel不会出现。它在FF和IE7下。
,我从我的应用程序,它有这个问题的分量这个测试用例。该组件在“父”上有domElementAttachment,但该链接不起作用。我将尝试移动窗体... – pakore 2010-02-24 14:39:54
将窗体移动到modalPanel之外也无济于事。无论如何感谢你的答案。 – pakore 2010-02-24 14:43:27
@pakore - 我的意思是 - 将表格移到外面,然后摆脱第二种形式。你尝试过吗? – Bozho 2010-02-25 06:16:21