JSF2.0+RichFaces3.3.3 modalPanel内的建议框

JSF2.0+RichFaces3.3.3 modalPanel内的建议框,jsf,richfaces,jsf-2,Jsf,Richfaces,Jsf 2,在这个示例之后,我创建了一个用于编辑条目的模式面板。区别在于我的一个inputText字段有一个建议框: <h:inputText id="entryName" value="#{controller.currentItem.name}" validator="#{controller.entryNameValidator}"/> <rich:suggestionbox id="suggestionBoxId" for="entryName" suggestionAction=

在这个示例之后,我创建了一个用于编辑条目的模式面板。区别在于我的一个inputText字段有一个建议框:

<h:inputText id="entryName" value="#{controller.currentItem.name}" validator="#{controller.entryNameValidator}"/>
<rich:suggestionbox id="suggestionBoxId" for="entryName" suggestionAction="#{controller.autocomplete}" var="result">
    <h:column>
        <h:outputText value="#{result.name}" />
    </h:column>
</rich:suggestionbox>
<rich:message for="entryName"/>
问题是,当模式出现时,我更改了entryName中的单个字母,建议就会出现,但当它没有发现建议时,它会将更改的值(没有我刚才删除的字母的值)还原为删除前的原始值。另一方面,如果它发现一些建议,它仍然会将值还原为旧值,但也会在entryName正下方的模式中打印建议,而不是在建议框中,它只是灰色文本。此外,该建议只触发一次。如果我让我把hello改成hello,它就会恢复为hello,下次我试图把它改成hello时,什么也不会发生

我做错了什么?哦,在添加条目时,我在jsf视图中使用了完全相同的代码,虽然它不是一个模式,只是一个表,而且工作正常


@编辑:显然用a4j:区域包围它有点帮助,因为至少我可以看到建议框,但在背景中,所以我必须设置zindex,并且在浏览器的左角不低于入口名,但我仍然无法单击它,它就在那里,即使在关闭模式后也不会消失,建议仍然以灰色打印在输入文本下方,不在建议框中,并且仍然只触发一次…

尝试此操作,根据您的要求修改以下内容

enter code here <h:panelGrid columns="2" cellpadding="0" cellspacing="0">
                                <h:inputText id="input"  size="30"/>
                                <h:graphicImage   value="#{facesContext.externalContext.requestContextPath}/../images/arrow.png"
                                                  onclick="#{rich:component('equity')}.callSuggestion(true)"
                                                  alt="click" />
                            </h:panelGrid>
                            <rich:suggestionbox width="200" 
                                                suggestionAction="#{StockMasterServiceBean.suggest}" var="stock" id="equity" for="input">
                                <h:column>
                                    <h:outputText value="#{stock.symbolId}"/>
                                </h:column>
                                <h:column>
                                    <h:outputText value="#{stock.companyName}" />
                                </h:column>
                                <a4j:support ajaxSingle="true" event="onselect" reRender="abc,xyz">
                                    <f:setPropertyActionListener value="#{stock}" target="#{StockMasterServiceBean.selectedStockMaster}"/>
                                </a4j:support>
                            </rich:suggestionbox>

我真的不知道这样做的目的是什么,但没有帮助。