1

我的自动完成标记仅适用于旧版本的 primefaces 2.0,除了如果我添加任何具有更高版本的 jar,它会在 completeMethod 属性上给出错误,它无法找到属性(我在 completeMethod 中使用的方法)。我需要使用升级版的 primefaces,因为我需要其他更新的 primefaces 标签。请在这方面提供一些帮助。

谢谢

编辑: 这是代码:

   <tr> <td>Current Education Level</td>                            
                                    <td> 
                                        <h:panelGrid styleClass="text-box">
                                             <p:autoComplete id="education" value="#{input.education}" completeMethod="#{input.getautocomplete}" var="a" itemLabel="#{a.Name}" itemValue="#{a}"  converter="edConverter" forceSelection="true"/>  

                                            <p:column>  
                                                #{a.Name} - #{a.id}  
                                            </p:column>    
                                        </h:panelGrid>
                                    </td>                                                          
                             </tr>   

此自动完成工作正常并在使用 primefaces 2.0 时给出结果,但如果将 jar 替换为较新版本或 3.4 版本,则会出现以下错误: javax.el.E​​LException: /WebPages/SearchPages/Search.xhtml: The class 'com.Bean.服务'没有属性'getautocomplete'。

我放的罐子在 WEBINF 的 lib 文件夹中,并使用 glassfish 服务器 3.1.2。我在使用 primefaces 2.0 时添加的命名空间是xmlns:p="http://primefaces.prime.com.tr/ui" 并且在使用版本 3.4 时我将其替换为xmlns:p=http://primefaces.org/ui

我不知道可能是什么问题,可能是 eclipse 或 Mojarra 2.1.6 的问题吗?

4

0 回答 0