2017-10-18 12 views
1

アプリケーションのすべてのリッチテキスト項目にカスタム設定ファイルを追加しようとしていますが、dojo属性で設定ファイルを正しく参照する方法がわかりません。私はそれをデータベースに関連して参照したいと思う。私の例ではCKEditorカスタム設定ファイルをXPagesに追加するには?

<xp:dojoAttribute name="customConfig" value="cke_custom_config.js"></xp:dojoAttribute> 

enter image description here

<xp:inputRichText id="inputRichText2" value="#{cd.Body}"> 
    <xp:this.dojoAttributes> 
    <xp:dojoAttribute name="customConfig" value="cke_custom_config.js"></xp:dojoAttribute> 
    </xp:this.dojoAttributes> 
</xp:inputRichText> 

設定ファイル上記に参照されます。 http://server/xsp/.ibmxspres/domino/ckeditor/cke_custom_config.js?t=G44E

私は「のWebContent/cke_custom_configを指すように設定ファイルへのパスを変更するにはどうすればよいです。 js "?

答えて

3
<xp:inputRichText id="inputRichTextBody" 
    value="#{cd.Body}"> 
    <xp:this.dojoAttributes> 
     <xp:dojoAttribute name="customConfig" 
      value="${facesContext.externalContext.request.contextPath}/cke_custom_config.js?open"> 
     </xp:dojoAttribute> 
    </xp:this.dojoAttributes> 
</xp:inputRichText> 

ELの一部がcke_custom_config.js前に追加?オープンは、現在のデータベースへのパスです。

+0

ありがとうございました。なぜ私はタイムスタンプを取り除く必要がありますか?それはキャッシュを防ぐためですか? –

+0

"cke_custom_config.js?open"を使用するとパラメータがうまくいくと思います。 –

+0

@ThomasAdrian:Ok、私の答えを変更しました –

関連する問題