0
我試圖從primefaces使用,但我有一些奇怪(和'隱形')的問題。 我與春/休眠/ Primefaces 工作這是我對.xhtml代碼:primefaces自動完成doens't工作,奇怪的錯誤
<p:autoComplete cache='true' id='autocomplete'
value="#{controller.filter_field_editor}"
completeMethod="#{controller.getAll()}"
dropdown="true" />
爲 'GETALL' 函數的代碼是這樣的:
public List<String> getAll(){
List<HardTag> allhardtags = new ArrayList<HardTag>();
List<String> allhardtags_titles = new ArrayList<String>();
allhardtags = repositoryService.findByCollection("Editors");
for (HardTag hardTag : allhardtags) {
allhardtags_titles.add(hardTag.getTitle());
}
return allhardtags_titles;
}
如果我調試的時候,我返回allhardtags_titles,這個變量有一個正確的String列表,但自動完成輸入不顯示任何內容。
我的控制檯沒有顯示任何東西都不是,所以我意識到,我有Web開發工具......但所有的檢查(標準/ CSS /的Jscript)的確定,即使如此我點擊JScript和在這裏,有一個錯誤。
> Fecha y hora: 12/12/2013 18:38:57
Error: no se encuentra elemento (*can't find element)
Archivo de origen: http://localhost:8080/inbox.xhtml
Línea: 1
如果我點擊它,就說明這一點:
<!DOCTYPE html >
而這一切...所以我有點失去了這裏!
如果需要更多,請告訴我!提前致謝!
人有一個想法?
爲什麼在它應該有一個'String'參數時在後端使用非參數化方法? –
嗯,這是不需要的。我跟着例子,並沒有必要發送一個參數。 –