Richfaces 4 a4j:commandLink操作未在rich:popupPanel中触发

Aar*_*ers 5 richfaces commandlink cdi jsf-2 jboss-weld

我似乎遇到一个问题,我在rich:popupPanel上有一个a4j:commandLink,但是没有触发动作.xhtml看起来如下:

<rich:popupPanel id="rate-panel" modal="true" height="444" width="780" top="60" show="false" onmaskclick="#{rich:component('rate-panel')}.hide()" styleClass="cs-modal">
  /**Some html here**/    
  <a4j:commandLink immediate="false" action="#{venueScore.up}" render="rate-panel" styleClass="rate love">
    <span>Love it</span>
  </a4j:commandLink>    
  /**Some more html here**/    
</rich:popupPanel>
Run Code Online (Sandbox Code Playgroud)

托管bean看起来如下:

@Named("venueScore")
@ViewScoped
public class VenueScoreManager extends BaseManager implements Serializable {
  public void up() {
    System.out.println("TEST");
    //Do something
  }
}
Run Code Online (Sandbox Code Playgroud)

我已经创建了托管bean @ViewScoped.

我也试过<h:form>在commandLink周围添加一个,但是,这比没有它更少.我实际上认为这是因为commandLink <h:form>位于打开popupPanel的链接所在的位置.

无论如何,有人可以指点我为什么行动不开火?

Aar*_*ers 8

好的,所以我自己解决了.在搞砸了之后,我发现我只需要添加一个<a4j:region>内容<rich:popupPanel>.所以现在xhtml看起来像这样:

<rich:popupPanel id="rate-panel" modal="true" height="444" width="780" top="60" show="false" onmaskclick="#{rich:component('rate-panel')}.hide()" styleClass="cs-modal">
  <a4j:region id="panel-region">
    /**Some html here**/    
    <a4j:commandLink immediate="false" action="#{venueScore.up}" render="panel-region" styleClass="rate love">
      <span>Love it</span>
    </a4j:commandLink>    
    /**Some more html here**/    
  </a4j:region>
</rich:popupPanel>
Run Code Online (Sandbox Code Playgroud)