简体   繁体   中英

PrimeFaces Extension <pe:keyFilter> Javascript Error

I am using <pe:KeyFilter/> , and, when I run my project in IE8, the following error is shown.

'b.browser.safari' is null or not an object keyfilter.js.seam?ln=primefaces-extensions&v=1.1.0, line 1 character 219 .

When I debug keyfilter.js file, error is show " d=b.browser.safari?e[d]||d:d " at that place.

I already added

  1. primefaces-4.0.jar
  2. primefaces-extensions-1.1.0.jar
  3. commons-lang3-3.1.jar in my project.

And I have already declared

<context-param>
    <param-name>org.primefaces.extensions.DELIVER_UNCOMPRESSED_RESOURCES</param-name>
    <param-value>false</param-value>
</context-param>

in web.xml.

And in my xhtml page, xmlns:pe="http://primefaces.org/ui/extensions

<p:inputText value="#{LoginFormBean.loginHeaderBean.day}" name="day" id="day">
    <pe:keyFilter mask="num" /> 
</p:inputText>

How can I solved this problem? Please give me suggestion. Thanks a lot.

I know this is an old thread, but it can be helpful for someone else =)

Try to add a 'p:panel' before 'pe:keyfilter' :

<div style="display: none;">
    <p:panel />
</div>
<p:inputText value="#{LoginFormBean.loginHeaderBean.day}" name="day" id="day">
    <pe:keyFilter mask="num" /> 
</p:inputText>

I had the same issue but I fixed it that way. If anyone knows a better solution, would be nice to know it.

Hope it helps.

thanks.

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