0
votes

I'm trying to use from primefaces, but i have some strange (and 'invisible') problem. I'm working with Spring/Hibernate/Primefaces This is my code for the .xhtml:

   <p:autoComplete cache='true' id='autocomplete'
                        value="#{controller.filter_field_editor}"
                        completeMethod="#{controller.getAll()}"
                        dropdown="true" />

The code for 'getAll' function is this:

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;

}

If i debug, when i return allhardtags_titles, this variable have a correct list of String, but the autocomplete input doesn't show anything.

My console doesn't show anything neither, so i realized that i have Web Developer Tools... but all the checks (Standard/CSS/Jscript) are OK, even so i click on Jscript and here, there is an error.

> 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

if i click on it, it shows this:

<!DOCTYPE html >

And that's all... so i'm a little lost here!

If need something more just tell me! Thanks in advance!

Anyone have an idea?

1
Why are you using a non-parametered method at the backend when it's supposed to have an String parameter? - Xtreme Biker
Mmmh, it's not needed. I followed the examples and it's not necessary to send a parameter. - OhIt'sMaillic

1 Answers

0
votes

The problem it's solved.

Replacing this:

 <ui:include src="${pageContext.request.contextPath}/things/video/components/header.xhtml" />

for this one:

 <ui:include src="components/header.xhtml" />

It works... i don't understand why... maybe some kind of problem with '${pageContext.request.contextPath}' ...

Thanks for the help.