Danke, das war es.
Nur jetzt bekomme ich diesen Fehler.
The runtime has encountered an unexpected error.
Error source
Page Name:/xpProject.xsp
Control Id: _id3
Exception
Error while executing JavaScript computed expression
Script interpreter error, line=1, col=9: [ReferenceError] 'rteBean' not found
JavaScript code
1: rteBean.getDatabasePath()
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="
http://www.ibm.com/xsp/core" xmlns:evo="
http://www.ibm.com/xsp/evolution"
xmlns:xe="
http://www.ibm.com/xsp/coreex" pageTitle="Evolution">
<xp:this.resources>
<xp:styleSheet>
<xp:this.contents>
<![CDATA[
.xsp-inline-attachment{padding:2px 2px 2px 18px;}
.image-jpeg, .image-pjeg, .image-jpg, .image-x-png, .image-gif, .image-bmp {
background:url("./iconImage.gif") no-repeat scroll left center transparent;
}
.application-pdf {
background:url("./iconPDF.gif") no-repeat scroll left center transparent;
}
.application-octet-stream, .text-plain {
background:url("./iconFile.gif") no-repeat scroll left center transparent;
}
.application-msword {
background:url("./iconWord.gif") no-repeat scroll left center transparent;
}
.application-vnd-ms-excel, .application-vnd-openxmlformats-officedocument-spreadsheetml-sheet {
background:url("./iconFile.gif") no-repeat scroll left center transparent;
}
.application-vnd-ms-powerpoint {
background:url("./iconPPT.gif") no-repeat scroll left center transparent;
}
]]>
</xp:this.contents>
</xp:styleSheet>
</xp:this.resources>
<xp:this.data>
<xp:dominoDocument var="document1" formName="myForm"
concurrencyMode="exception">
</xp:dominoDocument>
</xp:this.data>
<xp:this.resources>
<xp:script clientSide="true" type="text/javascript">
<xp:this.contents>
<![CDATA[
// intercept nsf resource requests to stop ?t=timestamp being appended by ckeditor
// see:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation window.CKEDITOR_GETURL = function(resourceRequest){
if(null != resourceRequest && resourceRequest.indexOf(".nsf") > -1){
return resourceRequest;
}
}
AttachmentHandler = function(editor){
return new CKEDITOR.dialogCommand("AttachmentDialog");
};
ImageHandler = function(editor){
return new CKEDITOR.dialogCommand("ImageDialog");
};
XSP.addOnLoad(function(){
try{
CKEDITOR.plugins.add("AttachmentExtension", {
init: function(editor){
editor.on("pluginsLoaded", function(ev){
if(!CKEDITOR.dialog.exists("AttachmentDialog")){
CKEDITOR.dialog.add("AttachmentDialog", " ${javascript:rteBean.getDatabasePath()} ".trim() + "AttachmentDialog.js");
}
editor.ui.addButton("Attachment", {
label: "Attach a file...",
command: "AttachmentHandler",
icon: " ${javascript:rteBean.getDatabasePath()} ".trim() + "iconAttachment.png"
});
editor.addCommand("AttachmentHandler", AttachmentHandler(editor));
});
}
});
CKEDITOR.plugins.add("ImageExtension", {
init: function(editor){
editor.on("pluginsLoaded", function(ev){
if(!CKEDITOR.dialog.exists("ImageDialog")){
CKEDITOR.dialog.add("ImageDialog", " ${javascript:rteBean.getDatabasePath()} ".trim() + "ImageDialog.js");
}
editor.ui.addButton("ImageEx", {
label: "Embed an image...",
command: "ImageHandler",
icon: " ${javascript:rteBean.getDatabasePath()} ".trim() + "iconImage.gif"
});
editor.addCommand("ImageHandler", ImageHandler(editor));
});
}
});
}catch(e){
console.log(e);
}
});
]]>
</xp:this.contents>
</xp:script>
</xp:this.resources>
<xp:scriptBlock id="scriptBlock3" defer="false">
<xp:this.value>
<![CDATA[
XSP.addOnLoad(function(){
try{
// set the component instance's upload url...
// add RTE id's to this list as required so each instance has it's
// own unique upload url targetted at it's inputRichText component...
var instanceIds = [ "#{id:inputRichText1}", "#{id:inputRichText2}" ];
for(var x = 0; x < instanceIds.length; x++){
var url = document.location.href.substring(0, document.location.href.indexOf('?'));
if(null != url){
url += "?$$axtarget=" + instanceIds
"&$$viewid=" + XSP.findForm(instanceIds
}
CKEDITOR.instances[instanceIds
- ].config.axtargetUrl = url;
}
}catch(e){
console.log(e);
}
});
]]>
</xp:this.value>
</xp:scriptBlock>
<xp:div themeId="container" style="width:900px">
<xp:div id="container1">
<evo:inputRichText id="inputRichText1"
value="#{rteBean['document1.Body1']}">
<xp:this.converter>
<xp:converter
converterId="InputRichTextConverter">
</xp:converter>
</xp:this.converter>
<xp:this.dojoAttributes>
<xp:dojoAttribute name="extraPlugins"
value="AttachmentExtension,ImageExtension">
</xp:dojoAttribute>
<xp:dojoAttribute name="toolbar">
<xp:this.value>
<![CDATA[#{javascript:
var customToolbar = "[\n" +
"['Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'Strike', 'TextColor', 'BGColor'],\n" +
"['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'NumberedList', 'BulletedList', 'Outdent', 'Indent'],\n" +
"['Attachment', 'ImageEx', 'Table', 'Link', 'Smiley'],\n" +
"['MenuPaste', 'Find', 'Maximize', 'Source']\n" +
"]";
return customToolbar;
}]]>
</xp:this.value>
</xp:dojoAttribute>
</xp:this.dojoAttributes>
</evo:inputRichText>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:fileDownload rows="30" id="fileDownload1"
displayLastModified="false" value="#{document1.Body1}" allowDelete="true">
</xp:fileDownload>
</xp:div>
</xp:div>
</xp:view>
Gruß,
Helmut