【问题标题】:How to deactivate spellcheck in p:inputTextarea Prime Faces?如何在 p:inputTextarea Primefaces 中停用拼写检查?
【发布时间】:2014-10-22 08:25:53
【问题描述】:

我想停用 Prime Faces inputTextarea 中的拼写检查。

spellcheck="false"p:inputTextarea 中是不可能的

<p:inputTextarea value="#{mybean.cardescription}" 
        cols="95"
        autoResize="true"
        rows="20"/>

【问题讨论】:

  • 在页面加载 $('inputTextId').attr('spellcheck','false') 上使用 jQuery,或者您应该为 inputTextarea 编写一个自定义渲染器。我也不确定 OmniFaces 的 Html5RenderKit 是否适用于 PrimeFaces inputTextarea,但它应该是。
  • 您好,感谢您的回复。我不知道如何使用jQuery,请问我应该把这段代码放在哪里?在 xhtml 文档中还是在 bean 中?

标签: jsf jsf-2 primefaces spell-checking


【解决方案1】:

使用以下内容:

<h:head>
    <h:outputScript   name="/js/util/disableSpellCheck.js"/> 
</h:head>

$('inputTextId').attr('spellcheck','false')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-12
    • 2012-02-05
    • 1970-01-01
    • 2011-03-20
    • 1970-01-01
    • 1970-01-01
    • 2023-01-08
    相关资源
    最近更新 更多