我的JSF 2.2页面中有一些强制的PrimeFaces 5.2 <p:autoComplete>
组件绑定到@ViewScoped
bean。该页面包含以下必需元素:
当我填写表格并立即提交记录时,一切正常。当我在单击提交按钮之前单独离开表单几分钟时,即使表单中的值仍然存在且HTTP-POST与在成功提交期间。在HTTP-Post中,我可以看到,“Order”和“Location”的值已设置,就像在成功的HTTP-POST期间一样。我从未得到“员工”的任何验证错误,即使三个p:autoComplete
元素之间没有区别。
javax.faces.partial.ajax=true&javax.faces.source=NewTimesheetForm%3AsH_submit&javax.faces.partial.execute
=%40all&javax.faces.partial.render=NewTimesheetForm%3Agrowl&NewTimesheetForm%3AsH_submit=NewTimesheetForm
%3AsH_submit&NewTimesheetForm=NewTimesheetForm&NewTimesheetForm%3AMain_employeeAutoComplete_input=Sebastian
+Lang&NewTimesheetForm%3AMain_employeeAutoComplete_hinput=df27af76-9937-4e28-bee8-66a000f0ce9c&NewTimesheetForm
%3AMain_dateArray_input=&NewTimesheetForm%3AMain_dateArray_datepicker=&NewTimesheetForm%3AMain_wspOrderAutoComplete_input
=Development+(Kolibri)& NewTimesheetForm%3AMain_wspOrderAutoComplete_hinput=21c2259e-08bf-4a98-b718-8be67dba3b55&NewTimesheetForm%3AMain_locationAutoComplete_input=Wien&NewTimesheetForm%3AMain_locationAutoComplete_hinput
=15e41fee-ef98-4176-a118-032cef4e4c02&NewTimesheetForm%3AMain_workingTime=12&NewTimesheetForm%3AMain_description
=123&javax.faces.ViewState=15843050982783687%3A7588832336313498775
任何想法可能是验证错误的原因?
答案 0 :(得分:0)
我使用了错误的<connectionStrings>
<add name="TwitterContextConnection" connectionString="Data Source=.\SQLEXPRESS;Database=Twitter;Integrated Security=True";providerName="System.Data.SqlClient" />
</connectionStrings>
。这是正确的方法:http://showcase.omnifaces.org/converters/ListConverter