简体   繁体   中英

javax.faces.FacesException: Cannot find slider target component 'txt6; txt7' in view

I tried the following example from PrimeFaces <p:slider> showcase :

<h3>Range Slider</h3>  

<h:panelGrid columns="1" style="margin-bottom:10px">                      
    <h:outputText id="displayRange" value="Between #{sliderBean.number6} and #{sliderBean.number7}"/>                      
    <p:slider for="txt6,txt7" display="displayRange" style="width:400px" range="true"   
              displayTemplate="Between {min} and {max}"/> 
</h:panelGrid>  
<h:inputHidden id="txt6" value="#{sliderBean.number6}" />  
<h:inputHidden id="txt7" value="#{sliderBean.number7}" />  

However, it throws the following exception during rendering:

Error Rendering View[/pages/slides.xhtml]: javax.faces.FacesException: Cannot find slider target component 'txt6; txt7' in view

How is this caused and how can I solve it?

It is Primefaces's slider bug in your Primefaces version, it was fixed in Primefaces version 3.5

You can see: List Primefaces's bug and Release notes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM