0

I am working with a page and I would like to put primefaces editor on it. However, I have tried several ways, but non could make the editor show like it is on the Primefaces showcase(http://www.primefaces.org/showcase/ui/input/editor.xhtml), every other primefaces feature on the page is working, and if there is something put under the editor, it would ruin other feature as well (like making the calendar button disappear.) Not really sure what is happening, can anyone help? :(

Basic markup:

<h:form>
 <p:calendar value="#{bean.date}" showOn="button"/>
 <!-- if put under the editor, the calendar will not work as well -->
  <p:editor id="editor" widgetVar="editorWidget" value="#{bean.text}" width="100" />


</h:form>

And when I inspect the page, the html component rendered is hidden and the toolbar options are not present.

Rui Chen
  • 41
  • 1
  • 10
  • do you have servlet mapping with xhtml ? in web.xml – Sarz May 28 '15 at 12:50
  • @Sarz: *"every other primefaces feature on the page is working"* – BalusC May 28 '15 at 13:01
  • 1
    Rui: Do some basic debugging in client side first. Press F12 and check particularly the console and the HTTP traffic monitor for abormalities and clues. We don't have access to that and would only be shooting in the dark and/or do educated guesses. You're the only one who has access to that information. – BalusC May 28 '15 at 13:02
  • @BalusC Thank you! I asked a senior engineer for help and they later found out it was due to some conflict between jQuery and the Primefaces js library. Weird thing is I could still use jQuery on my page after the senior engineer removed it from the template. – Rui Chen Jun 01 '15 at 17:21
  • It's not weird. PrimeFaces is a jQuery based JSF component library. I closed your Q as a duplicate. – BalusC Jun 01 '15 at 17:22
  • @BalusC No problem. Thanks. :) – Rui Chen Jun 01 '15 at 17:29

1 Answers1

-2

I think the problem is with your web.xml add xhtml URL pattern in your configuration file

<servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
        <url-pattern>*.jsf</url-pattern>
        <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Sarz
  • 1,970
  • 4
  • 23
  • 43