The p:editor is not rendered in p:dialog. I am using Firefox 3.6.3, Primefaces 2.2 RC1 snapshot (29/10/2010), Mojorra 2.0.3. When I click on the "Show" button, the dialog appeared with two blank boxes. Looks like the editor is still being drawn twice. The error is shown below. Note when I remove the p:dialog text the editor is rendered.
Code: Select all
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8080/portalintegrator/javax.faces.resource/editor/editor.js.jsf?ln=primefaces :: anonymous :: line 9" data: no]
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<title>
<ui:insert name="title">Test </ui:insert>
</title>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/themes/#{guestPreferences.theme}/skin.css" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/syntaxhighlighter/styles/syntaxhighlighter.css"></link>
</h:head>
<h:body>
<div class="ui-widget ui-widget-header">
<div id="logo">
<h1 align="center">Primefaces Test Page</h1>
</div>
</div>
<h:outputLink value="javascript:void(0)" onclick="dlg.show()">Show</h:outputLink>
<p:dialog widgetVar="dlg" width="600" showEffect="clip" hideEffect="fold" header="Item Maintenance">
<p:editor value="#{testController.description}" widgetVar="editor" toolbar="normal" />
</p:dialog>
</h:body>
</f:view>
</html>
Code: Select all
@Component("testController")
@Scope("session")
public class TestController {
String description = "test";
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}