I am experiencing an issue with codeMirror from primeface-extension when trying to use it with SQL syntax.
Upon loading the page that contains this component, I encounter a 404 error where the Css and javascript components cannot be found.
Despite having my code identical to the example from showcase-ext codeMirror, the problem persists.
This is happening while using primefaces 5.1 and primefaces-ext 2.1.0.
Has anyone else faced this problem before?
Thank you for your help in advance.
Edit:
Here is a snippet of my JSF:
<pe:codeMirror id="codeMirror"
value="#{sandboxBean.content}" lineNumbers="true"/>
<p:commandButton actionListener="#{sandboxBean.changeMode}" update="codeMirror"
value="Change mode with AJAX" style="margin-top:10px;"/>
And here is part of my bean:
private String content;
private String mode = "javascript";
public void changeMode() {
if (mode.equals("css")) {
mode = "javascript";
} else {
mode = "css";
}
}
public List<String> complete(final CompleteEvent event) {
final ArrayList<String> suggestions = new ArrayList<String>();
suggestions.add("context: " + event.getContext());
suggestions.add("token: " + event.getToken());
return suggestions;
}
public String getContent() {
return content;
}
public void setContent(final String content) {
this.content = content;
}
public String getMode() {
return mode;
}
public void setMode(final String mode) {
this.mode = mode;
}
The browser console shows the error: 404 (Not Found) for the CSS and JS files of the primefaces component.
All other primefaces components load correctly, so I'm puzzled as to why this specific one isn't working.
Can anyone spot what might be wrong with my code?