Jsf 如何在rich:modalPanel中绑定组件

Jsf 如何在rich:modalPanel中绑定组件,jsf,richfaces,jsf-1.2,ajax4jsf,richfaces-modal,Jsf,Richfaces,Jsf 1.2,Ajax4jsf,Richfaces Modal,我对rich:modalPanel和rich:calendar有问题 代码在没有模式的情况下工作,但是当我在模式中包含组件时,我在日期中收到一个空指针 工作: <a4j:outputPanel id="datePanel"> <a4j:region> <rich:calendar id="calendar" value="#{ myBean.myDate }" /> <a4j:commandButton valu

我对rich:modalPanel和rich:calendar有问题

代码在没有模式的情况下工作,但是当我在模式中包含组件时,我在日期中收到一个空指针

工作:

<a4j:outputPanel id="datePanel">
    <a4j:region>
        <rich:calendar id="calendar" value="#{ myBean.myDate }" />

        <a4j:commandButton value="Confirm" reRender="tablePanel"
            action="#{ myBean.addToTable }" />
    </a4j:region>
</a4j:outputPanel>

不工作:

<rich:modalPanel id="mpCalendar" height="250" width="350" autosized="true"
    zindex="1000">
    <f:facet name="header">
        <h:outputText value="New date" />
    </f:facet>
    <f:facet name="controls">
        <h:graphicImage value="/images/close.gif"
            onclick="Richfaces.hideModalPanel('mpCalendar')"
            style="cursor:pointer" />
    </f:facet>
    <a4j:outputPanel id="datePanel">
        <a4j:region>
            <rich:calendar id="calendar" value="#{ myBean.myDate }" />

            <a4j:commandButton value="Confirm" reRender="tablePanel"
                action="#{ myBean.addToTable }" />
        </a4j:region>
    </a4j:outputPanel>
</rich:modalPanel>

我的问题是: 1为什么当我把它放在模态中时它不工作?
2我怎样才能修复它?

我发现了问题所在

我的modalPanel在另一张表格里。。。我只是把模态放在表单之外,然后在模态中添加一个表单

例如:

<a4j:outputPanel id="datePanel">
    <a4j:form>
        <rich:calendar id="calendar" value="#{ myBean.myDate }" />

        <a4j:commandButton value="Confirm" reRender="tablePanel"
            action="#{ myBean.addToTable }" />
    </a4j:form>
</a4j:outputPanel>

<h:form> ...

...