Autocomplete PrimeFaces don't work with PrettyFaces

Splash Forums PrettyFaces Users Autocomplete PrimeFaces don't work with PrettyFaces

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26723

    Andreu
    Participant

    Tag autocomplete PrimeFaces don’t work (not displayed autocompleted words) after adding navigation rules into pretty-config.xml, how fix this?

    #26724

    Andreu
    Participant

    http://www.primefaces.org/showcase/ui/input/autoComplete.xhtml – this component don’t work with PrettyFaces.
    Tag autocomplete not displayed autocompleted words after adding navigation rules into pretty-config.xml, how fix this?

    if delete this navigation rules

        <url-mapping id="home">
            <pattern value="" />
            <view-id value="/faces/index.xhtml" />
        </url-mapping>
        
        <url-mapping parentId="home" id="viewCategory">
            <pattern value="/#{ category : categoryBean.categoryName}"/>
            <view-id value="/faces/somethingList.xhtml"/>
        </url-mapping>
        
        <url-mapping  parentId="viewCategory" id="viewProduct">
            <pattern value="/#{ product : productBean.id}"/>
            <view-id value="/faces/product.xhtml"/>
        </url-mapping>

    tag normally work.

    Upd
    http://www.primefaces.org/showcase/ui/ajax/search.xhtml – this component don’t work when add navigation rules into pretty-config.xml too.

    • This reply was modified 1 year, 6 months ago by  Andreu.
    • This reply was modified 1 year, 6 months ago by  Andreu.
    #26727

    Andreu
    Participant

    answer:

        <url-mapping id="home">
            <pattern value="/" />
            <view-id value="/faces/index.xhtml" />
        </url-mapping>
    • This reply was modified 1 year, 6 months ago by  Andreu.
    #26763

    I think the problem is that your mappings are matching too many URLs. For example:

    <url-mapping parentId="home" id="viewCategory">
      <pattern value="/#{ category : categoryBean.categoryName}"/>
      <view-id value="/faces/somethingList.xhtml"/>
    </url-mapping>
    

    This for example will also match /something.css or /foobar.js. And I guess the AJAX requests sent by the components will also be affected. Please note that the rules will not only apply to JSF pages but also to all other requests which the client sends.

    You should change the mapping to something like:

    <url-mapping parentId="home" id="viewCategory">
      <pattern value="/category/#{ category : categoryBean.categoryName}"/>
      <view-id value="/faces/somethingList.xhtml"/>
    </url-mapping>
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.